-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClearScript.Core.xml
4984 lines (4984 loc) · 287 KB
/
ClearScript.Core.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
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
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
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
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
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
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
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
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0"?>
<doc>
<assembly>
<name>ClearScript.Core</name>
</assembly>
<members>
<member name="T:Microsoft.ClearScript.AsyncDocumentLoadCallback">
<summary>
Represents a method to be called asynchronously when a document is loaded.
</summary>
<param name="info">A structure containing meta-information for the document.</param>
<param name="contents">A stream that provides read access to the document.</param>
<returns>A task that represents the method's asynchronous operation.</returns>
<remarks>
The callback can modify the document meta-information by specifying or overriding any of
its mutable properties.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.ContinuationCallback">
<summary>
Represents a method that specifies to a script engine whether script execution should continue.
</summary>
<returns><c>True</c> to continue script execution, <c>false</c> to interrupt it.</returns>
<c><seealso cref="P:Microsoft.ClearScript.ScriptEngine.ContinuationCallback"/></c>
</member>
<member name="T:Microsoft.ClearScript.CustomAttributeLoader">
<summary>
Represents a custom attribute loader.
</summary>
</member>
<member name="M:Microsoft.ClearScript.CustomAttributeLoader.#ctor">
<summary>
Initializes a new <c><see cref="T:Microsoft.ClearScript.CustomAttributeLoader"/></c> instance.
</summary>
</member>
<member name="P:Microsoft.ClearScript.CustomAttributeLoader.Default">
<summary>
Gets the default custom attribute loader.
</summary>
</member>
<member name="M:Microsoft.ClearScript.CustomAttributeLoader.LoadCustomAttributes``1(System.Reflection.ICustomAttributeProvider,System.Boolean)">
<summary>
Loads custom attributes of the specified type for the given resource.
</summary>
<typeparam name="T">The type, or a base type, of the custom attributes to load.</typeparam>
<param name="resource">The resource for which to load custom attributes of type <typeparamref name="T"/>.</param>
<param name="inherit"><c>True</c> to include custom attributes of type <typeparamref name="T"/> defined for ancestors of <paramref name="resource"/>, <c>false</c> otherwise.</param>
<returns>An array of custom attributes of type <typeparamref name="T"/>.</returns>.
<remarks>
This method is performance-critical. Overrides must not invoke script engine methods or
other ClearScript functionality. The base implementation loads custom attributes via
reflection.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.DefaultDocumentLoader">
<summary>
Provides a default <c><see cref="T:Microsoft.ClearScript.DocumentLoader"></see></c> implementation.
</summary>
</member>
<member name="M:Microsoft.ClearScript.DefaultDocumentLoader.#ctor">
<summary>
Initializes a new <c><see cref="T:Microsoft.ClearScript.DefaultDocumentLoader"/></c> instance.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DefaultDocumentLoader.MaxCacheSize">
<inheritdoc/>
</member>
<member name="M:Microsoft.ClearScript.DefaultDocumentLoader.LoadDocumentAsync(Microsoft.ClearScript.DocumentSettings,System.Nullable{Microsoft.ClearScript.DocumentInfo},System.String,Microsoft.ClearScript.DocumentCategory,Microsoft.ClearScript.DocumentContextCallback)">
<inheritdoc/>
</member>
<member name="M:Microsoft.ClearScript.DefaultDocumentLoader.GetCachedDocument(System.Uri)">
<inheritdoc/>
</member>
<member name="M:Microsoft.ClearScript.DefaultDocumentLoader.CacheDocument(Microsoft.ClearScript.Document,System.Boolean)">
<inheritdoc/>
</member>
<member name="M:Microsoft.ClearScript.DefaultDocumentLoader.DiscardCachedDocuments">
<inheritdoc/>
</member>
<member name="T:Microsoft.ClearScript.DefaultScriptUsageAttribute">
<summary>
Specifies defaults for how type members are to be exposed to script code.
</summary>
<remarks>
This attribute is applicable to classes, enums, interfaces, structs, and assemblies. Use
<c><see cref="T:Microsoft.ClearScript.ScriptUsageAttribute"/></c>, <c><see cref="T:Microsoft.ClearScript.ScriptMemberAttribute"/></c>, or
<c><see cref="T:Microsoft.ClearScript.NoScriptAccessAttribute"/></c> to override it for individual type members.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DefaultScriptUsageAttribute.#ctor">
<summary>
Initializes a new <c><see cref="T:Microsoft.ClearScript.DefaultScriptUsageAttribute"/></c> instance.
</summary>
</member>
<member name="M:Microsoft.ClearScript.DefaultScriptUsageAttribute.#ctor(Microsoft.ClearScript.ScriptAccess)">
<summary>
Initializes a new <c><see cref="T:Microsoft.ClearScript.DefaultScriptUsageAttribute"/></c> instance with the specified default script access setting.
</summary>
<param name="access">The default script access setting for type members.</param>
</member>
<member name="P:Microsoft.ClearScript.DefaultScriptUsageAttribute.Access">
<summary>
Gets the default script access setting for type members.
</summary>
</member>
<member name="T:Microsoft.ClearScript.Document">
<summary>
Provides an abstract representation of a document.
</summary>
</member>
<member name="M:Microsoft.ClearScript.Document.#ctor">
<summary>
Initializes a new <c><see cref="T:Microsoft.ClearScript.Document"/></c> instance.
</summary>
</member>
<member name="P:Microsoft.ClearScript.Document.Info">
<summary>
Gets a structure containing meta-information for the document.
</summary>
</member>
<member name="P:Microsoft.ClearScript.Document.Contents">
<summary>
Gets a stream that provides read access to the document.
</summary>
</member>
<member name="P:Microsoft.ClearScript.Document.Encoding">
<summary>
Gets the document's character encoding.
</summary>
<remarks>
This property returns <c>null</c> if the document contains binary data or if its
character encoding is unknown.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.DocumentAccessFlags">
<summary>
Defines document access options.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentAccessFlags.None">
<summary>
Specifies that no options are selected.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentAccessFlags.EnableFileLoading">
<summary>
Specifies that documents may be loaded from the file system.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentAccessFlags.EnableWebLoading">
<summary>
Specifies that documents may be downloaded from the Web.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentAccessFlags.EnableAllLoading">
<summary>
Specifies that documents may be loaded from any location.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentAccessFlags.EnforceRelativePrefix">
<summary>
Specifies that a document path must begin with a segment of "." or ".." to be
considered a relative path. By default, any path that is not explicitly a top-level
or root path is eligible.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentAccessFlags.AllowCategoryMismatch">
<summary>
Relaxes the requirement that a loaded document must be of the requested category.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentAccessFlags.UseAsyncLoadCallback">
<summary>
Enables the use of <c><see cref="P:Microsoft.ClearScript.DocumentSettings.AsyncLoadCallback"/></c> instead of <c><see cref="P:Microsoft.ClearScript.DocumentSettings.LoadCallback"/></c>.
</summary>
</member>
<member name="T:Microsoft.ClearScript.DocumentCategory">
<summary>
Represents a document category.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentCategory.MaxCacheSize">
<summary>
Gets or sets the maximum cache size for the document category.
</summary>
<remarks>
<para>
This property specifies the maximum number of prepared or compiled documents of the
current category to be cached by script engines. Its initial value is 1024.
</para>
<para>
Each script engine or runtime maintains private caches for supported document
categories. These are distinct from the caches used by document loaders.
</para>
</remarks>
<c><seealso cref="P:Microsoft.ClearScript.DocumentLoader.MaxCacheSize"/></c>
</member>
<member name="P:Microsoft.ClearScript.DocumentCategory.Script">
<summary>
Gets the document category for normal scripts.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentCategory.Json">
<summary>
Gets the document category for JSON documents.
</summary>
</member>
<member name="T:Microsoft.ClearScript.DocumentContextCallback">
<summary>
Represents a method that retrieves context information for a document.
</summary>
<param name="info">A structure containing meta-information for the document.</param>
<returns>A property collection containing context information for the document.</returns>
</member>
<member name="T:Microsoft.ClearScript.DocumentFlags">
<summary>
Defines document attributes.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentFlags.None">
<summary>
Indicates that no attributes are present.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentFlags.IsTransient">
<summary>
Indicates that the document is temporary and can be discarded after use. Only Windows
Script engines honor this attribute.
</summary>
</member>
<member name="F:Microsoft.ClearScript.DocumentFlags.AwaitDebuggerAndPause">
<summary>
Specifies that the script engine is to wait for a debugger connection and schedule a
pause before executing the first line of the document. Windows Script engines do not
honor this attribute. For it to be effective, debugging features must be enabled, a
debugger must not already be connected, and the script engine must not already have
waited for a debugger connection.
</summary>
</member>
<member name="T:Microsoft.ClearScript.DocumentInfo">
<summary>
Contains meta-information for a document.
</summary>
</member>
<member name="M:Microsoft.ClearScript.DocumentInfo.#ctor(System.String)">
<summary>
Initializes a new <c><see cref="T:Microsoft.ClearScript.DocumentInfo"/></c> structure with the specified document name.
</summary>
<param name="name">The document name.</param>
</member>
<member name="M:Microsoft.ClearScript.DocumentInfo.#ctor(System.Uri)">
<summary>
Initializes a new <c><see cref="T:Microsoft.ClearScript.DocumentInfo"/></c> structure with the specified document URI.
</summary>
<param name="uri">The document URI.</param>
</member>
<member name="P:Microsoft.ClearScript.DocumentInfo.Name">
<summary>
Gets the document's name.
</summary>
<remarks>
This property always returns a non-blank string. If a null or blank document name was
specified at instantiation time, this property returns a default document name.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.DocumentInfo.Uri">
<summary>
Gets the document's URI.
</summary>
<remarks>
This property returns <c>null</c> if a URI was not specified at instantiation time.
</remarks>
</member>
<member name="P:Microsoft.ClearScript.DocumentInfo.SourceMapUri">
<summary>
Gets or sets an optional source map URI for the document.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentInfo.Category">
<summary>
Gets or sets the document's category.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentInfo.Flags">
<summary>
Gets or sets optional document attributes.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentInfo.ContextCallback">
<summary>
Gets or sets an optional context callback for the document.
</summary>
<remarks>
<para>
This property currently applies only to modules. If specified, the callback is invoked
the first time the module attempts to retrieve its context information. The properties
it returns are made available to the module implementation. This mechanism can be used
to expose host resources selectively, securely, and without polluting the script
engine's global namespace.
</para>
<para>
Use
<c><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta">import.meta</see></c>
to access the context information of a <c><see cref="P:Microsoft.ClearScript.JavaScript.ModuleCategory.Standard"/></c> JavaScript
module. In a <c><see cref="P:Microsoft.ClearScript.JavaScript.ModuleCategory.CommonJS"/></c> module, use <c>module.meta</c>.
</para>
</remarks>
</member>
<member name="T:Microsoft.ClearScript.DocumentLoadCallback">
<summary>
Represents a method to be called when a document is loaded.
</summary>
<param name="info">A structure containing meta-information for the document.</param>
<remarks>
The callback can modify the document meta-information by specifying or overriding any of
its mutable properties.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.DocumentLoader">
<summary>
Represents a document loader.
</summary>
</member>
<member name="M:Microsoft.ClearScript.DocumentLoader.#ctor">
<summary>
Initializes a new <c><see cref="T:Microsoft.ClearScript.DocumentLoader"/></c> instance.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentLoader.Default">
<summary>
Gets the default document loader.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentLoader.MaxCacheSize">
<summary>
Gets or sets the maximum size of the document loader's cache.
</summary>
<remarks>
This property specifies the maximum number of documents to be cached by the document
loader. For the default document loader, its initial value is 1024.
</remarks>
<c><seealso cref="P:Microsoft.ClearScript.DocumentLoader.Default"/></c>
</member>
<member name="M:Microsoft.ClearScript.DocumentLoader.LoadDocument(Microsoft.ClearScript.DocumentSettings,System.Nullable{Microsoft.ClearScript.DocumentInfo},System.String,Microsoft.ClearScript.DocumentCategory,Microsoft.ClearScript.DocumentContextCallback)">
<summary>
Loads a document.
</summary>
<param name="settings">Document access settings for the operation.</param>
<param name="sourceInfo">An optional structure containing meta-information for the requesting document.</param>
<param name="specifier">A string specifying the document to be loaded.</param>
<param name="category">An optional category for the requested document.</param>
<param name="contextCallback">An optional context callback for the requested document.</param>
<returns>A <c><see cref="T:Microsoft.ClearScript.Document"/></c> instance that represents the loaded document.</returns>
<remarks>
A loaded document must have an absolute <see cref="P:Microsoft.ClearScript.DocumentInfo.Uri">URI</see>. Once a
load operation has completed successfully, subsequent requests that resolve to the same
URI are expected to return the same <c><see cref="T:Microsoft.ClearScript.Document"/></c> reference, although loaders
are not required to manage document caches of unlimited size.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentLoader.LoadDocumentAsync(Microsoft.ClearScript.DocumentSettings,System.Nullable{Microsoft.ClearScript.DocumentInfo},System.String,Microsoft.ClearScript.DocumentCategory,Microsoft.ClearScript.DocumentContextCallback)">
<summary>
Loads a document asynchronously.
</summary>
<param name="settings">Document access settings for the operation.</param>
<param name="sourceInfo">An optional structure containing meta-information for the requesting document.</param>
<param name="specifier">A string specifying the document to be loaded.</param>
<param name="category">An optional category for the requested document.</param>
<param name="contextCallback">An optional context callback for the requested document.</param>
<returns>A task that represents the asynchronous operation. Upon completion, the task's result is a <c><see cref="T:Microsoft.ClearScript.Document"/></c> instance that represents the loaded document.</returns>
<remarks>
A loaded document must have an absolute <see cref="P:Microsoft.ClearScript.DocumentInfo.Uri">URI</see>. Once a
load operation has completed successfully, subsequent requests that resolve to the same
URI are expected to return the same <c><see cref="T:Microsoft.ClearScript.Document"/></c> reference, although loaders
are not required to manage document caches of unlimited size.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentLoader.GetCachedDocument(System.Uri)">
<summary>
Searches for a cached document by <see cref="P:Microsoft.ClearScript.DocumentInfo.Uri">URI</see>.
</summary>
<param name="uri">The document URI for which to search.</param>
<returns>The cached document if it was found, <c>null</c> otherwise.</returns>
</member>
<member name="M:Microsoft.ClearScript.DocumentLoader.CacheDocument(Microsoft.ClearScript.Document,System.Boolean)">
<summary>
Stores a document in the cache.
</summary>
<param name="document">The document to store in the cache.</param>
<param name="replace"><c>True</c> to replace any existing document with the same URI, <c>false</c> otherwise.</param>
<returns>The cached document, which may be different from <paramref name="document"/> if <paramref name="replace"/> is <c>false</c>.</returns>
<remarks>
A cached document must have an absolute <see cref="P:Microsoft.ClearScript.DocumentInfo.Uri">URI</see>.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentLoader.DiscardCachedDocuments">
<summary>
Discards all cached documents.
</summary>
</member>
<member name="T:Microsoft.ClearScript.DocumentSettings">
<summary>
Represents a document access configuration.
</summary>
<remarks>
This class can be extended to accommodate custom document loaders.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentSettings.#ctor">
<summary>
Initializes a new <c><see cref="T:Microsoft.ClearScript.DocumentSettings"/></c> instance.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentSettings.Loader">
<summary>
Gets or sets a document loader.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentSettings.AccessFlags">
<summary>
Gets or sets document access options.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentSettings.SearchPath">
<summary>
Gets or sets a semicolon-delimited list of directory URLs or paths to search for documents.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentSettings.FileNameExtensions">
<summary>
Gets or sets a semicolon-delimited list of supported file name extensions.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentSettings.LoadCallback">
<summary>
Gets or set an optional method to be called when a document is loaded.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentSettings.AsyncLoadCallback">
<summary>
Gets or set an optional method to be called asynchronously when a document is loaded.
</summary>
</member>
<member name="P:Microsoft.ClearScript.DocumentSettings.ContextCallback">
<summary>
Gets or sets an optional document context callback.
</summary>
<remarks>
<para>
This property is used as an alternative to <c><see cref="P:Microsoft.ClearScript.DocumentInfo.ContextCallback"/></c>.
If specified, the callback is invoked the first time a module attempts to retrieve its
context information. The properties it returns are made available to the module
implementation. This mechanism can be used to expose host resources selectively,
securely, and without polluting the script engine's global namespace.
</para>
<para>
Use
<c><see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import.meta">import.meta</see></c>
to access the context information of a <c><see cref="P:Microsoft.ClearScript.JavaScript.ModuleCategory.Standard"/></c> JavaScript
module. In a <c><see cref="P:Microsoft.ClearScript.JavaScript.ModuleCategory.CommonJS"/></c> module, use <c>module.meta</c>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentSettings.AddSystemDocument(System.String,System.String)">
<summary>
Adds a system document to the configuration.
</summary>
<param name="identifier">An identifier for the document.</param>
<param name="contents">A string containing the document's contents.</param>
<remarks>
System documents take precedence over loaded documents. Once this method is invoked,
document access using this configuration will always map the combination of
<paramref name="identifier"/> and <c><see cref="P:Microsoft.ClearScript.DocumentCategory.Script"/></c> to the
specified document, bypassing the configuration's document loader.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentSettings.AddSystemDocument(System.String,Microsoft.ClearScript.DocumentCategory,System.String)">
<summary>
Adds a system document with the specified category to the configuration.
</summary>
<param name="identifier">An identifier for the document.</param>
<param name="category">An optional category for the document.</param>
<param name="contents">A string containing the document's contents.</param>
<remarks>
System documents take precedence over loaded documents. Once this method is invoked,
document access using this configuration will always map the combination of
<paramref name="identifier"/> and <paramref name="category"/> to the specified
document, bypassing the configuration's document loader.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentSettings.AddSystemDocument(System.String,Microsoft.ClearScript.DocumentCategory,System.String,Microsoft.ClearScript.DocumentContextCallback)">
<summary>
Adds a system document with the specified category and context callback to the configuration.
</summary>
<param name="identifier">An identifier for the document.</param>
<param name="category">An optional category for the document.</param>
<param name="contents">A string containing the document's contents.</param>
<param name="contextCallback">An optional context callback for the document.</param>
<remarks>
System documents take precedence over loaded documents. Once this method is invoked,
document access using this configuration will always map the combination of
<paramref name="identifier"/> and <paramref name="category"/> to the specified
document, bypassing the configuration's document loader.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.DocumentSettings.AddSystemDocument(System.String,Microsoft.ClearScript.Document)">
<summary>
Adds the specified document as a system document to the configuration.
</summary>
<param name="identifier">An identifier for the document.</param>
<param name="document">The document to be added as a system document.</param>
<remarks>
System documents take precedence over loaded documents. Once this method is invoked,
document access using this configuration will always map the combination of
<paramref name="identifier"/> and the specified document's category to the specified
document, bypassing the configuration's document loader.
</remarks>
</member>
<member name="T:Microsoft.ClearScript.DynamicHostObject">
<summary>
Extends <c><see cref="T:System.Dynamic.DynamicObject"/></c> for enhanced behavior and performance in a scripting environment.
</summary>
</member>
<member name="M:Microsoft.ClearScript.DynamicHostObject.#ctor">
<summary>
Initializes a new <c><see cref="T:Microsoft.ClearScript.DynamicHostObject"/></c> instance.
</summary>
</member>
<member name="M:Microsoft.ClearScript.DynamicHostObject.HasMember(System.String,System.Boolean)">
<summary>
Determines whether the object has the specified named member.
</summary>
<param name="name">The member name for which to search.</param>
<param name="ignoreCase"><c>True</c> to perform a case-insensitive search, <c>false</c> otherwise.</param>
<returns><c>True</c> if the named member was found, <c>false</c> otherwise.</returns>
</member>
<member name="T:Microsoft.ClearScript.ExtendedHostFunctions">
<summary>
Provides optional script-callable utility functions. This extended version allows script
code to import host types.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.#ctor">
<summary>
Initializes a new <c><see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/></c> instance.
</summary>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])">
<summary>
Imports a host type by name.
</summary>
<param name="name">The fully qualified name of the host type to import.</param>
<param name="hostTypeArgs">Optional generic type arguments.</param>
<returns>The imported host type.</returns>
<remarks>
<para>
Host types are imported in the form of objects whose properties and methods are bound
to the host type's static members and nested types. If <paramref name="name"/> refers
to a generic type, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see
<c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">AddHostObject</see></c>.
</para>
</remarks>
<example>
The following code imports the
<c><see href="https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.dictionary-2">Dictionary</see></c>
generic type and uses it to create a string dictionary.
It assumes that an instance of <c><see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/></c> is exposed under
the name "host"
(see <c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see></c>).
<code lang="JavaScript">
var DictT = host.type("System.Collections.Generic.Dictionary");
var StringT = host.type("System.String");
var dict = host.newObj(DictT(StringT, StringT));
</code>
Another way to create a string dictionary is to import the specific type directly.
<code lang="JavaScript">
var StringT = host.type("System.String");
var StringDictT = host.type("System.Collections.Generic.Dictionary", StringT, StringT);
var dict = host.newObj(StringDictT);
</code>
</example>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.String,System.Object[])">
<summary>
Imports a host type by name from the specified assembly.
</summary>
<param name="name">The fully qualified name of the host type to import.</param>
<param name="assemblyName">The name of the assembly that contains the host type to import.</param>
<param name="hostTypeArgs">Optional generic type arguments.</param>
<returns>The imported host type.</returns>
<remarks>
<para>
Host types are imported in the form of objects whose properties and methods are bound
to the host type's static members and nested types. If <paramref name="name"/> refers
to a generic type, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see
<c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">AddHostObject</see></c>.
</para>
</remarks>
<example>
The following code imports <c><see cref="T:System.Linq.Enumerable"/></c> and uses it to create
an array of strings.
It assumes that an instance of <c><see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/></c> is exposed under
the name "host"
(see <c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see></c>).
<code lang="JavaScript">
var EnumerableT = host.type("System.Linq.Enumerable", "System.Core");
var Int32T = host.type("System.Int32");
var StringT = host.type("System.String");
var SelectorT = host.type("System.Func", Int32T, StringT);
var selector = host.del(SelectorT, function (num) { return StringT.Format("The number is {0}.", num); });
var array = EnumerableT.Range(0, 5).Select(selector).ToArray();
</code>
</example>
<c><seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/></c>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.Type)">
<summary>
Imports the host type for the specified <c><see cref="T:System.Type"/></c>.
</summary>
<param name="type">The <c><see cref="T:System.Type"/></c> that specifies the host type to import.</param>
<returns>The imported host type.</returns>
<remarks>
<para>
Host types are imported in the form of objects whose properties and methods are bound
to the host type's static members and nested types. If <paramref name="type"/> refers
to a generic type, the corresponding object will be invocable with type arguments to
yield a specific type.
</para>
<para>
For more information about the mapping between host members and script-callable
properties and methods, see
<c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">AddHostObject</see></c>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.arrType``1(System.Int32)">
<summary>
Imports the host array type for the specified element type.
</summary>
<typeparam name="T">The element type for the host array type to import.</typeparam>
<param name="rank">The number of dimensions for the host array type to import.</param>
<returns>The imported host array type.</returns>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.lib(System.String[])">
<summary>
Imports types from one or more host assemblies.
</summary>
<param name="assemblyNames">The names of the assemblies that contain the types to import.</param>
<returns>The imported host type collection.</returns>
<remarks>
Host type collections provide convenient scriptable access to all the types defined in one
or more host assemblies. They are hierarchical collections where leaf nodes represent types
and parent nodes represent namespaces. For example, if an assembly contains a type named
"Acme.Gadgets.Button", the corresponding collection will have a property named "Acme" whose
value is an object with a property named "Gadgets" whose value is an object with a property
named "Button" whose value represents the <c>Acme.Gadgets.Button</c> host type.
</remarks>
<example>
The following code imports types from several core assemblies and uses
<c><see cref="T:System.Linq.Enumerable"/></c> to create an array of integers.
It assumes that an instance of <c><see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/></c> is exposed under
the name "host"
(see <c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see></c>).
<code lang="JavaScript">
var clr = host.lib("mscorlib", "System", "System.Core");
var array = clr.System.Linq.Enumerable.Range(0, 5).ToArray();
</code>
</example>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.lib(Microsoft.ClearScript.HostTypeCollection,System.String[])">
<summary>
Imports types from one or more host assemblies and merges them with an existing host type collection.
</summary>
<param name="collection">The host type collection with which to merge types from the specified assemblies.</param>
<param name="assemblyNames">The names of the assemblies that contain the types to import.</param>
<returns>A host type collection: <paramref name="collection"/> if it is not <c>null</c>, a new host type collection otherwise.</returns>
<remarks>
Host type collections provide convenient scriptable access to all the types defined in one
or more host assemblies. They are hierarchical collections where leaf nodes represent types
and parent nodes represent namespaces. For example, if an assembly contains a type named
"Acme.Gadgets.Button", the corresponding collection will have a property named "Acme" whose
value is an object with a property named "Gadgets" whose value is an object with a property
named "Button" whose value represents the <c>Acme.Gadgets.Button</c> host type.
</remarks>
<example>
The following code imports types from several core assemblies and uses
<c><see cref="T:System.Linq.Enumerable"/></c> to create an array of integers.
It assumes that an instance of <c><see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/></c> is exposed under
the name "host"
(see <c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see></c>).
<code lang="JavaScript">
var clr = host.lib("mscorlib");
host.lib(clr, "System");
host.lib(clr, "System.Core");
var array = clr.System.Linq.Enumerable.Range(0, 5).ToArray();
</code>
</example>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.comType(System.String,System.String)">
<summary>
Imports a COM/ActiveX type.
</summary>
<param name="progID">The programmatic identifier (ProgID) of the registered class to import.</param>
<param name="serverName">An optional name that specifies the server from which to import the type.</param>
<returns>The imported COM/ActiveX type.</returns>
<remarks>
The <paramref name="progID"/> argument can be a class identifier (CLSID) in standard
GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
</remarks>
<example>
The following code imports the
<c><see href="https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/windows-scripting/x4k5wbx4(v=vs.84)">Scripting.Dictionary</see></c>
class and uses it to create and populate an instance.
It assumes that an instance of <c><see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/></c> is exposed under
the name "host"
(see <c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see></c>).
<code lang="JavaScript">
var DictT = host.comType('Scripting.Dictionary');
var dict = host.newObj(DictT);
dict.Add('foo', 123);
dict.Add('bar', 456.789);
dict.Add('baz', 'abc');
</code>
</example>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.newComObj(System.String,System.String)">
<summary>
Creates a COM/ActiveX object of the specified type.
</summary>
<param name="progID">The programmatic identifier (ProgID) of the registered class to instantiate.</param>
<param name="serverName">An optional name that specifies the server on which to create the object.</param>
<returns>A new COM/ActiveX object of the specified type.</returns>
<remarks>
The <paramref name="progID"/> argument can be a class identifier (CLSID) in standard
GUID format with braces (e.g., "{0D43FE01-F093-11CF-8940-00A0C9054228}").
</remarks>
<example>
The following code creates a
<c><see href="https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/windows-scripting/6kxy1a51(v=vs.84)">Scripting.FileSystemObject</see></c>
instance and uses it to list the drives on the local machine.
It assumes that an instance of <c><see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/></c> is exposed under
the name "host"
(see <c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see></c>).
<code lang="JavaScript">
var fso = host.newComObj('Scripting.FileSystemObject');
var ConsoleT = host.type('System.Console');
for (en = fso.Drives.GetEnumerator(); en.MoveNext();) {
ConsoleT.WriteLine(en.Current.Path);
}
</code>
</example>
</member>
<member name="M:Microsoft.ClearScript.ExtendedHostFunctions.typeLibEnums``1(``0,Microsoft.ClearScript.HostTypeCollection)">
<summary>
Imports enumerations defined within or referenced from a COM/ActiveX type library.
</summary>
<typeparam name="T">The imported type whose parent library is to be searched for relevant enumerations.</typeparam>
<param name="obj">An instance of the representative type.</param>
<param name="collection">An optional host type collection with which to merge the imported enumerations.</param>
<returns>A host type collection: <paramref name="collection"/> if it is not <c>null</c>, a new host type collection otherwise.</returns>
</member>
<member name="T:Microsoft.ClearScript.Extensions">
<summary>
Defines extension methods for use with all script engines.
</summary>
</member>
<member name="M:Microsoft.ClearScript.Extensions.ToHostType(System.Type)">
<summary>
Converts a type to a host type for use with script code currently running on the
calling thread.
</summary>
<param name="type">The type to convert to a host type.</param>
<returns>A host type for use with script code.</returns>
</member>
<member name="M:Microsoft.ClearScript.Extensions.ToHostType(System.Type,Microsoft.ClearScript.ScriptEngine)">
<summary>
Converts a type to a host type for use with script code running in the specified
script engine.
</summary>
<param name="type">The type to convert to a host type.</param>
<param name="engine">The script engine in which the host type will be used.</param>
<returns>A host type for use with script code.</returns>
</member>
<member name="M:Microsoft.ClearScript.Extensions.ToRestrictedHostObject``1(``0)">
<summary>
Converts an object to a host object with the specified type restriction, for use with
script code currently running on the calling thread.
</summary>
<typeparam name="T">The type whose members are to be made accessible from script code.</typeparam>
<param name="target">The object to convert to a host object for use with script code.</param>
<returns>A host object with the specified type restriction.</returns>
</member>
<member name="M:Microsoft.ClearScript.Extensions.ToRestrictedHostObject``1(``0,Microsoft.ClearScript.ScriptEngine)">
<summary>
Converts an object to a host object with the specified type restriction, for use with
script code running in the specified script engine.
</summary>
<typeparam name="T">The type whose members are to be made accessible from script code.</typeparam>
<param name="target">The object to convert to a host object for use with script code.</param>
<param name="engine">The script engine in which the host object will be used.</param>
<returns>A host object with the specified type restriction.</returns>
</member>
<member name="M:Microsoft.ClearScript.Extensions.ToRestrictedHostObject(System.Object,System.Type)">
<summary>
Converts an object to a host object with a type restriction specified as a
<see cref="T:System.Type"/> instance, for use with script code currently running on the calling
thread.
</summary>
<param name="target">The object to convert to a host object for use with script code.</param>
<param name="type">The type whose members are to be made accessible from script code.</param>
<returns>A host object with the specified type restriction.</returns>
</member>
<member name="M:Microsoft.ClearScript.Extensions.ToRestrictedHostObject(System.Object,System.Type,Microsoft.ClearScript.ScriptEngine)">
<summary>
Converts an object to a host object with a type restriction specified as a
<see cref="T:System.Type"/> instance, for use with script code running in the specified script
engine.
</summary>
<param name="target">The object to convert to a host object for use with script code.</param>
<param name="type">The type whose members are to be made accessible from script code.</param>
<param name="engine">The script engine in which the host object will be used.</param>
<returns>A host object with the specified type restriction.</returns>
</member>
<member name="T:Microsoft.ClearScript.EventSource">
<summary>
Provides the base implementation for a host event source.
</summary>
</member>
<member name="M:Microsoft.ClearScript.EventSource.connect(System.Object)">
<summary>
Connects the host event source to the specified script handler function.
</summary>
<param name="scriptFunc">The script function that will handle the event.</param>
<returns>An <c><see cref="T:Microsoft.ClearScript.EventConnection"/></c> that represents the connection.</returns>
</member>
<member name="T:Microsoft.ClearScript.EventSource`1">
<summary>
Represents a host event source.
</summary>
<typeparam name="T">The event handler delegate type.</typeparam>
</member>
<member name="M:Microsoft.ClearScript.EventSource`1.connect(System.Object)">
<summary>
Connects the host event source to the specified script handler function.
</summary>
<param name="scriptFunc">The script function that will handle the event.</param>
<returns>An <c><see cref="T:Microsoft.ClearScript.EventConnection`1"/></c> that represents the connection.</returns>
</member>
<member name="T:Microsoft.ClearScript.EventConnection">
<summary>
Provides the base implementation for a connection between a host event source and a script handler function.
</summary>
</member>
<member name="M:Microsoft.ClearScript.EventConnection.disconnect">
<summary>
Disconnects the host event source from the script handler function.
</summary>
</member>
<member name="T:Microsoft.ClearScript.EventConnection`1">
<summary>
Represents a connection between a host event source and a script handler function.
</summary>
<typeparam name="T">The event handler delegate type.</typeparam>
</member>
<member name="T:Microsoft.ClearScript.HostFunctions">
<summary>
Provides optional script-callable utility functions.
</summary>
<remarks>
Use <c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see></c> to expose a
<c>HostFunctions</c> instance to script code. Each instance can only be exposed in one
script engine.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.#ctor">
<summary>
Initializes a new <c><see cref="T:Microsoft.ClearScript.HostFunctions"/></c> instance.
</summary>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.newObj">
<summary>
Creates an empty host object.
</summary>
<returns>A new empty host object.</returns>
<remarks>
This function is provided for script languages that do not support external
instantiation. It creates an object that supports dynamic property addition and
removal. The host can manipulate it via the <c><see cref="T:Microsoft.ClearScript.IPropertyBag"/></c> interface.
</remarks>
<example>
The following code creates an empty host object and adds several properties to it.
It assumes that an instance of <c><see cref="T:Microsoft.ClearScript.HostFunctions"/></c> is exposed under
the name "host"
(see <c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see></c>).
<code lang="JavaScript">
var item = host.newObj();
item.label = "Widget";
item.weight = 123.45;
</code>
</example>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.newObj``1(System.Object[])">
<summary>
Creates a host object of the specified type. This version is invoked if the specified
type can be used as a type argument.
</summary>
<typeparam name="T">The type of object to create.</typeparam>
<param name="args">Optional constructor arguments.</param>
<returns>A new host object of the specified type.</returns>
<remarks>
<para>
This function is provided for script languages that do not support external
instantiation. It is overloaded with <c><see cref="M:Microsoft.ClearScript.HostFunctions.newObj(System.Object,System.Object[])"/></c> and
selected at runtime if <typeparamref name="T"/> can be used as a type argument.
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see
<c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">AddHostObject</see></c>.
</para>
</remarks>
<example>
The following code imports the <c><see cref="T:System.Random"/></c> class, creates an
instance using the
<c><see href="https://docs.microsoft.com/en-us/dotnet/api/system.random.-ctor#System_Random__ctor_System_Int32_">Random(Int32)</see></c>
constructor, and calls the <c><see cref="M:System.Random.NextDouble"/></c> method.
It assumes that an instance of <c><see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/></c> is exposed under
the name "host"
(see <c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see></c>).
<code lang="JavaScript">
var RandomT = host.type("System.Random");
var random = host.newObj(RandomT, 100);
var value = random.NextDouble();
</code>
</example>
<c><seealso cref="M:Microsoft.ClearScript.ExtendedHostFunctions.type(System.String,System.Object[])"/></c>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.newObj(System.Object,System.Object[])">
<summary>
Creates a host object of the specified type. This version is invoked if the specified
type cannot be used as a type argument.
</summary>
<param name="type">The type of object to create.</param>
<param name="args">Optional constructor arguments.</param>
<returns>A new host object of the specified type.</returns>
<remarks>
<para>
This function is provided for script languages that do not support external
instantiation. It is overloaded with <c><see cref="M:Microsoft.ClearScript.HostFunctions.newObj``1(System.Object[])"/></c> and selected at runtime if
<paramref name="type"/> cannot be used as a type argument. Note that this applies
to some host types that support instantiation, such as certain COM/ActiveX types.
</para>
<para>
For information about the mapping between host members and script-callable properties
and methods, see
<c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">AddHostObject</see></c>.
</para>
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.newObj(System.Dynamic.IDynamicMetaObjectProvider,System.Object[])">
<summary>
Performs dynamic instantiation.
</summary>
<param name="target">The dynamic host object that provides the instantiation operation to perform.</param>
<param name="args">Optional instantiation arguments.</param>
<returns>The result of the operation, which is usually a new dynamic host object.</returns>
<remarks>
This function is provided for script languages that do not support external
instantiation.
</remarks>
</member>
<member name="M:Microsoft.ClearScript.HostFunctions.newArr``1(System.Int32[])">
<summary>
Creates a host array with the specified element type.
</summary>
<typeparam name="T">The element type of the array to create.</typeparam>
<param name="lengths">One or more integers representing the array dimension lengths.</param>
<returns>A new host array with the specified element type.</returns>
<remarks>
For information about the mapping between host members and script-callable properties
and methods, see
<c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,Microsoft.ClearScript.HostItemFlags,System.Object)">AddHostObject</see></c>.
</remarks>
<example>
The following code creates a 5x3 host array of strings.
It assumes that an instance of <c><see cref="T:Microsoft.ClearScript.ExtendedHostFunctions"/></c> is exposed under
the name "host"
(see <c><see cref="M:Microsoft.ClearScript.ScriptEngine.AddHostObject(System.String,System.Object)">AddHostObject</see></c>).
<code lang="JavaScript">
var StringT = host.type("System.String");