├── .gitignore
├── Sample Sheet.xlsx
├── csharp-read-write-sheet.sln
├── csharp-read-write-sheet
├── App.config
├── NLog.config
├── NLog.xsd
├── Program.cs
├── Properties
│ └── AssemblyInfo.cs
├── csharp-read-write-sheet.csproj
├── icons
│ └── logo.png
└── packages.config
├── license.md
└── readme.md
/.gitignore:
--------------------------------------------------------------------------------
1 | *.suo
2 | *.user
3 | *.userosscache
4 | *.sln.docstates
5 | *.userprefs
6 |
7 | **/packages/*
8 |
9 |
10 | # Build results
11 | [Dd]ebug/
12 | [Dd]ebugPublic/
13 | [Rr]elease/
14 | [Rr]eleases/
15 | x64/
16 | x86/
17 | bld/
18 | [Bb]in/
19 | [Oo]bj/
20 | [Ll]og/
21 |
--------------------------------------------------------------------------------
/Sample Sheet.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/smartsheet-samples/csharp-read-write-sheet/9bb978b42061264e8fcf1a6b53ba4f05d8665851/Sample Sheet.xlsx
--------------------------------------------------------------------------------
/csharp-read-write-sheet.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp-read-write-sheet", "csharp-read-write-sheet\csharp-read-write-sheet.csproj", "{9182C1C0-A3BF-41E4-A3AA-61CE8B8BD475}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {9182C1C0-A3BF-41E4-A3AA-61CE8B8BD475}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {9182C1C0-A3BF-41E4-A3AA-61CE8B8BD475}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {9182C1C0-A3BF-41E4-A3AA-61CE8B8BD475}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {9182C1C0-A3BF-41E4-A3AA-61CE8B8BD475}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/csharp-read-write-sheet/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/csharp-read-write-sheet/NLog.config:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/csharp-read-write-sheet/NLog.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | Watch config file for changes and reload automatically.
16 |
17 |
18 |
19 |
20 | Print internal NLog messages to the console. Default value is: false
21 |
22 |
23 |
24 |
25 | Print internal NLog messages to the console error output. Default value is: false
26 |
27 |
28 |
29 |
30 | Write internal NLog messages to the specified file.
31 |
32 |
33 |
34 |
35 | Log level threshold for internal log messages. Default value is: Info.
36 |
37 |
38 |
39 |
40 | Global log level threshold for application log messages. Messages below this level won't be logged..
41 |
42 |
43 |
44 |
45 | Throw an exception when there is an internal error. Default value is: false.
46 |
47 |
48 |
49 |
50 | Throw an exception when there is a configuration error. If not set, determined by throwExceptions.
51 |
52 |
53 |
54 |
55 | Gets or sets a value indicating whether Variables should be kept on configuration reload. Default value is: false.
56 |
57 |
58 |
59 |
60 | Write internal NLog messages to the System.Diagnostics.Trace. Default value is: false.
61 |
62 |
63 |
64 |
65 | Write timestamps for internal NLog messages. Default value is: true.
66 |
67 |
68 |
69 |
70 | Use InvariantCulture as default culture instead of CurrentCulture. Default value is: false.
71 |
72 |
73 |
74 |
75 | Perform mesage template parsing and formatting of LogEvent messages (true = Always, false = Never, empty = Auto Detect). Default value is: empty.
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | Make all targets within this section asynchronous (creates additional threads but the calling thread isn't blocked by any target writes).
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 | Prefix for targets/layout renderers/filters/conditions loaded from this assembly.
107 |
108 |
109 |
110 |
111 | Load NLog extensions from the specified file (*.dll)
112 |
113 |
114 |
115 |
116 | Load NLog extensions from the specified assembly. Assembly name should be fully qualified.
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 | Name of the logger. May include '*' character which acts like a wildcard. Allowed forms are: *, Name, *Name, Name* and *Name*
127 |
128 |
129 |
130 |
131 | Comma separated list of levels that this rule matches.
132 |
133 |
134 |
135 |
136 | Minimum level that this rule matches.
137 |
138 |
139 |
140 |
141 | Maximum level that this rule matches.
142 |
143 |
144 |
145 |
146 | Level that this rule matches.
147 |
148 |
149 |
150 |
151 | Comma separated list of target names.
152 |
153 |
154 |
155 |
156 | Ignore further rules if this one matches.
157 |
158 |
159 |
160 |
161 | Enable or disable logging rule. Disabled rules are ignored.
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 | Name of the file to be included. You could use * wildcard. The name is relative to the name of the current config file.
204 |
205 |
206 |
207 |
208 | Ignore any errors in the include file.
209 |
210 |
211 |
212 |
213 |
214 |
215 | Variable name.
216 |
217 |
218 |
219 |
220 | Variable value.
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 |
275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 | Name of the target.
288 |
289 |
290 |
291 |
292 | Number of log events that should be processed in a batch by the lazy writer thread.
293 |
294 |
295 |
296 |
297 | Limit of full s to write before yielding into Performance is better when writing many small batches, than writing a single large batch
298 |
299 |
300 |
301 |
302 | Action to be taken when the lazy writer thread request queue count exceeds the set limit.
303 |
304 |
305 |
306 |
307 | Limit on the number of requests in the lazy writer thread request queue.
308 |
309 |
310 |
311 |
312 | Time in milliseconds to sleep between batches.
313 |
314 |
315 |
316 |
317 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 | Delay the flush until the LogEvent has been confirmed as written
342 |
343 |
344 |
345 |
346 | Condition expression. Log events who meet this condition will cause a flush on the wrapped target.
347 |
348 |
349 |
350 |
351 | Name of the target.
352 |
353 |
354 |
355 |
356 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
357 |
358 |
359 |
360 |
361 |
362 |
363 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 | Name of the target.
376 |
377 |
378 |
379 |
380 | Number of log events to be buffered.
381 |
382 |
383 |
384 |
385 | Timeout (in milliseconds) after which the contents of buffer will be flushed if there's no write in the specified period of time. Use -1 to disable timed flushes.
386 |
387 |
388 |
389 |
390 | Action to take if the buffer overflows.
391 |
392 |
393 |
394 |
395 | Indicates whether to use sliding timeout.
396 |
397 |
398 |
399 |
400 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
401 |
402 |
403 |
404 |
405 |
406 |
407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 |
415 |
416 |
417 |
418 |
419 |
420 |
421 |
422 |
423 |
424 |
425 |
426 |
427 |
428 |
429 |
430 |
431 |
432 |
433 |
434 |
435 |
436 |
437 |
438 |
439 |
440 |
441 |
442 |
443 |
444 |
445 |
446 | Name of the target.
447 |
448 |
449 |
450 |
451 | Encoding to be used.
452 |
453 |
454 |
455 |
456 | Instance of that is used to format log messages.
457 |
458 |
459 |
460 |
461 | End of line value if a newline is appended at the end of log message .
462 |
463 |
464 |
465 |
466 | Maximum message size in bytes.
467 |
468 |
469 |
470 |
471 | Indicates whether to append newline at the end of log message.
472 |
473 |
474 |
475 |
476 | Action that should be taken if the will be more connections than .
477 |
478 |
479 |
480 |
481 | Maximum queue size.
482 |
483 |
484 |
485 |
486 | Maximum current connections. 0 = no maximum.
487 |
488 |
489 |
490 |
491 | Indicates whether to keep connection open whenever possible.
492 |
493 |
494 |
495 |
496 | Size of the connection cache (number of connections which are kept alive).
497 |
498 |
499 |
500 |
501 | Network address.
502 |
503 |
504 |
505 |
506 | Action that should be taken if the message is larger than maxMessageSize.
507 |
508 |
509 |
510 |
511 | NDLC item separator.
512 |
513 |
514 |
515 |
516 | NDC item separator.
517 |
518 |
519 |
520 |
521 | Indicates whether to include NLog-specific extensions to log4j schema.
522 |
523 |
524 |
525 |
526 | Indicates whether to include source info (file name and line number) in the information sent over the network.
527 |
528 |
529 |
530 |
531 | Indicates whether to include contents of the stack.
532 |
533 |
534 |
535 |
536 | Indicates whether to include stack contents.
537 |
538 |
539 |
540 |
541 | Indicates whether to include dictionary contents.
542 |
543 |
544 |
545 |
546 | Indicates whether to include dictionary contents.
547 |
548 |
549 |
550 |
551 | Indicates whether to include call site (class and method name) in the information sent over the network.
552 |
553 |
554 |
555 |
556 | Option to include all properties from the log events
557 |
558 |
559 |
560 |
561 | AppInfo field. By default it's the friendly name of the current AppDomain.
562 |
563 |
564 |
565 |
566 | Renderer for log4j:event logger-xml-attribute (Default ${logger})
567 |
568 |
569 |
570 |
571 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
572 |
573 |
574 |
575 |
576 |
577 |
578 |
579 |
580 |
581 |
582 |
583 |
584 |
585 |
586 |
587 |
588 |
589 |
590 |
591 |
592 |
593 |
594 |
595 |
596 |
597 |
598 | Layout that should be use to calcuate the value for the parameter.
599 |
600 |
601 |
602 |
603 | Viewer parameter name.
604 |
605 |
606 |
607 |
608 |
609 |
610 |
611 |
612 |
613 |
614 |
615 |
616 |
617 |
618 |
619 |
620 |
621 |
622 |
623 |
624 |
625 | Name of the target.
626 |
627 |
628 |
629 |
630 | Text to be rendered.
631 |
632 |
633 |
634 |
635 | Header.
636 |
637 |
638 |
639 |
640 | Footer.
641 |
642 |
643 |
644 |
645 | Indicates whether to auto-check if the console is available. - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App)
646 |
647 |
648 |
649 |
650 | The encoding for writing messages to the .
651 |
652 |
653 |
654 |
655 | Indicates whether the error stream (stderr) should be used instead of the output stream (stdout).
656 |
657 |
658 |
659 |
660 | Indicates whether to use default row highlighting rules.
661 |
662 |
663 |
664 |
665 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
666 |
667 |
668 |
669 |
670 |
671 |
672 |
673 |
674 |
675 |
676 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
689 |
690 |
691 |
692 |
693 |
694 |
695 |
696 |
697 |
698 |
699 |
700 | Condition that must be met in order to set the specified foreground and background color.
701 |
702 |
703 |
704 |
705 | Background color.
706 |
707 |
708 |
709 |
710 | Foreground color.
711 |
712 |
713 |
714 |
715 |
716 |
717 |
718 |
719 |
720 |
721 |
722 |
723 |
724 |
725 |
726 | Compile the ? This can improve the performance, but at the costs of more memory usage. If false, the Regex Cache is used.
727 |
728 |
729 |
730 |
731 | Indicates whether to ignore case when comparing texts.
732 |
733 |
734 |
735 |
736 | Regular expression to be matched. You must specify either text or regex.
737 |
738 |
739 |
740 |
741 | Text to be matched. You must specify either text or regex.
742 |
743 |
744 |
745 |
746 | Indicates whether to match whole words only.
747 |
748 |
749 |
750 |
751 | Background color.
752 |
753 |
754 |
755 |
756 | Foreground color.
757 |
758 |
759 |
760 |
761 |
762 |
763 |
764 |
765 |
766 |
767 |
768 |
769 |
770 |
771 |
772 |
773 |
774 |
775 | Name of the target.
776 |
777 |
778 |
779 |
780 | Text to be rendered.
781 |
782 |
783 |
784 |
785 | Header.
786 |
787 |
788 |
789 |
790 | Footer.
791 |
792 |
793 |
794 |
795 | Indicates whether to auto-check if the console is available - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App)
796 |
797 |
798 |
799 |
800 | The encoding for writing messages to the .
801 |
802 |
803 |
804 |
805 | Indicates whether to send the log messages to the standard error instead of the standard output.
806 |
807 |
808 |
809 |
810 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
811 |
812 |
813 |
814 |
815 |
816 |
817 |
818 |
819 |
820 |
821 |
822 |
823 |
824 |
825 |
826 |
827 |
828 |
829 |
830 |
831 |
832 |
833 |
834 |
835 |
836 |
837 |
838 |
839 |
840 | Name of the target.
841 |
842 |
843 |
844 |
845 | Obsolete - value will be ignored! The logging code always runs outside of transaction. Gets or sets a value indicating whether to use database transactions. Some data providers require this.
846 |
847 |
848 |
849 |
850 | Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string.
851 |
852 |
853 |
854 |
855 | Name of the database provider.
856 |
857 |
858 |
859 |
860 | Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string.
861 |
862 |
863 |
864 |
865 | Indicates whether to keep the database connection open between the log events.
866 |
867 |
868 |
869 |
870 | Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string.
871 |
872 |
873 |
874 |
875 | Name of the connection string (as specified in <connectionStrings> configuration section.
876 |
877 |
878 |
879 |
880 | Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase.
881 |
882 |
883 |
884 |
885 | Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string.
886 |
887 |
888 |
889 |
890 | Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used.
891 |
892 |
893 |
894 |
895 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
896 |
897 |
898 |
899 |
900 | Text of the SQL command to be run on each log level.
901 |
902 |
903 |
904 |
905 | Type of the SQL command to be run on each log level.
906 |
907 |
908 |
909 |
910 |
911 |
912 |
913 |
914 |
915 |
916 |
917 |
918 |
919 |
920 |
921 |
922 |
923 |
924 |
925 |
926 |
927 |
928 | Type of the command.
929 |
930 |
931 |
932 |
933 | Connection string to run the command against. If not provided, connection string from the target is used.
934 |
935 |
936 |
937 |
938 | Indicates whether to ignore failures.
939 |
940 |
941 |
942 |
943 | Command text.
944 |
945 |
946 |
947 |
948 |
949 |
950 |
951 |
952 |
953 |
954 |
955 |
956 |
957 | Layout that should be use to calcuate the value for the parameter.
958 |
959 |
960 |
961 |
962 | Database parameter name.
963 |
964 |
965 |
966 |
967 | Database parameter precision.
968 |
969 |
970 |
971 |
972 | Database parameter scale.
973 |
974 |
975 |
976 |
977 | Database parameter size.
978 |
979 |
980 |
981 |
982 |
983 |
984 |
985 |
986 |
987 |
988 |
989 |
990 |
991 |
992 |
993 | Name of the target.
994 |
995 |
996 |
997 |
998 | Text to be rendered.
999 |
1000 |
1001 |
1002 |
1003 | Header.
1004 |
1005 |
1006 |
1007 |
1008 | Footer.
1009 |
1010 |
1011 |
1012 |
1013 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
1014 |
1015 |
1016 |
1017 |
1018 |
1019 |
1020 |
1021 |
1022 |
1023 |
1024 |
1025 |
1026 |
1027 |
1028 |
1029 | Name of the target.
1030 |
1031 |
1032 |
1033 |
1034 | Layout used to format log messages.
1035 |
1036 |
1037 |
1038 |
1039 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
1040 |
1041 |
1042 |
1043 |
1044 |
1045 |
1046 |
1047 |
1048 |
1049 |
1050 |
1051 |
1052 |
1053 |
1054 |
1055 |
1056 |
1057 |
1058 |
1059 |
1060 |
1061 |
1062 |
1063 |
1064 | Name of the target.
1065 |
1066 |
1067 |
1068 |
1069 | Layout used to format log messages.
1070 |
1071 |
1072 |
1073 |
1074 | Layout that renders event Category.
1075 |
1076 |
1077 |
1078 |
1079 | Optional entrytype. When not set, or when not convertable to then determined by
1080 |
1081 |
1082 |
1083 |
1084 | Layout that renders event ID.
1085 |
1086 |
1087 |
1088 |
1089 | Name of the Event Log to write to. This can be System, Application or any user-defined name.
1090 |
1091 |
1092 |
1093 |
1094 | Name of the machine on which Event Log service is running.
1095 |
1096 |
1097 |
1098 |
1099 | Maximum Event log size in kilobytes. If null, the value won't be set. Default is 512 Kilobytes as specified by Eventlog API
1100 |
1101 |
1102 |
1103 |
1104 | Message length limit to write to the Event Log.
1105 |
1106 |
1107 |
1108 |
1109 | Value to be used as the event Source.
1110 |
1111 |
1112 |
1113 |
1114 | Action to take if the message is larger than the option.
1115 |
1116 |
1117 |
1118 |
1119 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
1120 |
1121 |
1122 |
1123 |
1124 |
1125 |
1126 |
1127 |
1128 |
1129 |
1130 |
1131 |
1132 |
1133 |
1134 |
1135 |
1136 |
1137 |
1138 |
1139 |
1140 |
1141 |
1142 | Name of the target.
1143 |
1144 |
1145 |
1146 |
1147 | Indicates whether to return to the first target after any successful write.
1148 |
1149 |
1150 |
1151 |
1152 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
1153 |
1154 |
1155 |
1156 |
1157 |
1158 |
1159 |
1160 |
1161 |
1162 |
1163 |
1164 |
1165 |
1166 |
1167 |
1168 |
1169 |
1170 |
1171 |
1172 |
1173 |
1174 |
1175 |
1176 |
1177 |
1178 |
1179 |
1180 |
1181 |
1182 |
1183 |
1184 |
1185 |
1186 |
1187 |
1188 |
1189 |
1190 |
1191 |
1192 |
1193 |
1194 |
1195 |
1196 |
1197 |
1198 |
1199 |
1200 |
1201 |
1202 |
1203 |
1204 | Name of the target.
1205 |
1206 |
1207 |
1208 |
1209 | Text to be rendered.
1210 |
1211 |
1212 |
1213 |
1214 | Header.
1215 |
1216 |
1217 |
1218 |
1219 | Footer.
1220 |
1221 |
1222 |
1223 |
1224 | File encoding.
1225 |
1226 |
1227 |
1228 |
1229 | Line ending mode.
1230 |
1231 |
1232 |
1233 |
1234 | Indicates whether to compress archive files into the zip archive format.
1235 |
1236 |
1237 |
1238 |
1239 | Way file archives are numbered.
1240 |
1241 |
1242 |
1243 |
1244 | Name of the file to be used for an archive.
1245 |
1246 |
1247 |
1248 |
1249 | Is the an absolute or relative path?
1250 |
1251 |
1252 |
1253 |
1254 | Indicates whether to automatically archive log files every time the specified time passes.
1255 |
1256 |
1257 |
1258 |
1259 | Size in bytes above which log files will be automatically archived. Warning: combining this with isn't supported. We cannot create multiple archive files, if they should have the same name. Choose:
1260 |
1261 |
1262 |
1263 |
1264 | Maximum number of archive files that should be kept.
1265 |
1266 |
1267 |
1268 |
1269 | Indicates whether the footer should be written only when the file is archived.
1270 |
1271 |
1272 |
1273 |
1274 | Maximum number of log filenames that should be stored as existing.
1275 |
1276 |
1277 |
1278 |
1279 | Name of the file to write to.
1280 |
1281 |
1282 |
1283 |
1284 | Value specifying the date format to use when archiving files.
1285 |
1286 |
1287 |
1288 |
1289 | Indicates whether to archive old log file on startup.
1290 |
1291 |
1292 |
1293 |
1294 | Cleanup invalid values in a filename, e.g. slashes in a filename. If set to true, this can impact the performance of massive writes. If set to false, nothing gets written when the filename is wrong.
1295 |
1296 |
1297 |
1298 |
1299 | Indicates whether to create directories if they do not exist.
1300 |
1301 |
1302 |
1303 |
1304 | Indicates whether to delete old log file on startup.
1305 |
1306 |
1307 |
1308 |
1309 | File attributes (Windows only).
1310 |
1311 |
1312 |
1313 |
1314 | Indicates whether to write BOM (byte order mark) in created files
1315 |
1316 |
1317 |
1318 |
1319 | Indicates whether to enable log file(s) to be deleted.
1320 |
1321 |
1322 |
1323 |
1324 | Indicates whether to replace file contents on each write instead of appending log message at the end.
1325 |
1326 |
1327 |
1328 |
1329 | Value indicationg whether file creation calls should be synchronized by a system global mutex.
1330 |
1331 |
1332 |
1333 |
1334 | Gets or set a value indicating whether a managed file stream is forced, instead of using the native implementation.
1335 |
1336 |
1337 |
1338 |
1339 | Is the an absolute or relative path?
1340 |
1341 |
1342 |
1343 |
1344 | Indicates whether concurrent writes to the log file by multiple processes on the same host.
1345 |
1346 |
1347 |
1348 |
1349 | Whether or not this target should just discard all data that its asked to write. Mostly used for when testing NLog Stack except final write
1350 |
1351 |
1352 |
1353 |
1354 | Delay in milliseconds to wait before attempting to write to the file again.
1355 |
1356 |
1357 |
1358 |
1359 | Indicates whether concurrent writes to the log file by multiple processes on different network hosts.
1360 |
1361 |
1362 |
1363 |
1364 | Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger).
1365 |
1366 |
1367 |
1368 |
1369 | Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity.
1370 |
1371 |
1372 |
1373 |
1374 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
1375 |
1376 |
1377 |
1378 |
1379 | Log file buffer size in bytes.
1380 |
1381 |
1382 |
1383 |
1384 | Indicates whether to automatically flush the file buffers after each log message.
1385 |
1386 |
1387 |
1388 |
1389 | Number of times the write is appended on the file before NLog discards the log message.
1390 |
1391 |
1392 |
1393 |
1394 | Indicates whether to keep log file open instead of opening and closing it on each logging event.
1395 |
1396 |
1397 |
1398 |
1399 |
1400 |
1401 |
1402 |
1403 |
1404 |
1405 |
1406 |
1407 |
1408 |
1409 |
1410 |
1411 |
1412 |
1413 |
1414 |
1415 |
1416 |
1417 |
1418 |
1419 |
1420 |
1421 |
1422 |
1423 |
1424 |
1425 |
1426 |
1427 |
1428 |
1429 |
1430 |
1431 |
1432 |
1433 |
1434 |
1435 |
1436 |
1437 |
1438 |
1439 |
1440 |
1441 |
1442 |
1443 |
1444 |
1445 |
1446 |
1447 |
1448 |
1449 |
1450 |
1451 |
1452 |
1453 |
1454 |
1455 |
1456 |
1457 |
1458 |
1459 |
1460 |
1461 |
1462 | Name of the target.
1463 |
1464 |
1465 |
1466 |
1467 | Condition expression. Log events who meet this condition will be forwarded to the wrapped target.
1468 |
1469 |
1470 |
1471 |
1472 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
1473 |
1474 |
1475 |
1476 |
1477 |
1478 |
1479 |
1480 |
1481 |
1482 |
1483 |
1484 |
1485 |
1486 |
1487 |
1488 |
1489 |
1490 |
1491 |
1492 |
1493 |
1494 | Name of the target.
1495 |
1496 |
1497 |
1498 |
1499 | Windows domain name to change context to.
1500 |
1501 |
1502 |
1503 |
1504 | Required impersonation level.
1505 |
1506 |
1507 |
1508 |
1509 | Type of the logon provider.
1510 |
1511 |
1512 |
1513 |
1514 | Logon Type.
1515 |
1516 |
1517 |
1518 |
1519 | User account password.
1520 |
1521 |
1522 |
1523 |
1524 | Indicates whether to revert to the credentials of the process instead of impersonating another user.
1525 |
1526 |
1527 |
1528 |
1529 | Username to change context to.
1530 |
1531 |
1532 |
1533 |
1534 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
1535 |
1536 |
1537 |
1538 |
1539 |
1540 |
1541 |
1542 |
1543 |
1544 |
1545 |
1546 |
1547 |
1548 |
1549 |
1550 |
1551 |
1552 |
1553 |
1554 |
1555 |
1556 |
1557 |
1558 |
1559 |
1560 |
1561 |
1562 |
1563 |
1564 |
1565 |
1566 |
1567 |
1568 |
1569 |
1570 |
1571 |
1572 |
1573 |
1574 | Interval in which messages will be written up to the number of messages.
1575 |
1576 |
1577 |
1578 |
1579 | Maximum allowed number of messages written per .
1580 |
1581 |
1582 |
1583 |
1584 | Name of the target.
1585 |
1586 |
1587 |
1588 |
1589 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
1590 |
1591 |
1592 |
1593 |
1594 |
1595 |
1596 |
1597 |
1598 |
1599 |
1600 |
1601 |
1602 |
1603 |
1604 |
1605 |
1606 |
1607 |
1608 |
1609 |
1610 |
1611 | Name of the target.
1612 |
1613 |
1614 |
1615 |
1616 | Endpoint address.
1617 |
1618 |
1619 |
1620 |
1621 | Name of the endpoint configuration in WCF configuration file.
1622 |
1623 |
1624 |
1625 |
1626 | Indicates whether to use a WCF service contract that is one way (fire and forget) or two way (request-reply)
1627 |
1628 |
1629 |
1630 |
1631 | Client ID.
1632 |
1633 |
1634 |
1635 |
1636 | Indicates whether to include per-event properties in the payload sent to the server.
1637 |
1638 |
1639 |
1640 |
1641 | Indicates whether to use binary message encoding.
1642 |
1643 |
1644 |
1645 |
1646 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
1647 |
1648 |
1649 |
1650 |
1651 |
1652 |
1653 |
1654 |
1655 |
1656 |
1657 |
1658 |
1659 |
1660 |
1661 | Layout that should be use to calculate the value for the parameter.
1662 |
1663 |
1664 |
1665 |
1666 | Name of the parameter.
1667 |
1668 |
1669 |
1670 |
1671 | Type of the parameter.
1672 |
1673 |
1674 |
1675 |
1676 | Type of the parameter. Obsolete alias for
1677 |
1678 |
1679 |
1680 |
1681 |
1682 |
1683 |
1684 |
1685 |
1686 |
1687 |
1688 |
1689 |
1690 |
1691 |
1692 |
1693 |
1694 |
1695 |
1696 |
1697 |
1698 |
1699 |
1700 |
1701 |
1702 |
1703 |
1704 |
1705 |
1706 |
1707 |
1708 |
1709 |
1710 |
1711 |
1712 |
1713 | Name of the target.
1714 |
1715 |
1716 |
1717 |
1718 | Text to be rendered.
1719 |
1720 |
1721 |
1722 |
1723 | Header.
1724 |
1725 |
1726 |
1727 |
1728 | Footer.
1729 |
1730 |
1731 |
1732 |
1733 | Indicates whether NewLine characters in the body should be replaced with tags.
1734 |
1735 |
1736 |
1737 |
1738 | Priority used for sending mails.
1739 |
1740 |
1741 |
1742 |
1743 | Encoding to be used for sending e-mail.
1744 |
1745 |
1746 |
1747 |
1748 | BCC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
1749 |
1750 |
1751 |
1752 |
1753 | CC email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
1754 |
1755 |
1756 |
1757 |
1758 | Indicates whether to add new lines between log entries.
1759 |
1760 |
1761 |
1762 |
1763 | Indicates whether to send message as HTML instead of plain text.
1764 |
1765 |
1766 |
1767 |
1768 | Sender's email address (e.g. joe@domain.com).
1769 |
1770 |
1771 |
1772 |
1773 | Mail message body (repeated for each log message send in one mail).
1774 |
1775 |
1776 |
1777 |
1778 | Mail subject.
1779 |
1780 |
1781 |
1782 |
1783 | Recipients' email addresses separated by semicolons (e.g. john@domain.com;jane@domain.com).
1784 |
1785 |
1786 |
1787 |
1788 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
1789 |
1790 |
1791 |
1792 |
1793 | Indicates the SMTP client timeout.
1794 |
1795 |
1796 |
1797 |
1798 | SMTP Server to be used for sending.
1799 |
1800 |
1801 |
1802 |
1803 | SMTP Authentication mode.
1804 |
1805 |
1806 |
1807 |
1808 | Username used to connect to SMTP server (used when SmtpAuthentication is set to "basic").
1809 |
1810 |
1811 |
1812 |
1813 | Password used to authenticate against SMTP server (used when SmtpAuthentication is set to "basic").
1814 |
1815 |
1816 |
1817 |
1818 | Indicates whether SSL (secure sockets layer) should be used when communicating with SMTP server.
1819 |
1820 |
1821 |
1822 |
1823 | Port number that SMTP Server is listening on.
1824 |
1825 |
1826 |
1827 |
1828 | Indicates whether the default Settings from System.Net.MailSettings should be used.
1829 |
1830 |
1831 |
1832 |
1833 | Folder where applications save mail messages to be processed by the local SMTP server.
1834 |
1835 |
1836 |
1837 |
1838 | Specifies how outgoing email messages will be handled.
1839 |
1840 |
1841 |
1842 |
1843 |
1844 |
1845 |
1846 |
1847 |
1848 |
1849 |
1850 |
1851 |
1852 |
1853 |
1854 |
1855 |
1856 |
1857 |
1858 |
1859 |
1860 |
1861 |
1862 |
1863 |
1864 |
1865 |
1866 |
1867 |
1868 | Name of the target.
1869 |
1870 |
1871 |
1872 |
1873 | Layout used to format log messages.
1874 |
1875 |
1876 |
1877 |
1878 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
1879 |
1880 |
1881 |
1882 |
1883 |
1884 |
1885 |
1886 |
1887 |
1888 |
1889 |
1890 |
1891 |
1892 |
1893 |
1894 |
1895 |
1896 | Name of the target.
1897 |
1898 |
1899 |
1900 |
1901 | Class name.
1902 |
1903 |
1904 |
1905 |
1906 | Method name. The method must be public and static. Use the AssemblyQualifiedName , https://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx e.g.
1907 |
1908 |
1909 |
1910 |
1911 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
1912 |
1913 |
1914 |
1915 |
1916 |
1917 |
1918 |
1919 |
1920 |
1921 |
1922 |
1923 |
1924 |
1925 |
1926 |
1927 |
1928 |
1929 |
1930 |
1931 |
1932 |
1933 |
1934 |
1935 |
1936 |
1937 |
1938 | Name of the target.
1939 |
1940 |
1941 |
1942 |
1943 | Layout used to format log messages.
1944 |
1945 |
1946 |
1947 |
1948 | Encoding to be used.
1949 |
1950 |
1951 |
1952 |
1953 | End of line value if a newline is appended at the end of log message .
1954 |
1955 |
1956 |
1957 |
1958 | Maximum message size in bytes.
1959 |
1960 |
1961 |
1962 |
1963 | Indicates whether to append newline at the end of log message.
1964 |
1965 |
1966 |
1967 |
1968 | Network address.
1969 |
1970 |
1971 |
1972 |
1973 | Size of the connection cache (number of connections which are kept alive).
1974 |
1975 |
1976 |
1977 |
1978 | Indicates whether to keep connection open whenever possible.
1979 |
1980 |
1981 |
1982 |
1983 | Maximum current connections. 0 = no maximum.
1984 |
1985 |
1986 |
1987 |
1988 | Maximum queue size.
1989 |
1990 |
1991 |
1992 |
1993 | Action that should be taken if the will be more connections than .
1994 |
1995 |
1996 |
1997 |
1998 | Action that should be taken if the message is larger than maxMessageSize.
1999 |
2000 |
2001 |
2002 |
2003 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
2004 |
2005 |
2006 |
2007 |
2008 |
2009 |
2010 |
2011 |
2012 |
2013 |
2014 |
2015 |
2016 |
2017 |
2018 |
2019 |
2020 |
2021 |
2022 |
2023 |
2024 |
2025 |
2026 |
2027 |
2028 |
2029 |
2030 |
2031 |
2032 |
2033 |
2034 |
2035 |
2036 |
2037 |
2038 |
2039 |
2040 |
2041 |
2042 |
2043 | Name of the target.
2044 |
2045 |
2046 |
2047 |
2048 | Encoding to be used.
2049 |
2050 |
2051 |
2052 |
2053 | Instance of that is used to format log messages.
2054 |
2055 |
2056 |
2057 |
2058 | End of line value if a newline is appended at the end of log message .
2059 |
2060 |
2061 |
2062 |
2063 | Maximum message size in bytes.
2064 |
2065 |
2066 |
2067 |
2068 | Indicates whether to append newline at the end of log message.
2069 |
2070 |
2071 |
2072 |
2073 | Action that should be taken if the will be more connections than .
2074 |
2075 |
2076 |
2077 |
2078 | Maximum queue size.
2079 |
2080 |
2081 |
2082 |
2083 | Maximum current connections. 0 = no maximum.
2084 |
2085 |
2086 |
2087 |
2088 | Indicates whether to keep connection open whenever possible.
2089 |
2090 |
2091 |
2092 |
2093 | Size of the connection cache (number of connections which are kept alive).
2094 |
2095 |
2096 |
2097 |
2098 | Network address.
2099 |
2100 |
2101 |
2102 |
2103 | Action that should be taken if the message is larger than maxMessageSize.
2104 |
2105 |
2106 |
2107 |
2108 | NDLC item separator.
2109 |
2110 |
2111 |
2112 |
2113 | NDC item separator.
2114 |
2115 |
2116 |
2117 |
2118 | Indicates whether to include NLog-specific extensions to log4j schema.
2119 |
2120 |
2121 |
2122 |
2123 | Indicates whether to include source info (file name and line number) in the information sent over the network.
2124 |
2125 |
2126 |
2127 |
2128 | Indicates whether to include contents of the stack.
2129 |
2130 |
2131 |
2132 |
2133 | Indicates whether to include stack contents.
2134 |
2135 |
2136 |
2137 |
2138 | Indicates whether to include dictionary contents.
2139 |
2140 |
2141 |
2142 |
2143 | Indicates whether to include dictionary contents.
2144 |
2145 |
2146 |
2147 |
2148 | Indicates whether to include call site (class and method name) in the information sent over the network.
2149 |
2150 |
2151 |
2152 |
2153 | Option to include all properties from the log events
2154 |
2155 |
2156 |
2157 |
2158 | AppInfo field. By default it's the friendly name of the current AppDomain.
2159 |
2160 |
2161 |
2162 |
2163 | Renderer for log4j:event logger-xml-attribute (Default ${logger})
2164 |
2165 |
2166 |
2167 |
2168 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
2169 |
2170 |
2171 |
2172 |
2173 |
2174 |
2175 |
2176 |
2177 |
2178 |
2179 |
2180 |
2181 |
2182 |
2183 |
2184 |
2185 | Name of the target.
2186 |
2187 |
2188 |
2189 |
2190 | Layout used to format log messages.
2191 |
2192 |
2193 |
2194 |
2195 | Indicates whether to perform layout calculation.
2196 |
2197 |
2198 |
2199 |
2200 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
2201 |
2202 |
2203 |
2204 |
2205 |
2206 |
2207 |
2208 |
2209 |
2210 |
2211 |
2212 |
2213 |
2214 |
2215 |
2216 | Name of the target.
2217 |
2218 |
2219 |
2220 |
2221 | Layout used to format log messages.
2222 |
2223 |
2224 |
2225 |
2226 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
2227 |
2228 |
2229 |
2230 |
2231 |
2232 |
2233 |
2234 |
2235 |
2236 |
2237 |
2238 |
2239 |
2240 |
2241 |
2242 |
2243 |
2244 |
2245 |
2246 |
2247 |
2248 | Name of the target.
2249 |
2250 |
2251 |
2252 |
2253 | Indicates whether performance counter should be automatically created.
2254 |
2255 |
2256 |
2257 |
2258 | Name of the performance counter category.
2259 |
2260 |
2261 |
2262 |
2263 | Counter help text.
2264 |
2265 |
2266 |
2267 |
2268 | Name of the performance counter.
2269 |
2270 |
2271 |
2272 |
2273 | Performance counter type.
2274 |
2275 |
2276 |
2277 |
2278 | The value by which to increment the counter.
2279 |
2280 |
2281 |
2282 |
2283 | Performance counter instance name.
2284 |
2285 |
2286 |
2287 |
2288 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
2289 |
2290 |
2291 |
2292 |
2293 |
2294 |
2295 |
2296 |
2297 |
2298 |
2299 |
2300 |
2301 |
2302 |
2303 |
2304 |
2305 |
2306 |
2307 |
2308 |
2309 |
2310 |
2311 |
2312 |
2313 |
2314 |
2315 |
2316 |
2317 |
2318 |
2319 |
2320 |
2321 |
2322 |
2323 |
2324 |
2325 |
2326 |
2327 |
2328 |
2329 |
2330 |
2331 |
2332 |
2333 |
2334 |
2335 |
2336 |
2337 | Name of the target.
2338 |
2339 |
2340 |
2341 |
2342 | Default filter to be applied when no specific rule matches.
2343 |
2344 |
2345 |
2346 |
2347 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
2348 |
2349 |
2350 |
2351 |
2352 |
2353 |
2354 |
2355 |
2356 |
2357 |
2358 |
2359 |
2360 | Condition to be tested.
2361 |
2362 |
2363 |
2364 |
2365 | Resulting filter to be applied when the condition matches.
2366 |
2367 |
2368 |
2369 |
2370 |
2371 |
2372 |
2373 |
2374 |
2375 |
2376 |
2377 |
2378 | Name of the target.
2379 |
2380 |
2381 |
2382 |
2383 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
2384 |
2385 |
2386 |
2387 |
2388 |
2389 |
2390 |
2391 |
2392 |
2393 |
2394 |
2395 |
2396 |
2397 |
2398 |
2399 | Name of the target.
2400 |
2401 |
2402 |
2403 |
2404 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
2405 |
2406 |
2407 |
2408 |
2409 | Number of times to repeat each log message.
2410 |
2411 |
2412 |
2413 |
2414 |
2415 |
2416 |
2417 |
2418 |
2419 |
2420 |
2421 |
2422 |
2423 |
2424 |
2425 |
2426 | Name of the target.
2427 |
2428 |
2429 |
2430 |
2431 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
2432 |
2433 |
2434 |
2435 |
2436 | Number of retries that should be attempted on the wrapped target in case of a failure.
2437 |
2438 |
2439 |
2440 |
2441 | Time to wait between retries in milliseconds.
2442 |
2443 |
2444 |
2445 |
2446 |
2447 |
2448 |
2449 |
2450 |
2451 |
2452 |
2453 |
2454 |
2455 |
2456 | Name of the target.
2457 |
2458 |
2459 |
2460 |
2461 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
2462 |
2463 |
2464 |
2465 |
2466 |
2467 |
2468 |
2469 |
2470 |
2471 |
2472 |
2473 |
2474 |
2475 |
2476 | Name of the target.
2477 |
2478 |
2479 |
2480 |
2481 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
2482 |
2483 |
2484 |
2485 |
2486 |
2487 |
2488 |
2489 |
2490 |
2491 |
2492 |
2493 |
2494 |
2495 |
2496 |
2497 |
2498 | Name of the target.
2499 |
2500 |
2501 |
2502 |
2503 | Layout used to format log messages.
2504 |
2505 |
2506 |
2507 |
2508 | Always use independent of
2509 |
2510 |
2511 |
2512 |
2513 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
2514 |
2515 |
2516 |
2517 |
2518 |
2519 |
2520 |
2521 |
2522 |
2523 |
2524 |
2525 |
2526 |
2527 |
2528 |
2529 |
2530 |
2531 |
2532 |
2533 |
2534 |
2535 |
2536 |
2537 |
2538 |
2539 |
2540 |
2541 |
2542 |
2543 | Name of the target.
2544 |
2545 |
2546 |
2547 |
2548 | Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit
2549 |
2550 |
2551 |
2552 |
2553 | Should we include the BOM (Byte-order-mark) for UTF? Influences the property. This will only work for UTF-8.
2554 |
2555 |
2556 |
2557 |
2558 | Web service method name. Only used with Soap.
2559 |
2560 |
2561 |
2562 |
2563 | Web service namespace. Only used with Soap.
2564 |
2565 |
2566 |
2567 |
2568 | Protocol to be used when calling web service.
2569 |
2570 |
2571 |
2572 |
2573 | Custom proxy address, include port separated by a colon
2574 |
2575 |
2576 |
2577 |
2578 | Encoding.
2579 |
2580 |
2581 |
2582 |
2583 | Web service URL.
2584 |
2585 |
2586 |
2587 |
2588 | Value whether escaping be done according to the old NLog style (Very non-standard)
2589 |
2590 |
2591 |
2592 |
2593 | Value whether escaping be done according to Rfc3986 (Supports Internationalized Resource Identifiers - IRIs)
2594 |
2595 |
2596 |
2597 |
2598 | Indicates whether to pre-authenticate the HttpWebRequest (Requires 'Authorization' in parameters)
2599 |
2600 |
2601 |
2602 |
2603 | Name of the root XML element, if POST of XML document chosen. If so, this property must not be null. (see and ).
2604 |
2605 |
2606 |
2607 |
2608 | (optional) root namespace of the XML document, if POST of XML document chosen. (see and ).
2609 |
2610 |
2611 |
2612 |
2613 | Proxy configuration when calling web service
2614 |
2615 |
2616 |
2617 |
2618 |
2619 |
2620 |
2621 |
2622 |
2623 |
2624 |
2625 |
2626 |
2627 |
2628 |
2629 |
2630 |
2631 |
2632 |
2633 |
2634 |
2635 |
2636 |
2637 |
2638 |
2639 |
2640 |
2641 |
2642 |
2643 |
2644 |
2645 |
2646 |
2647 |
2648 |
2649 |
2650 |
2651 |
2652 |
2653 |
2654 |
2655 |
2656 |
2657 |
2658 |
2659 |
2660 |
2661 |
2662 |
2663 |
2664 |
2665 | Footer layout.
2666 |
2667 |
2668 |
2669 |
2670 | Header layout.
2671 |
2672 |
2673 |
2674 |
2675 | Body layout (can be repeated multiple times).
2676 |
2677 |
2678 |
2679 |
2680 | Custom column delimiter value (valid when ColumnDelimiter is set to 'Custom').
2681 |
2682 |
2683 |
2684 |
2685 | Column delimiter.
2686 |
2687 |
2688 |
2689 |
2690 | Quote Character.
2691 |
2692 |
2693 |
2694 |
2695 | Quoting mode.
2696 |
2697 |
2698 |
2699 |
2700 | Indicates whether CVS should include header.
2701 |
2702 |
2703 |
2704 |
2705 |
2706 |
2707 |
2708 |
2709 |
2710 |
2711 |
2712 |
2713 |
2714 |
2715 |
2716 |
2717 |
2718 |
2719 |
2720 |
2721 |
2722 |
2723 |
2724 |
2725 |
2726 |
2727 |
2728 |
2729 |
2730 |
2731 | Layout of the column.
2732 |
2733 |
2734 |
2735 |
2736 | Name of the column.
2737 |
2738 |
2739 |
2740 |
2741 |
2742 |
2743 |
2744 |
2745 |
2746 |
2747 |
2748 |
2749 |
2750 |
2751 |
2752 |
2753 |
2754 |
2755 | List of property names to exclude when is true
2756 |
2757 |
2758 |
2759 |
2760 | Option to include all properties from the log event (as JSON)
2761 |
2762 |
2763 |
2764 |
2765 | Indicates whether to include contents of the dictionary.
2766 |
2767 |
2768 |
2769 |
2770 | Indicates whether to include contents of the dictionary.
2771 |
2772 |
2773 |
2774 |
2775 | Option to render the empty object value {}
2776 |
2777 |
2778 |
2779 |
2780 | Option to suppress the extra spaces in the output json
2781 |
2782 |
2783 |
2784 |
2785 | How far should the JSON serializer follow object references before backing off
2786 |
2787 |
2788 |
2789 |
2790 |
2791 |
2792 |
2793 |
2794 |
2795 |
2796 |
2797 |
2798 |
2799 |
2800 |
2801 | Layout that will be rendered as the attribute's value.
2802 |
2803 |
2804 |
2805 |
2806 | Name of the attribute.
2807 |
2808 |
2809 |
2810 |
2811 | Determines wether or not this attribute will be Json encoded.
2812 |
2813 |
2814 |
2815 |
2816 | Indicates whether to escape non-ascii characters
2817 |
2818 |
2819 |
2820 |
2821 | Whether an attribute with empty value should be included in the output
2822 |
2823 |
2824 |
2825 |
2826 |
2827 |
2828 |
2829 |
2830 |
2831 |
2832 |
2833 |
2834 |
2835 | Footer layout.
2836 |
2837 |
2838 |
2839 |
2840 | Header layout.
2841 |
2842 |
2843 |
2844 |
2845 | Body layout (can be repeated multiple times).
2846 |
2847 |
2848 |
2849 |
2850 |
2851 |
2852 |
2853 |
2854 |
2855 |
2856 |
2857 |
2858 |
2859 |
2860 |
2861 |
2862 |
2863 | Option to include all properties from the log events
2864 |
2865 |
2866 |
2867 |
2868 | Indicates whether to include contents of the dictionary.
2869 |
2870 |
2871 |
2872 |
2873 | Indicates whether to include contents of the dictionary.
2874 |
2875 |
2876 |
2877 |
2878 | Indicates whether to include contents of the stack.
2879 |
2880 |
2881 |
2882 |
2883 | Indicates whether to include contents of the stack.
2884 |
2885 |
2886 |
2887 |
2888 |
2889 |
2890 |
2891 |
2892 |
2893 |
2894 |
2895 |
2896 |
2897 | Layout text.
2898 |
2899 |
2900 |
2901 |
2902 |
2903 |
2904 |
2905 |
2906 |
2907 |
2908 |
2909 |
2910 |
2911 |
2912 | Action to be taken when filter matches.
2913 |
2914 |
2915 |
2916 |
2917 | Condition expression.
2918 |
2919 |
2920 |
2921 |
2922 |
2923 |
2924 |
2925 |
2926 |
2927 |
2928 |
2929 |
2930 |
2931 |
2932 |
2933 |
2934 |
2935 |
2936 |
2937 |
2938 |
2939 |
2940 |
2941 |
2942 |
2943 | Action to be taken when filter matches.
2944 |
2945 |
2946 |
2947 |
2948 | Indicates whether to ignore case when comparing strings.
2949 |
2950 |
2951 |
2952 |
2953 | Layout to be used to filter log messages.
2954 |
2955 |
2956 |
2957 |
2958 | Substring to be matched.
2959 |
2960 |
2961 |
2962 |
2963 |
2964 |
2965 |
2966 |
2967 |
2968 |
2969 |
2970 |
2971 |
2972 |
2973 |
2974 |
2975 | Action to be taken when filter matches.
2976 |
2977 |
2978 |
2979 |
2980 | String to compare the layout to.
2981 |
2982 |
2983 |
2984 |
2985 | Indicates whether to ignore case when comparing strings.
2986 |
2987 |
2988 |
2989 |
2990 | Layout to be used to filter log messages.
2991 |
2992 |
2993 |
2994 |
2995 |
2996 |
2997 |
2998 |
2999 |
3000 |
3001 |
3002 |
3003 |
3004 |
3005 |
3006 |
3007 | Action to be taken when filter matches.
3008 |
3009 |
3010 |
3011 |
3012 | Indicates whether to ignore case when comparing strings.
3013 |
3014 |
3015 |
3016 |
3017 | Layout to be used to filter log messages.
3018 |
3019 |
3020 |
3021 |
3022 | Substring to be matched.
3023 |
3024 |
3025 |
3026 |
3027 |
3028 |
3029 |
3030 |
3031 |
3032 |
3033 |
3034 |
3035 |
3036 |
3037 |
3038 |
3039 | Action to be taken when filter matches.
3040 |
3041 |
3042 |
3043 |
3044 | String to compare the layout to.
3045 |
3046 |
3047 |
3048 |
3049 | Indicates whether to ignore case when comparing strings.
3050 |
3051 |
3052 |
3053 |
3054 | Layout to be used to filter log messages.
3055 |
3056 |
3057 |
3058 |
3059 |
3060 |
3061 |
3062 |
3063 |
3064 |
3065 |
3066 |
3067 |
3068 |
3069 |
3070 |
3071 |
3072 |
3073 |
3074 |
3075 |
3076 |
3077 |
3078 | Action to be taken when filter matches.
3079 |
3080 |
3081 |
3082 |
3083 | Default number of unique filter values to expect, will automatically increase if needed
3084 |
3085 |
3086 |
3087 |
3088 | Applies the configured action to the initial logevent that starts the timeout period. Used to configure that it should ignore all events until timeout.
3089 |
3090 |
3091 |
3092 |
3093 | Layout to be used to filter log messages.
3094 |
3095 |
3096 |
3097 |
3098 | Max number of unique filter values to expect simultaneously
3099 |
3100 |
3101 |
3102 |
3103 | Max length of filter values, will truncate if above limit
3104 |
3105 |
3106 |
3107 |
3108 | How long before a filter expires, and logging is accepted again
3109 |
3110 |
3111 |
3112 |
3113 | Default buffer size for the internal buffers
3114 |
3115 |
3116 |
3117 |
3118 | Reuse internal buffers, and doesn't have to constantly allocate new buffers
3119 |
3120 |
3121 |
3122 |
3123 | Append FilterCount to the when an event is no longer filtered
3124 |
3125 |
3126 |
3127 |
3128 | Insert FilterCount value into when an event is no longer filtered
3129 |
3130 |
3131 |
3132 |
3133 |
3134 |
3135 |
3136 |
3137 |
3138 |
3139 |
3140 |
3141 |
3142 |
3143 |
3144 |
3145 |
3146 |
3147 |
3148 |
3149 |
3150 |
3151 |
3152 |
3153 |
3154 |
3155 |
3156 |
3157 |
3158 |
3159 |
3160 |
3161 |
3162 |
--------------------------------------------------------------------------------
/csharp-read-write-sheet/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Configuration;
7 |
8 | // Add nuget reference to smartsheet-csharp-sdk (https://www.nuget.org/packages/smartsheet-csharp-sdk/)
9 | using Smartsheet.Api;
10 | using Smartsheet.Api.Models;
11 | using Smartsheet.Api.OAuth;
12 |
13 | namespace csharp_read_write_sheet
14 | {
15 | class Program
16 | {
17 | // The API identifies columns by Id, but it's more convenient to refer to column names
18 | static Dictionary columnMap = new Dictionary(); // Map from friendly column name to column Id
19 |
20 | static void Main(string[] args)
21 | {
22 | // Initialize client. Uses API access token from environment variable SMARTSHEET_ACCESS_TOKEN
23 | SmartsheetClient smartsheet = new SmartsheetBuilder().Build();
24 |
25 | Sheet sheet = smartsheet.SheetResources.ImportXlsSheet("../../../Sample Sheet.xlsx", null, 0, null);
26 |
27 | // Load the entire sheet
28 | sheet = smartsheet.SheetResources.GetSheet(sheet.Id.Value, null, null, null, null, null, null, null);
29 | Console.WriteLine("Loaded " + sheet.Rows.Count + " rows from sheet: " + sheet.Name);
30 |
31 | // Build column map for later reference
32 | foreach (Column column in sheet.Columns)
33 | columnMap.Add(column.Title, (long)column.Id);
34 |
35 | // Accumulate rows needing update here
36 | List rowsToUpdate = new List();
37 |
38 | foreach (Row row in sheet.Rows)
39 | {
40 | Row rowToUpdate = evaluateRowAndBuildUpdates(row);
41 | if (rowToUpdate != null)
42 | rowsToUpdate.Add(rowToUpdate);
43 | }
44 |
45 | // Finally, write all updated cells back to Smartsheet
46 | Console.WriteLine("Writing " + rowsToUpdate.Count + " rows back to sheet id " + sheet.Id);
47 | smartsheet.SheetResources.RowResources.UpdateRows(sheet.Id.Value, rowsToUpdate);
48 | Console.WriteLine("Done (Hit enter)");
49 | Console.ReadLine();
50 | }
51 |
52 |
53 | /*
54 | * TODO: Replace the body of this loop with your code
55 | * This *example* looks for rows with a "Status" column marked "Complete" and sets the "Remaining" column to zero
56 | *
57 | * Return a new Row with updated cell values, else null to leave unchanged
58 | */
59 | static Row evaluateRowAndBuildUpdates(Row sourceRow)
60 | {
61 | Row rowToUpdate = null;
62 |
63 | // Find cell we want to examine
64 | Cell statusCell = getCellByColumnName(sourceRow, "Status");
65 | if (statusCell.DisplayValue == "Complete")
66 | {
67 | Cell remainingCell = getCellByColumnName(sourceRow, "Remaining");
68 | if (remainingCell.DisplayValue != "0") // Skip if "Remaining" is already zero
69 | {
70 | Console.WriteLine("Need to update row # " + sourceRow.RowNumber);
71 |
72 | var cellToUpdate = new Cell
73 | {
74 | ColumnId = columnMap["Remaining"],
75 | Value = 0
76 | };
77 |
78 | var cellsToUpdate = new List();
79 | cellsToUpdate.Add(cellToUpdate);
80 |
81 | rowToUpdate = new Row
82 | {
83 | Id = sourceRow.Id,
84 | Cells = cellsToUpdate
85 | };
86 | }
87 | }
88 | return rowToUpdate;
89 | }
90 |
91 |
92 | // Helper function to find cell in a row
93 | static Cell getCellByColumnName(Row row, string columnName)
94 | {
95 | return row.Cells.First(cell => cell.ColumnId == columnMap[columnName]);
96 | }
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/csharp-read-write-sheet/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("csharp-read-write-sheet")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("csharp-read-write-sheet")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("9182c1c0-a3bf-41e4-a3aa-61ce8b8bd475")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/csharp-read-write-sheet/csharp-read-write-sheet.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {9182C1C0-A3BF-41E4-A3AA-61CE8B8BD475}
8 | Exe
9 | Properties
10 | csharp_read_write_sheet
11 | csharp-read-write-sheet
12 | v4.5.2
13 | 512
14 | true
15 |
16 |
17 | AnyCPU
18 | true
19 | full
20 | false
21 | bin\Debug\
22 | DEBUG;TRACE
23 | prompt
24 | 4
25 |
26 |
27 | AnyCPU
28 | pdbonly
29 | true
30 | bin\Release\
31 | TRACE
32 | prompt
33 | 4
34 |
35 |
36 |
37 | ..\..\smartsheet-csharp-sdk\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
38 | True
39 |
40 |
41 | ..\..\smartsheet-csharp-sdk\packages\NLog.4.5.3\lib\net45\NLog.dll
42 | True
43 |
44 |
45 | ..\..\smartsheet-csharp-sdk\packages\RestSharp.106.2.2\lib\net452\RestSharp.dll
46 | True
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | ..\..\smartsheet-csharp-sdk\bin\Debug\smartsheet-csharp-sdk.dll
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | Designer
74 |
75 |
76 |
77 | PreserveNewest
78 |
79 |
80 |
81 |
82 |
89 |
--------------------------------------------------------------------------------
/csharp-read-write-sheet/icons/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/smartsheet-samples/csharp-read-write-sheet/9bb978b42061264e8fcf1a6b53ba4f05d8665851/csharp-read-write-sheet/icons/logo.png
--------------------------------------------------------------------------------
/csharp-read-write-sheet/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/license.md:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # ⚠️ Notice: this repository has been deprecated ⚠️
2 |
3 | This .NET 4 sample has been replaced with the new .NET Core Smartsheet C# SDK and can be accessed [here](https://github.com/smartsheet/smartsheet-csharp-sdk/tree/mainline/sdk-csharp-sample-net80)
4 |
5 | ## See also
6 | - https://github.com/smartsheet/smartsheet-csharp-sdk
7 | - https://smartsheet.redoc.ly
8 | - https://www.smartsheet.com/
9 |
10 |
11 |
12 | ---
13 | ---
14 |
15 | ## csharp-read-write-sheet
16 |
17 | This is a minimal Smartsheet sample that demonstrates how to
18 | * Import a sheet
19 | * Load a sheet
20 | * Loop through the rows
21 | * Check for rows that meet a criteria
22 | * Update cell values
23 | * Write the results back to the original sheet
24 |
25 |
26 | This sample scans a sheet for rows where the value of the "Status" column is "Complete" and sets the "Remaining" column to zero.
27 | This is implemented in the `evaluateRowAndBuildUpdates()` method which you should modify to meet your needs.
28 |
29 |
30 | ## Setup
31 | Set the system environment variable `SMARTSHEET_ACCESS_TOKEN` to the value of your access token, obtained from the Smartsheet Account button, under Personal settings.
32 |
33 | Build and run the application.
34 |
35 | The rows marked "Complete" will have the "Remaining" value set to 0. (Note that you will have to refresh in the desktop application to see the changes)
36 |
37 |
--------------------------------------------------------------------------------
|