From 4eaaf460e21fe1a571a27cc0f1f19e22a51e490a Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:04:08 -0700 Subject: [PATCH 1/8] System.R* --- .../CustomReflectionContext.xml | 82 +- .../AssemblyBuilder.xml | 50 +- .../ConstructorBuilder.xml | 16 +- .../CustomAttributeBuilder.xml | 8 +- xml/System.Reflection.Emit/DynamicILInfo.xml | 20 +- xml/System.Reflection.Emit/DynamicMethod.xml | 60 +- xml/System.Reflection.Emit/EnumBuilder.xml | 42 +- xml/System.Reflection.Emit/EventToken.xml | 4 +- xml/System.Reflection.Emit/FieldBuilder.xml | 10 +- xml/System.Reflection.Emit/FieldToken.xml | 4 +- .../GenericTypeParameterBuilder.xml | 26 +- xml/System.Reflection.Emit/ILGenerator.xml | 34 +- xml/System.Reflection.Emit/Label.xml | 4 +- xml/System.Reflection.Emit/LocalBuilder.xml | 10 +- xml/System.Reflection.Emit/MethodBuilder.xml | 78 +- xml/System.Reflection.Emit/MethodToken.xml | 4 +- xml/System.Reflection.Emit/ModuleBuilder.xml | 88 +- xml/System.Reflection.Emit/OpCode.xml | 4 +- xml/System.Reflection.Emit/OpCodes.xml | 896 +++++++++--------- .../ParameterBuilder.xml | 2 +- xml/System.Reflection.Emit/ParameterToken.xml | 4 +- .../PropertyBuilder.xml | 6 +- xml/System.Reflection.Emit/PropertyToken.xml | 4 +- .../SignatureHelper.xml | 14 +- xml/System.Reflection.Emit/SignatureToken.xml | 4 +- xml/System.Reflection.Emit/StringToken.xml | 4 +- xml/System.Reflection.Emit/TypeBuilder.xml | 176 ++-- xml/System.Reflection.Emit/TypeToken.xml | 4 +- .../MethodBodyBlock.xml | 2 +- .../MethodDebugInformation.xml | 4 +- .../CodeViewDebugDirectoryData.xml | 2 +- .../AmbiguousMatchException.xml | 14 +- xml/System.Reflection/Assembly.xml | 272 +++--- .../AssemblyFlagsAttribute.xml | 2 +- xml/System.Reflection/AssemblyName.xml | 44 +- .../AssemblyVersionAttribute.xml | 4 +- xml/System.Reflection/Binder.xml | 10 +- xml/System.Reflection/BindingFlags.xml | 36 +- xml/System.Reflection/ConstructorInfo.xml | 12 +- xml/System.Reflection/CustomAttributeData.xml | 24 +- .../CustomAttributeExtensions.xml | 120 +-- .../CustomAttributeFormatException.xml | 10 +- .../CustomAttributeNamedArgument.xml | 8 +- .../CustomAttributeTypedArgument.xml | 16 +- xml/System.Reflection/EventInfo.xml | 32 +- .../ExceptionHandlingClause.xml | 16 +- .../ExceptionHandlingClauseOptions.xml | 4 +- xml/System.Reflection/FieldInfo.xml | 46 +- .../GenericParameterAttributes.xml | 2 +- .../ICustomAttributeProvider.xml | 4 +- xml/System.Reflection/IReflect.xml | 6 +- xml/System.Reflection/ImageFileMachine.xml | 14 +- xml/System.Reflection/InterfaceMapping.xml | 44 +- .../InvalidFilterCriteriaException.xml | 12 +- xml/System.Reflection/LocalVariableInfo.xml | 4 +- xml/System.Reflection/MemberFilter.xml | 14 +- xml/System.Reflection/MemberInfo.xml | 18 +- .../MemberInfoExtensions.xml | 20 +- xml/System.Reflection/MemberTypes.xml | 6 +- .../MetadataAssemblyResolver.xml | 2 +- xml/System.Reflection/MetadataLoadContext.xml | 30 +- xml/System.Reflection/MethodBase.xml | 60 +- xml/System.Reflection/MethodBody.xml | 16 +- xml/System.Reflection/MethodInfo.xml | 62 +- xml/System.Reflection/Module.xml | 54 +- .../ObfuscationAttribute.xml | 2 +- xml/System.Reflection/ParameterInfo.xml | 70 +- xml/System.Reflection/ParameterModifier.xml | 2 +- .../PortableExecutableKinds.xml | 14 +- xml/System.Reflection/PropertyInfo.xml | 74 +- .../ReflectionTypeLoadException.xml | 2 +- xml/System.Reflection/TargetException.xml | 12 +- .../TargetInvocationException.xml | 10 +- .../TargetParameterCountException.xml | 12 +- xml/System.Reflection/TypeAttributes.xml | 2 +- xml/System.Reflection/TypeDelegator.xml | 16 +- xml/System.Reflection/TypeFilter.xml | 2 +- xml/System.Reflection/TypeInfo.xml | 4 +- .../StronglyTypedResourceBuilder.xml | 16 +- xml/System.Resources/IResourceReader.xml | 30 +- xml/System.Resources/IResourceWriter.xml | 64 +- .../MissingManifestResourceException.xml | 12 +- .../MissingSatelliteAssemblyException.xml | 22 +- .../NeutralResourcesLanguageAttribute.xml | 2 +- xml/System.Resources/ResXDataNode.xml | 12 +- .../ResXFileRef+Converter.xml | 18 +- xml/System.Resources/ResXFileRef.xml | 66 +- xml/System.Resources/ResXResourceReader.xml | 30 +- xml/System.Resources/ResXResourceSet.xml | 2 +- xml/System.Resources/ResXResourceWriter.xml | 32 +- xml/System.Resources/ResourceManager.xml | 32 +- xml/System.Resources/ResourceReader.xml | 30 +- xml/System.Resources/ResourceSet.xml | 30 +- xml/System.Resources/ResourceWriter.xml | 54 +- .../UltimateResourceFallbackLocation.xml | 14 +- .../IApplicationIdentifier.xml | 4 +- .../IFileChangeNotificationSystem.xml | 4 +- .../IMemoryCacheManager.xml | 4 +- .../CacheEntryChangeMonitor.xml | 2 +- .../CacheEntryRemovedArguments.xml | 46 +- xml/System.Runtime.Caching/CacheItem.xml | 4 +- xml/System.Runtime.Caching/ChangeMonitor.xml | 42 +- .../HostFileChangeMonitor.xml | 2 +- xml/System.Runtime.Caching/MemoryCache.xml | 42 +- xml/System.Runtime.Caching/ObjectCache.xml | 40 +- .../SqlChangeMonitor.xml | 34 +- .../AsyncStateMachineAttribute.xml | 2 +- .../CallConvCdecl.xml | 2 +- .../CallConvFastcall.xml | 2 +- .../CallConvStdcall.xml | 2 +- .../CallConvThiscall.xml | 2 +- ...itionalWeakTable`2+CreateValueCallback.xml | 28 +- .../ConditionalWeakTable`2.xml | 40 +- .../ContractHelper.xml | 20 +- .../DisablePrivateReflectionAttribute.xml | 10 +- .../InlineArrayAttribute.xml | 2 +- .../InternalsVisibleToAttribute.xml | 2 +- .../IsBoxed.xml | 2 +- .../IsByValue.xml | 2 +- .../IsConst.xml | 2 +- .../IsCopyConstructed.xml | 2 +- .../IsExplicitlyDereferenced.xml | 2 +- .../IsImplicitlyDereferenced.xml | 2 +- .../IsJitIntrinsic.xml | 2 +- .../IsLong.xml | 2 +- .../IsPinned.xml | 2 +- .../IsSignUnspecifiedByte.xml | 2 +- .../IsUdtReturn.xml | 2 +- .../IsVolatile.xml | 2 +- .../IteratorStateMachineAttribute.xml | 2 +- .../MethodImplAttribute.xml | 4 +- .../RuntimeHelpers+CleanupCode.xml | 10 +- .../RuntimeHelpers+TryCode.xml | 10 +- .../RuntimeHelpers.xml | 32 +- .../RuntimeWrappedException.xml | 2 +- .../TupleElementNamesAttribute.xml | 10 +- .../Unsafe.xml | 22 +- .../Cer.xml | 36 +- .../Consistency.xml | 24 +- .../ReliabilityContractAttribute.xml | 4 +- .../InstanceStore.xml | 120 +-- .../ExceptionDispatchInfo.xml | 44 +- .../ApplicationActivator.xml | 12 +- .../CONNECTDATA.xml | 16 +- .../IAdviseSink.xml | 60 +- .../ITypeInfo.xml | 198 ++-- .../ITypeInfo2.xml | 8 +- .../ITypeLib.xml | 112 +-- .../ITypeLib2.xml | 112 +-- .../EnumerableToDispatchMarshaler.xml | 72 +- .../EnumeratorToEnumVariantMarshaler.xml | 72 +- .../ExpandoToDispatchExMarshaler.xml | 80 +- .../TypeToTypeInfoMarshaler.xml | 80 +- .../ReadOnlySpanMarshaller`2.xml | 2 +- .../SpanMarshaller`2.xml | 2 +- .../EventRegistrationTokenTable`1.xml | 4 +- .../WindowsRuntimeMarshal.xml | 2 +- .../WindowsRuntimeMetadata.xml | 52 +- .../ArrayWithOffset.xml | 14 +- .../COMException.xml | 16 +- .../CONNECTDATA.xml | 14 +- .../CollectionsMarshal.xml | 2 +- .../ComAwareEventInfo.xml | 24 +- .../ComRegisterFunctionAttribute.xml | 2 +- .../ComUnregisterFunctionAttribute.xml | 26 +- .../CriticalHandle.xml | 34 +- .../DllImportAttribute.xml | 6 +- .../ExporterEventKind.xml | 10 +- .../ExtensibleClassFactory.xml | 38 +- .../ExternalException.xml | 20 +- .../GCHandle.xml | 188 ++-- .../HandleRef.xml | 2 +- .../ICustomFactory.xml | 20 +- .../IRegistrationServices.xml | 92 +- .../ITypeLibExporterNameProvider.xml | 20 +- .../ImporterEventKind.xml | 10 +- .../InvalidComObjectException.xml | 14 +- .../InvalidOleVariantTypeException.xml | 12 +- .../Marshal.xml | 504 +++++----- .../MarshalDirectiveException.xml | 12 +- .../MemoryMarshal.xml | 8 +- xml/System.Runtime.InteropServices/NFloat.xml | 22 +- .../NativeLibrary.xml | 2 +- .../OSPlatform.xml | 62 +- .../RegistrationClassContext.xml | 14 +- .../RegistrationConnectionType.xml | 14 +- .../RegistrationServices.xml | 20 +- .../RuntimeEnvironment.xml | 8 +- .../SEHException.xml | 14 +- .../SafeArrayRankMismatchException.xml | 12 +- .../SafeArrayTypeMismatchException.xml | 12 +- .../SafeBuffer.xml | 10 +- .../SafeHandle.xml | 42 +- .../TypeIdentifierAttribute.xml | 2 +- .../TypeLibExporterFlags.xml | 10 +- .../TypeLibImporterFlags.xml | 2 +- .../TypeMapAssociationAttribute`1.xml | 4 +- .../TypeMapAttribute`1.xml | 4 +- .../UCOMITypeInfo.xml | 234 ++--- .../UCOMITypeLib.xml | 132 +-- .../VariantWrapper.xml | 50 +- .../_Assembly.xml | 88 +- .../_ConstructorInfo.xml | 26 +- .../_EventInfo.xml | 36 +- .../_Exception.xml | 12 +- .../_FieldInfo.xml | 26 +- .../_MemberInfo.xml | 14 +- .../_MethodBase.xml | 24 +- .../_MethodInfo.xml | 26 +- .../_PropertyInfo.xml | 46 +- xml/System.Runtime.InteropServices/_Type.xml | 156 +-- ...yLoadContext+ContextualReflectionScope.xml | 2 +- .../AssemblyLoadContext.xml | 4 +- .../ActivatorLevel.xml | 10 +- .../IActivator.xml | 2 +- .../IConstructionCallMessage.xml | 6 +- .../UrlAttribute.xml | 6 +- .../HttpChannel.xml | 16 +- .../HttpClientChannel.xml | 8 +- .../HttpRemotingHandler.xml | 30 +- .../HttpRemotingHandlerFactory.xml | 20 +- .../HttpServerChannel.xml | 16 +- .../IpcChannel.xml | 18 +- .../IpcClientChannel.xml | 10 +- .../IpcServerChannel.xml | 16 +- .../TcpChannel.xml | 14 +- .../TcpClientChannel.xml | 6 +- .../TcpServerChannel.xml | 12 +- .../BaseChannelObjectWithProperties.xml | 122 +-- .../BinaryClientFormatterSink.xml | 4 +- .../BinaryClientFormatterSinkProvider.xml | 4 +- .../BinaryServerFormatterSink.xml | 6 +- .../BinaryServerFormatterSinkProvider.xml | 4 +- .../ChannelServices.xml | 8 +- .../ClientChannelSinkStack.xml | 50 +- .../IAuthorizeRemotingConnection.xml | 30 +- .../IChannel.xml | 70 +- .../IChannelReceiver.xml | 90 +- .../IChannelSender.xml | 40 +- .../IClientChannelSink.xml | 2 +- .../IClientChannelSinkProvider.xml | 74 +- .../IClientChannelSinkStack.xml | 28 +- .../IClientResponseChannelSinkStack.xml | 30 +- .../IServerChannelSink.xml | 78 +- .../IServerChannelSinkProvider.xml | 70 +- .../IServerChannelSinkStack.xml | 48 +- .../IServerResponseChannelSinkStack.xml | 10 +- .../ServerChannelSinkStack.xml | 86 +- .../SoapClientFormatterSink.xml | 2 +- .../SoapClientFormatterSinkProvider.xml | 4 +- .../SoapServerFormatterSink.xml | 2 +- .../SoapServerFormatterSinkProvider.xml | 4 +- .../Context.xml | 134 +-- .../ContextAttribute.xml | 4 +- .../IContextAttribute.xml | 2 +- .../IContributeClientContextSink.xml | 14 +- .../IContributeEnvoySink.xml | 20 +- .../IContributeServerContextSink.xml | 18 +- .../IDynamicMessageSink.xml | 30 +- .../SynchronizationAttribute.xml | 102 +- .../ClientSponsor.xml | 4 +- .../ILease.xml | 6 +- .../ISponsor.xml | 40 +- .../LifetimeServices.xml | 2 +- .../AsyncResult.xml | 24 +- .../CallContext.xml | 6 +- .../ILogicalThreadAffinative.xml | 24 +- .../IMessageSink.xml | 56 +- .../IMethodCallMessage.xml | 2 +- .../IMethodMessage.xml | 2 +- .../IMethodReturnMessage.xml | 4 +- .../LogicalCallContext.xml | 42 +- .../MethodCall.xml | 4 +- .../MethodResponse.xml | 2 +- .../SoapAnyUri.xml | 6 +- .../SoapBase64Binary.xml | 6 +- .../SoapDate.xml | 192 ++-- .../SoapDay.xml | 8 +- .../SoapDuration.xml | 4 +- .../SoapHexBinary.xml | 6 +- .../SoapInteger.xml | 6 +- .../SoapMonth.xml | 8 +- .../SoapMonthDay.xml | 8 +- .../SoapNegativeInteger.xml | 6 +- .../SoapNonNegativeInteger.xml | 6 +- .../SoapNonPositiveInteger.xml | 6 +- .../SoapPositiveInteger.xml | 6 +- .../SoapQName.xml | 6 +- .../SoapTime.xml | 150 +-- .../SoapYear.xml | 168 ++-- .../SoapYearMonth.xml | 190 ++-- .../SoapTypeAttribute.xml | 2 +- .../MetaData.xml | 176 ++-- .../SdlChannelSink.xml | 4 +- .../RealProxy.xml | 12 +- .../EnterpriseServicesHelper.xml | 2 +- .../ActivatedClientTypeEntry.xml | 6 +- .../ActivatedServiceTypeEntry.xml | 6 +- xml/System.Runtime.Remoting/IChannelInfo.xml | 2 +- xml/System.Runtime.Remoting/ObjRef.xml | 208 ++-- xml/System.Runtime.Remoting/ObjectHandle.xml | 38 +- .../RemotingConfiguration.xml | 44 +- .../RemotingException.xml | 14 +- .../RemotingServices.xml | 24 +- .../RemotingTimeoutException.xml | 14 +- .../ServerException.xml | 14 +- xml/System.Runtime.Remoting/SoapServices.xml | 6 +- .../WellKnownClientTypeEntry.xml | 4 +- .../WellKnownObjectMode.xml | 10 +- .../WellKnownServiceTypeEntry.xml | 2 +- .../BinaryFormatter.xml | 4 +- .../SoapFormatter.xml | 6 +- .../DataContractJsonSerializer.xml | 6 +- .../IXmlJsonReaderInitializer.xml | 60 +- .../IXmlJsonWriterInitializer.xml | 24 +- .../JsonReaderWriterFactory.xml | 112 +-- .../CollectionDataContractAttribute.xml | 6 +- .../DataContractAttribute.xml | 2 +- .../DataContractResolver.xml | 76 +- .../DataContractSerializer.xml | 22 +- .../ExtensionDataObject.xml | 2 +- .../Formatter.xml | 206 ++-- .../FormatterConverter.xml | 150 +-- .../FormatterServices.xml | 14 +- .../IDataContractSurrogate.xml | 10 +- .../IFormatter.xml | 76 +- .../IObjectReference.xml | 14 +- .../ISafeSerializationData.xml | 4 +- .../ISerializable.xml | 46 +- .../ISerializationSurrogate.xml | 22 +- .../ImportOptions.xml | 4 +- .../KnownTypeAttribute.xml | 4 +- .../NetDataContractSerializer.xml | 18 +- .../ObjectIDGenerator.xml | 32 +- .../ObjectManager.xml | 136 +-- .../SerializationException.xml | 16 +- .../SerializationInfo.xml | 16 +- .../SerializationInfoEnumerator.xml | 2 +- .../SerializationObjectManager.xml | 30 +- .../StreamingContext.xml | 2 +- .../XPathQueryGenerator.xml | 80 +- .../XmlObjectSerializer.xml | 166 ++-- .../XmlSerializableServices.xml | 2 +- .../XsdDataContractExporter.xml | 14 +- .../XsdDataContractImporter.xml | 12 +- .../ComponentGuaranteesAttribute.xml | 2 +- .../FrameworkName.xml | 38 +- .../TargetFrameworkAttribute.xml | 4 +- xml/System.Runtime/GCSettings.xml | 2 +- xml/System.Runtime/MemoryFailPoint.xml | 102 +- xml/System.Runtime/ProfileOptimization.xml | 74 +- 351 files changed, 5880 insertions(+), 5880 deletions(-) diff --git a/xml/System.Reflection.Context/CustomReflectionContext.xml b/xml/System.Reflection.Context/CustomReflectionContext.xml index 256e8d55ef1..106b96bcdcb 100644 --- a/xml/System.Reflection.Context/CustomReflectionContext.xml +++ b/xml/System.Reflection.Context/CustomReflectionContext.xml @@ -32,35 +32,35 @@ Represents a customizable reflection context. - provides a way for you to add or remove custom attributes from reflection objects, or add dummy properties to those objects, without re-implementing the complete reflection model. The default simply wraps reflection objects without making any changes, but by subclassing and overriding the relevant methods, you can add, remove, or change the attributes that apply to any reflected parameter or member, or add new properties to a reflected type. - - For example, suppose that your code follows the convention of applying a particular attribute to factory methods, but you are now required to work with third-party code that lacks attributes. You can use to specify a rule for identifying the objects that should have attributes and to supply the objects with those attributes when they are viewed from your code. - - To use effectively, the code that uses the reflected objects must support the notion of specifying a reflection context, instead of assuming that all reflected objects are associated with the runtime reflection context. Many reflection methods in the .NET Framework provide a parameter for this purpose. - - To modify the attributes that are applied to a reflected parameter or member, override the or method. These methods take the reflected object and the list of attributes under its current reflection context, and return the list of attributes it should have under the custom reflection context. - + provides a way for you to add or remove custom attributes from reflection objects, or add dummy properties to those objects, without re-implementing the complete reflection model. The default simply wraps reflection objects without making any changes, but by subclassing and overriding the relevant methods, you can add, remove, or change the attributes that apply to any reflected parameter or member, or add new properties to a reflected type. + + For example, suppose that your code follows the convention of applying a particular attribute to factory methods, but you are now required to work with third-party code that lacks attributes. You can use to specify a rule for identifying the objects that should have attributes and to supply the objects with those attributes when they are viewed from your code. + + To use effectively, the code that uses the reflected objects must support the notion of specifying a reflection context, instead of assuming that all reflected objects are associated with the runtime reflection context. Many reflection methods in the .NET Framework provide a parameter for this purpose. + + To modify the attributes that are applied to a reflected parameter or member, override the or method. These methods take the reflected object and the list of attributes under its current reflection context, and return the list of attributes it should have under the custom reflection context. + > [!WARNING] -> methods should not access the list of attributes of a reflected object or method directly by calling the method on the provided or instance, but should instead use the `declaredAttributes` list, which is passed as a parameter to the method overloads. - - To add properties to a reflected type, override the method. The method accepts a parameter that specifies the reflected type, and returns a list of additional properties. You should use the method to create property objects to return. You can specify delegates when creating the property that will serve as the property accessor, and you can omit one of the accessors to create a read-only or write-only property. Note that such dummy properties have no metadata or Common Intermediate Language (CIL) backing. - +> methods should not access the list of attributes of a reflected object or method directly by calling the method on the provided or instance, but should instead use the `declaredAttributes` list, which is passed as a parameter to the method overloads. + + To add properties to a reflected type, override the method. The method accepts a parameter that specifies the reflected type, and returns a list of additional properties. You should use the method to create property objects to return. You can specify delegates when creating the property that will serve as the property accessor, and you can omit one of the accessors to create a read-only or write-only property. Note that such dummy properties have no metadata or Common Intermediate Language (CIL) backing. + > [!WARNING] -> Be cautious about equality among reflected objects when you work with reflection contexts, because objects may represent the same reflected object in multiple contexts. You can use the method to obtain a particular reflection context's version of a reflected object. - +> Be cautious about equality among reflected objects when you work with reflection contexts, because objects may represent the same reflected object in multiple contexts. You can use the method to obtain a particular reflection context's version of a reflected object. + > [!WARNING] -> A object alters the attributes returned by a particular reflection object, such as those obtained by the method. It does not alter the custom attribute data returned by the method, and these two lists will not match when you use a custom reflection context. - - - -## Examples - The following example demonstrates how to subclass to add a custom attribute to all the members of a given type whose names begin with "To". To run this code, paste it into an empty console project, and make sure to include a reference to System.Reflection.Context.dll. - - :::code language="csharp" source="~/snippets/csharp/System.Reflection.Context/CustomReflectionContext/Overview/program.cs" id="Snippet1"::: - +> A object alters the attributes returned by a particular reflection object, such as those obtained by the method. It does not alter the custom attribute data returned by the method, and these two lists will not match when you use a custom reflection context. + + + +## Examples + The following example demonstrates how to subclass to add a custom attribute to all the members of a given type whose names begin with "To". To run this code, paste it into an empty console project, and make sure to include a reference to System.Reflection.Context.dll. + + :::code language="csharp" source="~/snippets/csharp/System.Reflection.Context/CustomReflectionContext/Overview/program.cs" id="Snippet1"::: + ]]> @@ -157,11 +157,11 @@ When overridden in a derived class, provides a collection of additional properties for the specified type, as represented in this reflection context. A collection of additional properties for the specified type. - method. - + method. + ]]> @@ -222,11 +222,11 @@ Creates an object that represents a property to be added to a type, to be used with the method. An object that represents the property. - objects, and should be used only in the context of the method. - + objects, and should be used only in the context of the method. + ]]> @@ -304,11 +304,11 @@ Creates an object that represents a property to be added to a type, to be used with the method and using the specified custom attributes. An object that represents the property. - objects, and should be used only in the context of the method. - + objects, and should be used only in the context of the method. + ]]> diff --git a/xml/System.Reflection.Emit/AssemblyBuilder.xml b/xml/System.Reflection.Emit/AssemblyBuilder.xml index fb16c4cdc58..c2ce717f441 100644 --- a/xml/System.Reflection.Emit/AssemblyBuilder.xml +++ b/xml/System.Reflection.Emit/AssemblyBuilder.xml @@ -585,7 +585,7 @@ The following code example shows how to define and use a dynamic assembly. The e The defined dynamic module is transient. The dynamic module is not saved, even if the parent dynamic assembly was created with . > [!NOTE] -> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. +> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. ## Examples @@ -670,7 +670,7 @@ The following code example shows how to define and use a dynamic assembly. The e The dynamic module is not saved, even if the parent dynamic assembly was created with . > [!NOTE] -> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. +> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. ## Examples @@ -750,7 +750,7 @@ The following code example shows how to define and use a dynamic assembly. The e In an assembly with only one module, that module should contain the assembly manifest. > [!NOTE] -> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. +> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. ## Examples @@ -837,7 +837,7 @@ The following code example shows how to define and use a dynamic assembly. The e In an assembly with only one module, that module should contain the assembly manifest. > [!NOTE] -> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. +> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. ## Examples @@ -958,14 +958,14 @@ The following code example shows how to define and use a dynamic assembly. The e by calling . + Fine grain resources can be added with the returned by calling . `fileName` should not be the same as that of any other persistable module, stand-alone managed resource, or the stand-alone manifest file. - The runtime calls the method when the dynamic assembly is saved. + The runtime calls the method when the dynamic assembly is saved. ## Examples - The following example uses the method to get a resource writer. The example uses the resource writer to add three resource strings. + The following example uses the method to get a resource writer. The example uses the resource writer to add three resource strings. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/DefineResource/assemblybuilder_defineresource.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/AssemblyBuilder/DefineResource/assemblybuilder_defineresource.vb" id="Snippet1"::: @@ -1041,11 +1041,11 @@ The following code example shows how to define and use a dynamic assembly. The e by calling . + Fine-grain resources can be added with the returned by calling . `fileName` should not be the same as that of any other persistable module, standalone managed resource, or the standalone manifest file. - The runtime calls the method when the dynamic assembly is saved. + The runtime calls the method when the dynamic assembly is saved. ]]> @@ -1111,7 +1111,7 @@ The following code example shows how to define and use a dynamic assembly. The e or after either one of the methods was called previously will throw the System.ArgumentException being throw. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime). + An assembly can be associated with only one unmanaged resource. This means that calling or after either one of the methods was called previously will throw the System.ArgumentException being throw. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime). @@ -1168,7 +1168,7 @@ The following code example shows how to define and use a dynamic assembly. The e or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime). + An assembly can be associated with only one unmanaged resource. This means that calling or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime). ## Examples The example below demonstrates a call to `DefineUnmanagedResource`, passing an external resource file. @@ -1238,7 +1238,7 @@ The following code example shows how to define and use a dynamic assembly. The e or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime SDK). + An assembly can be associated with only one unmanaged resource. This means that calling or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime SDK). Empty argument strings get written as a single space. Spaces are substituted for null characters in the argument strings. @@ -1301,7 +1301,7 @@ The following code example shows how to define and use a dynamic assembly. The e or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft `ResMerge` utility (not supplied with the common language runtime SDK). + An assembly can be associated with only one unmanaged resource. This means that calling or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft `ResMerge` utility (not supplied with the common language runtime SDK). Empty argument strings get written as a single space. Spaces are substituted for null characters in the argument strings. @@ -1633,7 +1633,7 @@ The following code example shows how to define and use a dynamic assembly. The e and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods such as and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. ]]> @@ -2400,7 +2400,7 @@ The following code example shows how to define and use a dynamic assembly. The e ## Remarks This method does not return a complete list of referenced assemblies. For example, if you apply a custom attribute to the , the assembly in which the attribute was defined is included in the list returned by this method. However, if you use a object to specify the type of a method parameter, that type is not included. - To get a complete list of referenced assemblies, save the assembly, load it into another application domain, and call the method. + To get a complete list of referenced assemblies, save the assembly, load it into another application domain, and call the method. ]]> @@ -2525,7 +2525,7 @@ The following code example shows how to define and use a dynamic assembly. The e ## Remarks Satellite assemblies contain localized resources, as distinct from main application assemblies, which contain non-localizable executable code and resources for a single culture that serve as the default or neutral culture. - Call the overload to use your current assembly version. + Call the overload to use your current assembly version. ]]> @@ -2601,7 +2601,7 @@ The following code example shows how to define and use a dynamic assembly. The e method. + A type cannot be found until it has been created by calling the method. ]]> @@ -3039,7 +3039,7 @@ The following code example shows how to define and use a dynamic assembly. The e To emit a dynamic assembly in the reflection-only context, specify when you create the . If a dynamic assembly is emitted in the reflection-only context, its code cannot be executed. > [!NOTE] -> After you have saved a dynamic assembly to disk, you can use the method to load the completed assembly into the reflection-only context. However, the assembly can no longer be modified. +> After you have saved a dynamic assembly to disk, you can use the method to load the completed assembly into the reflection-only context. However, the assembly can no longer be modified. ]]> @@ -3102,11 +3102,11 @@ The following code example shows how to define and use a dynamic assembly. The e This method saves all non-transient dynamic modules defined in this dynamic assembly. Transient dynamic modules are not saved. The assembly file name can be the same as the name of one of the modules. If so, the assembly manifest is stored within that module. `assemblyFileName` can be different from the names of all of the modules contained within the assembly. If so, the assembly file contains only the assembly manifest. - For each obtained using , this method writes the .resources file and calls to close the stream. + For each obtained using , this method writes the .resources file and calls to close the stream. - The `assemblyFileName` needs to be a simple file name without a drive or directory component. To create an assembly in a specific directory, use one of the methods that takes a target directory argument. + The `assemblyFileName` needs to be a simple file name without a drive or directory component. To create an assembly in a specific directory, use one of the methods that takes a target directory argument. - In .NET Framework 2.0, this overload of the method is equivalent to calling the method overload with for the `portableExecutableKind` parameter and for the `imageFileMachine` parameter. + In .NET Framework 2.0, this overload of the method is equivalent to calling the method overload with for the `portableExecutableKind` parameter and for the `imageFileMachine` parameter. ## Examples The following code sample creates a dynamic assembly and then persists it to a local disk using `Save`. @@ -3193,9 +3193,9 @@ The following code example shows how to define and use a dynamic assembly. The e This method saves all non-transient dynamic modules defined in this dynamic assembly. Transient dynamic modules are not saved. The assembly file name can be the same as the name of one of the module. If so, the assembly manifest is stored within that module. `assemblyFileName` can be different from the names of all of the modules contained within the assembly. If so, the assembly file contains only the assembly manifest. - For each obtained using , this method writes the .resources file and calls to close the stream. + For each obtained using , this method writes the .resources file and calls to close the stream. - The `assemblyFileName` needs to be a simple file name without a drive or directory component. To create an assembly in a specific directory, use one of the methods that takes a target directory argument. + The `assemblyFileName` needs to be a simple file name without a drive or directory component. To create an assembly in a specific directory, use one of the methods that takes a target directory argument. ]]> @@ -3325,7 +3325,7 @@ The following code example shows how to define and use a dynamic assembly. The e ## Remarks > [!NOTE] -> cannot be used to set declarative security attributes. Use one of the overloads of that takes required, optional, and refused permissions. +> cannot be used to set declarative security attributes. Use one of the overloads of that takes required, optional, and refused permissions. ## Examples The following code sample illustrates the use of `SetCustomAttribute` within , using a . @@ -3404,7 +3404,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati `RuntimeConstructorInfo` is a special type generated by the system. It derives from the class, and any object you obtain through reflection is actually an instance of `RuntimeConstructorInfo`. > [!NOTE] -> cannot be used to set declarative security attributes. Use one of the overloads of that takes required, optional, and refused permissions. +> cannot be used to set declarative security attributes. Use one of the overloads of that takes required, optional, and refused permissions. ## Examples The following code sample illustrates the use of `SetCustomAttribute` to attach a custom attribute to a dynamically generated assembly. diff --git a/xml/System.Reflection.Emit/ConstructorBuilder.xml b/xml/System.Reflection.Emit/ConstructorBuilder.xml index 6e00514b029..b13b034a5dc 100644 --- a/xml/System.Reflection.Emit/ConstructorBuilder.xml +++ b/xml/System.Reflection.Emit/ConstructorBuilder.xml @@ -80,15 +80,15 @@ is used to fully describe a constructor in Microsoft intermediate language (MSIL), including the name, attributes, signature, and constructor body. It is used in conjunction with the class to create classes at run time. Call to get an instance of . + is used to fully describe a constructor in Microsoft intermediate language (MSIL), including the name, attributes, signature, and constructor body. It is used in conjunction with the class to create classes at run time. Call to get an instance of . If you do not define a constructor for your dynamic type, a parameterless constructor is provided automatically, and it calls the parameterless constructor of the base class. If you use to define a constructor for your dynamic type, a parameterless constructor is not provided. You have the following options for providing a parameterless constructor in addition to the constructor you defined: -- If you want a parameterless constructor that simply calls the parameterless constructor of the base class, you can use the method to create one (and optionally restrict access to it). Do not provide an implementation for this parameterless constructor. If you do, an exception is thrown when you try to use the constructor. No exception is thrown when the method is called. +- If you want a parameterless constructor that simply calls the parameterless constructor of the base class, you can use the method to create one (and optionally restrict access to it). Do not provide an implementation for this parameterless constructor. If you do, an exception is thrown when you try to use the constructor. No exception is thrown when the method is called. -- If you want a parameterless constructor that does something more than simply calling the parameterless constructor of the base class, or that calls another constructor of the base class, or that does something else entirely, you must use the method to create a , and provide your own implementation. +- If you want a parameterless constructor that does something more than simply calling the parameterless constructor of the base class, or that calls another constructor of the base class, or that does something else entirely, you must use the method to create a , and provide your own implementation. @@ -170,7 +170,7 @@ can be called several times, with each call specifying a security action (such as `Demand`, `Assert`, and `Deny`) and a set of permissions that the action applies to. + can be called several times, with each call specifying a security action (such as `Demand`, `Assert`, and `Deny`) and a set of permissions that the action applies to. > [!NOTE] > In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a constructor by using this method are stored in the old XML metadata format. See Emitting Declarative Security Attributes. @@ -512,7 +512,7 @@ ## Remarks The `inherit` parameter is ignored because a class never inherits constructors from base classes. - To get the custom attributes, finish building the type by calling , retrieve the constructor by calling the method on the returned type, and then call the method on the returned . + To get the custom attributes, finish building the type by calling , retrieve the constructor by calling the method on the returned type, and then call the method on the returned . ]]> @@ -569,7 +569,7 @@ ## Remarks The `inherit` parameter is ignored because a class never inherits constructors from base classes. - To get the custom attributes, finish building the type by calling , retrieve the constructor by calling the method on the returned type, and then call the method on the returned . + To get the custom attributes, finish building the type by calling , retrieve the constructor by calling the method on the returned type, and then call the method on the returned . ]]> @@ -874,7 +874,7 @@ method has been called. In the .NET Framework versions 1.0 and 1.1, is thrown. In the .NET Framework version 2.0, is thrown. + This property is not supported until after the method has been called. In the .NET Framework versions 1.0 and 1.1, is thrown. In the .NET Framework version 2.0, is thrown. @@ -1365,7 +1365,7 @@ method. + This property returns the same value as the method. ]]> diff --git a/xml/System.Reflection.Emit/CustomAttributeBuilder.xml b/xml/System.Reflection.Emit/CustomAttributeBuilder.xml index 50007614512..f6ec7329951 100644 --- a/xml/System.Reflection.Emit/CustomAttributeBuilder.xml +++ b/xml/System.Reflection.Emit/CustomAttributeBuilder.xml @@ -76,7 +76,7 @@ and its argument. Then call on an `AssemblyBuilder` to establish the association. + Use the `CustomAttributeBuilder` object returned by the constructor to describe the custom attribute. Associate the `CustomAttribute` with a builder instance by calling the `SetCustomAttribute` method on that builder instance. For example, create a `CustomAttributeBuilder` to describe an instance of `AssemblyCultureAttribute` by supplying the constructor of and its argument. Then call on an `AssemblyBuilder` to establish the association. @@ -243,7 +243,7 @@ The elements of the `constructorArgs` and `fieldValues` arrays are restricted to element types. They can be `byte`, `sbyte`, `int`, `uint`, `long`, `ulong`, `float`, `double`, `String`, `char`, `bool`, an enum, a type, any of the previous types that was cast to an object, or a single-dimension, zero-based array of any of the previous types. > [!IMPORTANT] -> Do not include private fields in `namedFields`. Doing so will cause to be thrown when the method is later called on the completed type. +> Do not include private fields in `namedFields`. Doing so will cause to be thrown when the method is later called on the completed type. ]]> @@ -343,7 +343,7 @@ The elements of the `constructorArgs` and `propertyValues` arrays are restricted to element types. They can be `byte`, `sbyte`, `int`, `uint`, `long`, `ulong`, `float`, `double`, `String`, `char`, `bool`, an enum, a type, any of the previous types that was cast to an object, or a single-dimension, zero-based array of any of the previous types. > [!IMPORTANT] -> Do not include private properties in `namedProperties`. Doing so will cause to be thrown when the method is later called on the completed type. +> Do not include private properties in `namedProperties`. Doing so will cause to be thrown when the method is later called on the completed type. ]]> @@ -458,7 +458,7 @@ The elements of the `constructorArgs`, `propertyValues`, or `fieldValues` arrays are restricted to element types. They can be `byte`, `sbyte`, `int`, `uint`, `long`, `ulong`, `float`, `double`, `String`, `char`, `bool`, an enum, a type, any of the previous types that was cast to an object, or a single-dimension, zero-based array of any of the previous types. > [!IMPORTANT] -> Do not include private properties or fields in `namedProperties` or `namedFields`. Doing so will cause to be thrown when the method is later called on the completed type. +> Do not include private properties or fields in `namedProperties` or `namedFields`. Doing so will cause to be thrown when the method is later called on the completed type. ]]> diff --git a/xml/System.Reflection.Emit/DynamicILInfo.xml b/xml/System.Reflection.Emit/DynamicILInfo.xml index 1bfabac7bf7..d50aa913305 100644 --- a/xml/System.Reflection.Emit/DynamicILInfo.xml +++ b/xml/System.Reflection.Emit/DynamicILInfo.xml @@ -63,14 +63,14 @@ ## Remarks The class allows developers to write their own MSIL generators instead of using . - To create instances of other types, call methods, and so on, the MSIL you generate must include tokens for those entities. The class provides several overloads of the method, which return tokens valid in the scope of the current . For example, if you need to call an overload of the method, you can obtain a for that overload and pass it to the method to obtain a token to embed in your MSIL. + To create instances of other types, call methods, and so on, the MSIL you generate must include tokens for those entities. The class provides several overloads of the method, which return tokens valid in the scope of the current . For example, if you need to call an overload of the method, you can obtain a for that overload and pass it to the method to obtain a token to embed in your MSIL. - Once you have created arrays for your local variable signature, exceptions, and code body, you can use the , , and methods to insert them into the associated with your object. + Once you have created arrays for your local variable signature, exceptions, and code body, you can use the , , and methods to insert them into the associated with your object. Generating your own metadata and MSIL requires familiarity with the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics" and "Partition III: CIL Instruction Set". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). > [!NOTE] -> Do not use to generate code that creates a delegate to another dynamic method by calling the delegate constructor directly. Instead, use the method to create the delegate. A delegate that is created with the delegate constructor does not have a reference to the target dynamic method. The dynamic method might be reclaimed by garbage collection while the delegate is still in use. +> Do not use to generate code that creates a delegate to another dynamic method by calling the delegate constructor directly. Instead, use the method to create the delegate. A delegate that is created with the delegate constructor does not have a reference to the target dynamic method. The dynamic method might be reclaimed by garbage collection while the delegate is still in use. ]]> @@ -276,7 +276,7 @@ object. Use the method to get a for the field you want to access, then use the property to get the . + You must obtain a token for any field that will be accessed by the dynamic method associated with the current object. Use the method to get a for the field you want to access, then use the property to get the . ]]> @@ -332,10 +332,10 @@ object. Use the method to get a for the method you want to access, and then use the property to get the . + You must obtain a token for any method that will be accessed by the dynamic method associated with the current object. Use the method to get a for the method you want to access, and then use the property to get the . > [!NOTE] -> For a method that belongs to a generic type, use the method overload and specify a for the generic type. +> For a method that belongs to a generic type, use the method overload and specify a for the generic type. ]]> @@ -481,7 +481,7 @@ object. Use the method to get a for the field you want to access, and then use the property to get the . + You must obtain a token for any field that will be accessed by the dynamic method associated with the current object. Use the method to get a for the field you want to access, and then use the property to get the . ]]> @@ -533,7 +533,7 @@ object. Use the method to get a for the method you want to call, and then use the property to get the . + You must obtain a token for any method that will be called by the dynamic method associated with the current object. Use the method to get a for the method you want to call, and then use the property to get the . ]]> @@ -855,7 +855,7 @@ method to get a for the local signature. + The local variable signature describes the layout of a method's local variables. To simplify construction of the local variable signature, use the `static` (`Shared` in Visual Basic) method to get a for the local signature. For information on local variable signatures, see the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -917,7 +917,7 @@ method to get a for the local signature. + The local variable signature describes the layout of a method's local variables. To simplify construction of the local variable signature, use the `static` (`Shared` in Visual Basic) method to get a for the local signature. For information on local variable signatures, see the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). diff --git a/xml/System.Reflection.Emit/DynamicMethod.xml b/xml/System.Reflection.Emit/DynamicMethod.xml index 80505153580..8d5130c7800 100644 --- a/xml/System.Reflection.Emit/DynamicMethod.xml +++ b/xml/System.Reflection.Emit/DynamicMethod.xml @@ -57,7 +57,7 @@ For more information about this API, see Supplemental API remarks for DynamicMethod. method. +The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/Overview/source.vb" id="Snippet1"::: @@ -151,7 +151,7 @@ The following code example creates a dynamic method that takes two parameters. T ## Remarks The dynamic method that is created by this constructor is associated with an anonymous assembly instead of an existing type or module. The anonymous assembly exists only to provide a sandbox environment for dynamic methods, that is, to isolate them from other code. This environment makes it safe for the dynamic method to be emitted and executed by partially trusted code. - This constructor specifies that just-in-time (JIT) visibility checks will be enforced for the Microsoft intermediate language (MSIL) of the dynamic method. That is, the code in the dynamic method has access to public methods of public classes. Exceptions are thrown if the method tries to access types or members that are `private`, `protected`, or `internal` (`Friend` in Visual Basic). To create a dynamic method that has restricted ability to skip JIT visibility checks, use the constructor. + This constructor specifies that just-in-time (JIT) visibility checks will be enforced for the Microsoft intermediate language (MSIL) of the dynamic method. That is, the code in the dynamic method has access to public methods of public classes. Exceptions are thrown if the method tries to access types or members that are `private`, `protected`, or `internal` (`Friend` in Visual Basic). To create a dynamic method that has restricted ability to skip JIT visibility checks, use the constructor. When an anonymously hosted dynamic method is constructed, the call stack of the emitting assembly is included. When the method is invoked, the permissions of the emitting assembly are used instead of the permissions of the actual caller. Thus, the dynamic method cannot execute at a higher level of privilege than that of the assembly that emitted it, even if it is passed to and executed by an assembly that has a higher trust level. @@ -257,7 +257,7 @@ The following code example creates a dynamic method that takes two parameters. T - The call stack that emits the dynamic method is granted with the flag. This is always true when the code is executed with full trust. For partially trusted code, it is true only if the host explicitly grants the permission. > [!IMPORTANT] - > If the permission has not been granted, a security exception is thrown when is called or when the dynamic method is invoked, not when this constructor is called. No special permissions are required to emit the dynamic method. + > If the permission has not been granted, a security exception is thrown when is called or when the dynamic method is invoked, not when this constructor is called. No special permissions are required to emit the dynamic method. For example, a dynamic method that is created with `restrictedSkipVisibility` set to `true` can access a private member of any assembly on the call stack if the call stack has been granted restricted member access. If the dynamic method is created with partially trusted code on the call stack, it cannot access a private member of a type in a .NET Framework assembly, because such assemblies are fully trusted. @@ -363,7 +363,7 @@ The following code example creates a dynamic method that takes two parameters. T > For backward compatibility, this constructor demands with the flag if the following conditions are both true: `m` is a module other than the calling module, and the demand for with the flag has failed. If the demand for succeeds, the operation is allowed. ## Examples - The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. + The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/.ctor/source1.vb" id="Snippet1"::: @@ -477,10 +477,10 @@ The following code example creates a dynamic method that takes two parameters. T > [!NOTE] > In general, changing the internal fields of classes is not good object-oriented coding practice. - The example code creates an instance of `Example` and then creates two delegates. The first is of type `UseLikeStatic`, which has the same parameters as the dynamic method. The second is of type `UseLikeInstance`, which lacks the first parameter (of type `Example`). This delegate is created using the method overload; the second parameter of that method overload is an instance of `Example`, in this case the instance just created, which is bound to the newly created delegate. Whenever that delegate is invoked, the dynamic method acts on the bound instance of `Example`. + The example code creates an instance of `Example` and then creates two delegates. The first is of type `UseLikeStatic`, which has the same parameters as the dynamic method. The second is of type `UseLikeInstance`, which lacks the first parameter (of type `Example`). This delegate is created using the method overload; the second parameter of that method overload is an instance of `Example`, in this case the instance just created, which is bound to the newly created delegate. Whenever that delegate is invoked, the dynamic method acts on the bound instance of `Example`. > [!NOTE] -> This is an example of the relaxed rules for delegate binding introduced in .NET Framework 2.0, along with new overloads of the method. For more information, see the class. +> This is an example of the relaxed rules for delegate binding introduced in .NET Framework 2.0, along with new overloads of the method. For more information, see the class. The `UseLikeStatic` delegate is invoked, passing in the instance of `Example` that is bound to the `UseLikeInstance` delegate. Then the `UseLikeInstance` delegate is invoked, so that both delegates act on the same instance of `Example`. The changes in the values of the internal field are displayed after each call. Finally, a `UseLikeInstance` delegate is bound to an instance of `DerivedFromExample`, and the delegate calls are repeated. @@ -1121,14 +1121,14 @@ The following code example creates a dynamic method that takes two parameters. T method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. + Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. - To create a method body for a dynamic method when you have your own MSIL generator, call the method to obtain a object. If you do not have your own MSIL generator, call the method to obtain an object that can be used to generate the method body. + To create a method body for a dynamic method when you have your own MSIL generator, call the method to obtain a object. If you do not have your own MSIL generator, call the method to obtain an object that can be used to generate the method body. ## Examples - The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. + The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/.ctor/source1.vb" id="Snippet1"::: @@ -1216,9 +1216,9 @@ The following code example creates a dynamic method that takes two parameters. T This method overload requires `target` to be of the same type as the first parameter of the dynamic method, or to be assignable to that type (for example, a derived class). The signature of `delegateType` has all the parameters of the dynamic method except the first. For example, if the dynamic method has the parameters , , and , then `delegateType` has the parameters and ; `target` is of type . - Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. + Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. - To create a method body for a dynamic method when you have your own MSIL generator, call the method to obtain a object. If you do not have your own MSIL generator, call the method to obtain an object that can be used to generate the method body. + To create a method body for a dynamic method when you have your own MSIL generator, call the method to obtain a object. If you do not have your own MSIL generator, call the method to obtain an object that can be used to generate the method body. @@ -1232,10 +1232,10 @@ The following code example creates a dynamic method that takes two parameters. T > [!NOTE] > In general, changing the internal fields of classes is not good object-oriented coding practice. - The example code creates an instance of `Example` and then creates two delegates. The first is of type `UseLikeStatic`, which has the same parameters as the dynamic method. The second is of type `UseLikeInstance`, which lacks the first parameter (of type `Example`). This delegate is created using the method overload; the second parameter of that method overload is an instance of `Example`, in this case the instance just created, which is bound to the newly created delegate. Whenever that delegate is invoked, the dynamic method acts on the bound instance of `Example`. + The example code creates an instance of `Example` and then creates two delegates. The first is of type `UseLikeStatic`, which has the same parameters as the dynamic method. The second is of type `UseLikeInstance`, which lacks the first parameter (of type `Example`). This delegate is created using the method overload; the second parameter of that method overload is an instance of `Example`, in this case the instance just created, which is bound to the newly created delegate. Whenever that delegate is invoked, the dynamic method acts on the bound instance of `Example`. > [!NOTE] -> This is an example of the relaxed rules for delegate binding introduced in .NET Framework 2.0, along with new overloads of the method. For more information, see the class. +> This is an example of the relaxed rules for delegate binding introduced in .NET Framework 2.0, along with new overloads of the method. For more information, see the class. The `UseLikeStatic` delegate is invoked, passing in the instance of `Example` that is bound to the `UseLikeInstance` delegate. Then the `UseLikeInstance` delegate is invoked, so that both delegates act on the same instance of `Example`. The changes in the values of the internal field are displayed after each call. Finally, a `UseLikeInstance` delegate is bound to an instance of `DerivedFromExample`, and the delegate calls are repeated. @@ -1365,9 +1365,9 @@ The following code example creates a dynamic method that takes two parameters. T method refers to the return value. Setting parameter information has no effect on the return value. + If `position` is 0, the method refers to the return value. Setting parameter information has no effect on the return value. - If the dynamic method has already been completed, by calling the or method, the method has no effect. No exception is thrown. + If the dynamic method has already been completed, by calling the or method, the method has no effect. No exception is thrown. @@ -1497,7 +1497,7 @@ The following code example creates a dynamic method that takes two parameters. T For dynamic methods, specifying `true` for `inherit` has no effect, because the method is not declared in a type. > [!NOTE] -> Custom attributes are not currently supported on dynamic methods. The only attribute returned is ; you can get the method implementation flags more easily using the method. +> Custom attributes are not currently supported on dynamic methods. The only attribute returned is ; you can get the method implementation flags more easily using the method. ]]> @@ -1555,7 +1555,7 @@ The following code example creates a dynamic method that takes two parameters. T For dynamic methods, specifying `true` for `inherit` has no effect, because the method is not declared in a type. > [!NOTE] -> Custom attributes are not currently supported on dynamic methods. The only attribute returned is ; you can get the method implementation flags more easily using the method. +> Custom attributes are not currently supported on dynamic methods. The only attribute returned is ; you can get the method implementation flags more easily using the method. ]]> @@ -1671,7 +1671,7 @@ The following code example creates a dynamic method that takes two parameters. T or method, any further attempt to add MSIL is ignored. No exception is thrown. + After a dynamic method has been completed, by calling the or method, any further attempt to add MSIL is ignored. No exception is thrown. > [!NOTE] > There are restrictions on unverifiable code in dynamic methods, even in some full-trust scenarios. See the "Verification" section in Remarks for . @@ -1679,7 +1679,7 @@ The following code example creates a dynamic method that takes two parameters. T ## Examples - The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. + The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/.ctor/source1.vb" id="Snippet1"::: @@ -1741,7 +1741,7 @@ The following code example creates a dynamic method that takes two parameters. T or method, any further attempt to add MSIL is ignored. No exception is thrown. + After a dynamic method has been completed, by calling the or method, any further attempt to add MSIL is ignored. No exception is thrown. > [!NOTE] > There are restrictions on unverifiable code in dynamic methods, even in some full-trust scenarios. See the "Verification" section in Remarks for . @@ -1850,7 +1850,7 @@ The following code example creates a dynamic method that takes two parameters. T objects returned by this method are for information only. Use the method to set or change the characteristics of the parameters. + The objects returned by this method are for information only. Use the method to set or change the characteristics of the parameters. @@ -1984,16 +1984,16 @@ The following code example creates a dynamic method that takes two parameters. T ## Remarks In addition to the listed exceptions, the calling code should be prepared to catch any exceptions thrown by the dynamic method. - Executing a dynamic method with a delegate created by the method is more efficient than executing it with the method. + Executing a dynamic method with a delegate created by the method is more efficient than executing it with the method. - Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. + Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. - All dynamic methods are static, so the `obj` parameter is always ignored. To treat a dynamic method as if it were an instance method, use the overload that takes an object instance. + All dynamic methods are static, so the `obj` parameter is always ignored. To treat a dynamic method as if it were an instance method, use the overload that takes an object instance. If the dynamic method has no parameters, the value of `parameters` should be `null`. Otherwise the number, type, and order of elements in the parameters array should be identical to the number, type, and order of parameters of the dynamic method. > [!NOTE] -> This method overload is called by the method overload inherited from the class, so the preceding remarks apply to both overloads. +> This method overload is called by the method overload inherited from the class, so the preceding remarks apply to both overloads. This method does not demand permissions directly, but invoking the dynamic method can result in security demands, depending on the method. For example, no demands are made for anonymously hosted dynamic methods that are created with the `restrictedSkipVisibility` parameter set to `false`. On the other hand, if you create a method with `restrictedSkipVisibility` set to `true` so it can access a hidden member of a target assembly, the method will cause a demand for the permissions of the target assembly plus with the flag. @@ -2123,7 +2123,7 @@ The following code example creates a dynamic method that takes two parameters. T , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2211,7 +2211,7 @@ The following code example creates a dynamic method that takes two parameters. T , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2299,7 +2299,7 @@ The following code example creates a dynamic method that takes two parameters. T , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2727,7 +2727,7 @@ The following code example creates a dynamic method that takes two parameters. T method is always empty. + Custom attributes are not supported on the return type of a dynamic method, so the array of custom attributes returned by the method is always empty. @@ -2790,7 +2790,7 @@ The following code example creates a dynamic method that takes two parameters. T ## Examples - The following code example displays the method of a dynamic method. This code example is part of a larger example provided for the class. + The following code example displays the method of a dynamic method. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/Overview/source.cs" id="Snippet32"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/Overview/source.vb" id="Snippet32"::: diff --git a/xml/System.Reflection.Emit/EnumBuilder.xml b/xml/System.Reflection.Emit/EnumBuilder.xml index 214e4d4fe5f..1f266c8f1b9 100644 --- a/xml/System.Reflection.Emit/EnumBuilder.xml +++ b/xml/System.Reflection.Emit/EnumBuilder.xml @@ -1026,7 +1026,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the constructor of a finished type, you can retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1089,7 +1089,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr and call on the returned . + As a workaround, to retrieve the custom attributes of a finished type, retrieve the type using and call on the returned . The following code sample illustrates the use of `GetCustomAttribute` in the context of . @@ -1149,7 +1149,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr and call on the returned . + As a workaround, to retrieve the custom attributes of a finished type, retrieve the type using and call on the returned . The following code sample illustrates the use of `GetCustomAttribute` in the context of . @@ -1307,7 +1307,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the event of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1373,7 +1373,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the events of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1432,7 +1432,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type to retrieve the events. + As a workaround, to retrieve the events of a finished type, retrieve the type using or and use reflection on the retrieved type to retrieve the events. ]]> @@ -1500,7 +1500,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the field of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1559,9 +1559,9 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the field of a finished type, retrieve the type using or and use reflection on the retrieved type. - The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. ]]> @@ -1689,7 +1689,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the interface of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1755,7 +1755,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the interface mapping types of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1811,7 +1811,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the interface of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1877,7 +1877,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the member of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1940,7 +1940,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the members of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2091,7 +2091,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the methods of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2163,7 +2163,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the nested type of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2224,7 +2224,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the nested types of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2283,7 +2283,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the properties of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2554,7 +2554,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + You can retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2862,7 +2862,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr and call on the returned . + As a workaround, to check if a custom attribute is defined for a finished type, retrieve the type using and call on the returned . ]]> @@ -4100,7 +4100,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati or and use reflection on the retrieved type. + You can retrieve the type using or and use reflection on the retrieved type. Use this handle to access the underlying metadata handle. diff --git a/xml/System.Reflection.Emit/EventToken.xml b/xml/System.Reflection.Emit/EventToken.xml index 5af7717eb95..6851727a84a 100644 --- a/xml/System.Reflection.Emit/EventToken.xml +++ b/xml/System.Reflection.Emit/EventToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/FieldBuilder.xml b/xml/System.Reflection.Emit/FieldBuilder.xml index 6cc8870c6e4..ea6292017a6 100644 --- a/xml/System.Reflection.Emit/FieldBuilder.xml +++ b/xml/System.Reflection.Emit/FieldBuilder.xml @@ -80,10 +80,10 @@ , , or . + Get an instance of `FieldBuilder` by calling , , or . > [!NOTE] -> The method is currently not supported. As a workaround, retrieve the by reflecting on the finished type and call to set the value of the field. +> The method is currently not supported. As a workaround, retrieve the by reflecting on the finished type and call to set the value of the field. @@ -494,7 +494,7 @@ ## Remarks If the field is `static`, the `obj` parameter is ignored. For non-static fields, `obj` should be an instance of a class that inherits or declares the field. - The return type of is . For example, if the field holds a Boolean primitive value, an instance of with the appropriate Boolean value is returned. Before returning the value, checks to see if the user has access permission. + The return type of is . For example, if the field holds a Boolean primitive value, an instance of with the appropriate Boolean value is returned. Before returning the value, checks to see if the user has access permission. Access restrictions are ignored for fully-trusted code. `Private` constructors, methods, fields, and properties can be accessed and invoked using Reflection whenever the code is fully-trusted. @@ -1225,12 +1225,12 @@ For information on how to format `binaryAttribute`, see the metadata specificati ## Remarks This method will assign the `val` parameter to the field reflected by this instance on `obj`. If the field is static, `obj` will be ignored. For non-static fields, `obj` should be an instance of a class that inherits or declares the field. - The new value is passed as an . For example, if the field's type is Boolean, an instance of with the appropriate Boolean value is passed. Before setting the value, checks to see if the user has access permission. + The new value is passed as an . For example, if the field's type is Boolean, an instance of with the appropriate Boolean value is passed. Before setting the value, checks to see if the user has access permission. Access restrictions are ignored for fully-trusted code. `Private` constructors, methods, fields, and properties can be accessed and invoked using Reflection whenever the code is fully-trusted. > [!NOTE] -> This method is currently not supported. As a workaround, retrieve the by reflecting on the finished type and call to set the value of the field. +> This method is currently not supported. As a workaround, retrieve the by reflecting on the finished type and call to set the value of the field. ]]> diff --git a/xml/System.Reflection.Emit/FieldToken.xml b/xml/System.Reflection.Emit/FieldToken.xml index da3d7a27fcf..143ef91dbfb 100644 --- a/xml/System.Reflection.Emit/FieldToken.xml +++ b/xml/System.Reflection.Emit/FieldToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/GenericTypeParameterBuilder.xml b/xml/System.Reflection.Emit/GenericTypeParameterBuilder.xml index ec45666656b..450df2776e9 100644 --- a/xml/System.Reflection.Emit/GenericTypeParameterBuilder.xml +++ b/xml/System.Reflection.Emit/GenericTypeParameterBuilder.xml @@ -68,15 +68,15 @@ objects by using the method to add type parameters to a dynamic type, thus making it a generic type, or by using the method to add type parameters to a dynamic method. Use the objects to add constraints to the type parameters. Constraints are of three kinds: + You can get an array of objects by using the method to add type parameters to a dynamic type, thus making it a generic type, or by using the method to add type parameters to a dynamic method. Use the objects to add constraints to the type parameters. Constraints are of three kinds: -- The base type constraint specifies that any type assigned to the generic type parameter must derive from a particular base type. Set this constraint by using the method. +- The base type constraint specifies that any type assigned to the generic type parameter must derive from a particular base type. Set this constraint by using the method. -- An interface constraint specifies that any type assigned to the generic type parameter must implement a particular interface. Set the interface constraints by using the method. +- An interface constraint specifies that any type assigned to the generic type parameter must implement a particular interface. Set the interface constraints by using the method. -- Special constraints specify that any type assigned to the generic type parameter must have a parameterless constructor, must be a reference type, or must be a value type. Set the special constraints for a type parameter by using the method. +- Special constraints specify that any type assigned to the generic type parameter must have a parameterless constructor, must be a reference type, or must be a value type. Set the special constraints for a type parameter by using the method. - Interface constraints and special constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameters, you can use its object to reflect the constraints. Use the method to get the type parameters, and for each type parameter use the method to get the base type constraint and interface constraints, and the property to get the special constraints. + Interface constraints and special constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameters, you can use its object to reflect the constraints. Use the method to get the type parameters, and for each type parameter use the method to get the base type constraint and interface constraints, and the property to get the special constraints. @@ -292,7 +292,7 @@ method. + To set the base type constraint, use the method. ]]> @@ -3327,7 +3327,7 @@ method provides a way to generate array types for parameter lists. + The method provides a way to generate array types for parameter lists. @@ -3395,7 +3395,7 @@ method provides a way to generate array types for parameter lists. + The method provides a way to generate array types for parameter lists. @@ -3456,7 +3456,7 @@ method provides a way to generate `ref` types (`ByRef` in Visual Basic) for parameter lists. + The method provides a way to generate `ref` types (`ByRef` in Visual Basic) for parameter lists. @@ -3578,7 +3578,7 @@ method provides a way to generate pointer types for parameter lists. + The method provides a way to generate pointer types for parameter lists. @@ -3871,7 +3871,7 @@ ## Remarks To retrieve the base type constraint use the property. - Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameter and their constraints. To get the type parameters of a completed generic type, use the method. For each type parameter, get the base type constraint and interface constraints by using the method, and get the special constraints by using the property. + Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameter and their constraints. To get the type parameters of a completed generic type, use the method. For each type parameter, get the base type constraint and interface constraints by using the method, and get the special constraints by using the property. @@ -4125,7 +4125,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati ## Remarks Special constraints can specify that any type assigned to the generic type parameter must have a parameterless constructor, must be a reference type, or must be a value type. - Special constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameters and their constraints. To get the type parameters of a completed generic type, use the method. To get the special constraints for each type parameter, use the property. + Special constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameters and their constraints. To get the type parameters of a completed generic type, use the method. To get the special constraints for each type parameter, use the property. The enumeration values that refer to the variance characteristics of a type parameter are relevant only in languages that support covariance and contravariance, such as Microsoft intermediate language (MSIL). Visual Basic and C# currently do not support covariance and contravariance. @@ -4239,7 +4239,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati class. Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameters and their constraints. To get the type parameters of a completed generic type, use the method. For each type parameter, get the base type constraint and interface constraints by using the method. + Interface constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameters and their constraints. To get the type parameters of a completed generic type, use the method. For each type parameter, get the base type constraint and interface constraints by using the method. diff --git a/xml/System.Reflection.Emit/ILGenerator.xml b/xml/System.Reflection.Emit/ILGenerator.xml index 88fa607d435..854f6da9615 100644 --- a/xml/System.Reflection.Emit/ILGenerator.xml +++ b/xml/System.Reflection.Emit/ILGenerator.xml @@ -80,7 +80,7 @@ is used to generate method bodies for methods and constructors in dynamic assemblies (represented by the and classes) and for standalone dynamic methods (represented by the class). To obtain an , use the , , and methods. + is used to generate method bodies for methods and constructors in dynamic assemblies (represented by the and classes) and for standalone dynamic methods (represented by the class). To obtain an , use the , , and methods. MSIL is used as input to a just-in-time (JIT) compiler. @@ -484,7 +484,7 @@ are scoped until the corresponding is called. + This method is used to emit symbolic information. Local variables declared after are scoped until the corresponding is called. If the current is associated with a object, it does not support symbolic information. @@ -595,7 +595,7 @@ ## Remarks The local variable is created in the current lexical scope; for example, if code is being emitted in a `for` loop (`For` loop in Visual Basic), the scope of the variable is the loop. - A local variable created with this overload is not pinned. To create a pinned variable for use with unmanaged pointers, use the method overload. + A local variable created with this overload is not pinned. To create a pinned variable for use with unmanaged pointers, use the method overload. @@ -729,7 +729,7 @@ . Failure to do so will cause an when is called. + To set the position of the label within the stream, you must call . Failure to do so will cause an when is called. This is just a token and does not yet represent any particular location within the stream. @@ -1243,7 +1243,7 @@ ## Remarks The instruction values are defined in the `OpCodes` enumeration. - Labels are created using , and their location within the stream is fixed by using . If a single-byte instruction is used, the label can represent a jump of at most 127 bytes along the stream. `opcode` must represent a branch instruction. Because branches are relative instructions, `label` will be replaced with the correct offset to branch during the fixup process. + Labels are created using , and their location within the stream is fixed by using . If a single-byte instruction is used, the label can represent a jump of at most 127 bytes along the stream. `opcode` must represent a branch instruction. Because branches are relative instructions, `label` will be replaced with the correct offset to branch during the fixup process. @@ -1313,7 +1313,7 @@ The instruction values are defined in the `OpCodes` enumeration. - Labels are created using and their location within the stream is fixed by using . If a single-byte instruction is used, the label can represent a jump of at most 127 bytes along the stream. `opcode` must represent a branch instruction. Because branches are relative instructions, `label` will be replaced with the correct offset to branch during the fixup process. + Labels are created using and their location within the stream is fixed by using . If a single-byte instruction is used, the label can represent a jump of at most 127 bytes along the stream. `opcode` must represent a branch instruction. Because branches are relative instructions, `label` will be replaced with the correct offset to branch during the fixup process. ## Examples The code sample below illustrates the creation of a dynamic method with a jump table. The jump table is built using an array of . @@ -1897,11 +1897,11 @@ Puts a or instruction onto the Microsoft intermediate language (MSIL) stream to call a method. method is used to emit calls to `varargs` methods because there is no overload of the method that specifies the parameter types of the variable arguments. +The method is used to emit calls to `varargs` methods because there is no overload of the method that specifies the parameter types of the variable arguments. -To emit calls to methods that do not use the calling convention, use the method overload. +To emit calls to methods that do not use the calling convention, use the method overload. -The method does not throw an exception when optional parameter types are specified for a method that is not `varargs`. is thrown when the call is executed. +The method does not throw an exception when optional parameter types are specified for a method that is not `varargs`. is thrown when the call is executed. ]]> @@ -1997,12 +1997,12 @@ The following code example emits two methods, a `varargs` method and a method th to put a instruction onto the stream. Do not use . + Use to put a instruction onto the stream. Do not use . ## Examples - The following code sample demonstrates the contextual usage of the method to call an unmanaged type method external to the dynamic class. + The following code sample demonstrates the contextual usage of the method to call an unmanaged type method external to the dynamic class. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCalli/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/EmitCalli/source.vb" id="Snippet1"::: @@ -2095,7 +2095,7 @@ The following code example emits two methods, a `varargs` method and a method th to put a instruction onto the stream. Do not use . + Use to put a instruction onto the stream. Do not use . If `optionalParameterTypes` specifies optional arguments, `callingConvention` must include the flag. @@ -2167,12 +2167,12 @@ The following code example emits two methods, a `varargs` method and a method th method. + The type of `localBuilder` must match the parameter type of an overload of the method. ## Examples - The code sample below demonstrates the contextual usage of the method to write a string to the console in a dynamic method. + The code sample below demonstrates the contextual usage of the method to write a string to the console in a dynamic method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.vb" id="Snippet1"::: @@ -2240,12 +2240,12 @@ The following code example emits two methods, a `varargs` method and a method th method. + The type of `fld` must match the parameter type of an overload of the method. ## Examples - The following code sample demonstrates the use of the method to write a string to the console in a dynamic method. + The following code sample demonstrates the use of the method to write a string to the console in a dynamic method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.vb" id="Snippet1"::: @@ -2429,7 +2429,7 @@ The following code example emits two methods, a `varargs` method and a method th . + This method is used to emit symbolic information. It is used with . If the current is associated with a object, it does not support symbolic information. diff --git a/xml/System.Reflection.Emit/Label.xml b/xml/System.Reflection.Emit/Label.xml index 957ed07f107..7a2447cf8c0 100644 --- a/xml/System.Reflection.Emit/Label.xml +++ b/xml/System.Reflection.Emit/Label.xml @@ -302,7 +302,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -352,7 +352,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/LocalBuilder.xml b/xml/System.Reflection.Emit/LocalBuilder.xml index deef4340db5..a7aa98c9bb0 100644 --- a/xml/System.Reflection.Emit/LocalBuilder.xml +++ b/xml/System.Reflection.Emit/LocalBuilder.xml @@ -86,7 +86,7 @@ method. + A `LocalBuilder` object can be defined using the method. @@ -320,12 +320,12 @@ method is supported for methods defined in dynamic types. It is not supported for dynamic methods defined using the class. + The method is supported for methods defined in dynamic types. It is not supported for dynamic methods defined using the class. ## Examples - The following code sample illustrates the use of the method. This code is part of a larger example for the class. + The following code sample illustrates the use of the method. This code is part of a larger example for the class. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.vb" id="Snippet2"::: @@ -384,12 +384,12 @@ method is supported for methods defined in dynamic types. It is not supported for dynamic methods defined using the class. + The method is supported for methods defined in dynamic types. It is not supported for dynamic methods defined using the class. ## Examples - The following code sample illustrates the use of the method. This code is part of a larger example for the class. + The following code sample illustrates the use of the method. This code is part of a larger example for the class. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.vb" id="Snippet2"::: diff --git a/xml/System.Reflection.Emit/MethodBuilder.xml b/xml/System.Reflection.Emit/MethodBuilder.xml index 5d962a46414..e6654ad72d4 100644 --- a/xml/System.Reflection.Emit/MethodBuilder.xml +++ b/xml/System.Reflection.Emit/MethodBuilder.xml @@ -155,10 +155,10 @@ The following example uses the class can be called several times, with each call specifying a security action (such as `Demand`, `Assert`, and `Deny`) and a set of permissions that the action applies to. + can be called several times, with each call specifying a security action (such as `Demand`, `Assert`, and `Deny`) and a set of permissions that the action applies to. > [!NOTE] -> In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a method by using the method are stored in the old XML metadata format. See Emitting Declarative Security Attributes. +> In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a method by using the method are stored in the old XML metadata format. See Emitting Declarative Security Attributes. @@ -312,7 +312,7 @@ The following example uses the class ## Remarks A always represents a generic method definition, and thus cannot be invoked. - For more information, see and . For information on generic types, see . + For more information, see and . For information on generic types, see . ]]> @@ -496,13 +496,13 @@ The following example uses the class method makes the current method generic. There is no way to undo this change. Calling this method a second time causes an . + Calling the method makes the current method generic. There is no way to undo this change. Calling this method a second time causes an . - The type parameters of the generic method can be retrieved later by using the method. + The type parameters of the generic method can be retrieved later by using the method. By convention, a type parameter name is a single uppercase letter. - For more information, see and . For information on generic types, see . + For more information, see and . For information on generic types, see . @@ -969,9 +969,9 @@ The following example uses the class method that is used to define them. + The type parameters of a generic method also are returned by the method that is used to define them. - For more information, see and . For information on generic types, see . + For more information, see and . For information on generic types, see . ]]> @@ -1025,7 +1025,7 @@ The following example uses the class ## Remarks A cannot be used to emit a constructed generic method directly. The emitted method is a generic method definition. - For more information, see and . For information on generic types, see . + For more information, see and . For information on generic types, see . ]]> @@ -1681,12 +1681,12 @@ The following example uses the class method to add type parameters. This change cannot be reversed. + A method is generic if it has type parameters. You can make a method generic by calling the method to add type parameters. This change cannot be reversed. ## Examples - The following code example displays the status of a method. This code is part of a larger example provided for the method. + The following code example displays the status of a method. This code is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet7"::: @@ -1744,7 +1744,7 @@ The following example uses the class ## Examples - The following code example displays the status of a method. This code is part of a larger example provided for the method. + The following code example displays the status of a method. This code is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet7"::: @@ -1791,7 +1791,7 @@ The following example uses the class , call the method on the completed type, and get the property on the resulting . + To determine whether a method in a dynamic assembly is security-critical, complete the type by calling , call the method on the completed type, and get the property on the resulting . ]]> @@ -1835,7 +1835,7 @@ The following example uses the class , call the method on the completed type, and get the property on the resulting . + To determine whether a method in a dynamic assembly is security-safe-critical, complete the type by calling , call the method on the completed type, and get the property on the resulting . ]]> @@ -1879,7 +1879,7 @@ The following example uses the class , call the method on the completed type, and get the property on the resulting . + To determine whether a method in a dynamic assembly is security-transparent, complete the type by calling , call the method on the completed type, and get the property on the resulting . ]]> @@ -1949,17 +1949,17 @@ The following example uses the class , before the enclosing type has been completed. You can use the method to create a for such a constructed method, and use the in the emitted call. + When you are emitting dynamic code, you might need to emit a call to a method constructed from the generic method definition represented by a , before the enclosing type has been completed. You can use the method to create a for such a constructed method, and use the in the emitted call. ## Examples The following code example creates a constructed method from an incomplete generic method definition in an incomplete type. - The example creates a transient assembly and module with a single type, adds a method `M`, and makes the method generic by adding a type parameter T using the method. The type parameter is used as the type of the method's parameter, and also as its return type. The generic method definition is not given a body, and the enclosing type is not completed. The method is then used to make the constructed method `M` (`M(Of String)` in Visual Basic). The example code has no output, because the subclass of returned by the method does not allow reflection over its parameters. + The example creates a transient assembly and module with a single type, adds a method `M`, and makes the method generic by adding a type parameter T using the method. The type parameter is used as the type of the method's parameter, and also as its return type. The generic method definition is not given a body, and the enclosing type is not completed. The method is then used to make the constructed method `M` (`M(Of String)` in Visual Basic). The example code has no output, because the subclass of returned by the method does not allow reflection over its parameters. > [!NOTE] -> For another code example that uses , see . is also used extensively when emitting code that uses generic types. See [How to: Define a Generic Method with Reflection Emit](/dotnet/framework/reflection-and-codedom/how-to-define-a-generic-method-with-reflection-emit). +> For another code example that uses , see . is also used extensively when emitting code that uses generic types. See [How to: Define a Generic Method with Reflection Emit](/dotnet/framework/reflection-and-codedom/how-to-define-a-generic-method-with-reflection-emit). :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/source.vb" id="Snippet1"::: @@ -2120,7 +2120,7 @@ The following example uses the class ## Remarks This property is provided as a convenience. It is equivalent to using the property to get the type in which the method is being declared, and then calling the property of the resulting object. - This property is also equivalent to calling . + This property is also equivalent to calling . ]]> @@ -2311,7 +2311,7 @@ The following example uses the class ## Remarks > [!NOTE] -> This member is inherited from the base class, . See . +> This member is inherited from the base class, . See . ]]> @@ -2359,7 +2359,7 @@ The following example uses the class after the containing has been created and invoked on the . + This method always returns `null`. Get the after the containing has been created and invoked on the . ]]> @@ -2427,7 +2427,7 @@ The following example uses the class method can interact with the method when the two methods are used in combination. See the Remarks section of the method for details. + The method can interact with the method when the two methods are used in combination. See the Remarks section of the method for details. ]]> @@ -2497,7 +2497,7 @@ The following example uses the class For information on how to format `binaryAttribute`, see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - The method can interact with the method when the two methods are used in combination. See the Remarks section of the method for details. + The method can interact with the method when the two methods are used in combination. See the Remarks section of the method for details. ]]> @@ -2597,11 +2597,11 @@ For information on how to format `binaryAttribute`, see the metadata specificati method in combination with the method, be aware of potential interactions. For example, using the method to add the attribute also sets the flag. If you subsequently call the method, the flag is overwritten. There are two ways to avoid this: + When you use the method in combination with the method, be aware of potential interactions. For example, using the method to add the attribute also sets the flag. If you subsequently call the method, the flag is overwritten. There are two ways to avoid this: -- Call the method before you call the method. The method always respects existing method implementation flags. +- Call the method before you call the method. The method always respects existing method implementation flags. -- When you set implementation flags, call the method to retrieve the existing flags, use bitwise OR to add your flag, and then call the method. +- When you set implementation flags, call the method to retrieve the existing flags, use bitwise OR to add your flag, and then call the method. @@ -2811,18 +2811,18 @@ For information on how to format `binaryAttribute`, see the metadata specificati method that accepts an array of parameter types. However, a generic method can have parameters whose types are specified by one or more of its own generic type parameters, which cannot be defined until after the method has been defined. Use this method to set the parameter types in that case. + If the number and types of the parameters are known when the method is defined, they can be set using any overload of the method that accepts an array of parameter types. However, a generic method can have parameters whose types are specified by one or more of its own generic type parameters, which cannot be defined until after the method has been defined. Use this method to set the parameter types in that case. - If the return type has optional or required custom modifiers, such as , use the method overload. + If the return type has optional or required custom modifiers, such as , use the method overload. - Calling this method replaces any parameter types that were set using the method. + Calling this method replaces any parameter types that were set using the method. ## Examples - The following code example uses the method to make a method generic. The method is used to give the method one parameter, whose type will be specified by the first generic type parameter. The method is used to give the method a return type, specified by the second generic type parameter. + The following code example uses the method to make a method generic. The method is used to give the method one parameter, whose type will be specified by the first generic type parameter. The method is used to give the method a return type, specified by the second generic type parameter. - This code is part of a larger example provided for the method. + This code is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet3"::: @@ -2888,16 +2888,16 @@ For information on how to format `binaryAttribute`, see the metadata specificati , use the method overload. + Use this method to set the return type of a generic method, when the return type is specified by one of the generic type parameters of the method. If the return type has optional or required custom modifiers, such as , use the method overload. - Calling this method replaces a return type established using the method. + Calling this method replaces a return type established using the method. ## Examples - The following code example uses the method to make a method generic. The method is used to give the method one parameter, whose type will be specified by the first generic type parameter. The method is used to give the method a return type, specified by the second generic type parameter. + The following code example uses the method to make a method generic. The method is used to give the method one parameter, whose type will be specified by the first generic type parameter. The method is used to give the method a return type, specified by the second generic type parameter. - This code is part of a larger example provided for the method. + This code is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet3"::: @@ -3008,18 +3008,18 @@ For information on how to format `binaryAttribute`, see the metadata specificati method that accepts an array of parameter types. However, a generic method can have parameters whose types are specified by one or more of its own generic type parameters, which cannot be defined until after the method has been defined. Use this method to set the parameter types in that case. + If the return type and the number and types of the parameters are known when the method is defined, they can be established using any overload of the method that accepts an array of parameter types. However, a generic method can have parameters whose types are specified by one or more of its own generic type parameters, which cannot be defined until after the method has been defined. Use this method to set the parameter types in that case. - If neither the return type nor the parameter types have optional or required custom modifiers, such as , you can use the and methods. + If neither the return type nor the parameter types have optional or required custom modifiers, such as , you can use the and methods. - Calling this method replaces the parameters and return type established using the method. + Calling this method replaces the parameters and return type established using the method. ## Examples The following code example contains source code for a generic class named Sample that has a type parameter `T`. The class has a field named `Field`, of type `T`, and a generic method `GM` with its own type parameter, `U`. Method `GM` creates an instance of Sample, substituting its own type parameter `U` for the type parameter of Sample, and stores its input parameter in `Field`. This source code is compiled but not used; you can view it with the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler), and compare it to the code emitted by class `Example`. - The code in class `Example` demonstrates the use of the method in emitting generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample`, and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added, and turned into a generic method using the method. The type parameter of `GM` is named `U`. Once the type parameter is defined, the signature of `GM` is added, using the method. There is no return type, and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`, which sets the type of the only parameter of the method; this is set to the method's type parameter, `U`. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. A dummy type is defined, to hold the entry point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. The method is used to create a for the static `GM` method of the constructed generic type `Sample`, and the method is then used to create a that can emitted in a method call. + The code in class `Example` demonstrates the use of the method in emitting generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample`, and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added, and turned into a generic method using the method. The type parameter of `GM` is named `U`. Once the type parameter is defined, the signature of `GM` is added, using the method. There is no return type, and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`, which sets the type of the only parameter of the method; this is set to the method's type parameter, `U`. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. A dummy type is defined, to hold the entry point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. The method is used to create a for the static `GM` method of the constructed generic type `Sample`, and the method is then used to create a that can emitted in a method call. When the code example is run, it saves the emitted assembly as TypeBuilderGetFieldExample.exe. You can run TypeBuilderGetFieldExample.exe, and you can use the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) to compare the emitted code with the code for the `Sample` class that is compiled into the code example itself. diff --git a/xml/System.Reflection.Emit/MethodToken.xml b/xml/System.Reflection.Emit/MethodToken.xml index a26d2936927..c9ecec68940 100644 --- a/xml/System.Reflection.Emit/MethodToken.xml +++ b/xml/System.Reflection.Emit/MethodToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/ModuleBuilder.xml b/xml/System.Reflection.Emit/ModuleBuilder.xml index d1f31c354c9..2bdd829b6a3 100644 --- a/xml/System.Reflection.Emit/ModuleBuilder.xml +++ b/xml/System.Reflection.Emit/ModuleBuilder.xml @@ -80,12 +80,12 @@ , use the method. + To get an instance of , use the method. ## Examples - The following code sample demonstrates the use of `ModuleBuilder` to create a dynamic module. Note that the ModuleBuilder is created by calling in , rather than through a constructor. + The following code sample demonstrates the use of `ModuleBuilder` to create a dynamic module. Note that the ModuleBuilder is created by calling in , rather than through a constructor. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/Overview/modulebuilder.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/Overview/modulebuilder.vb" id="Snippet1"::: @@ -214,7 +214,7 @@ This method should be called when the user is done with defining all the global functions within this dynamic module. After calling this function, no more new global functions or new global data are allowed. ## Examples - The following sample illustrates the use of `CreateGlobalFunctions` to create a static global method from a implemented with . + The following sample illustrates the use of `CreateGlobalFunctions` to create a static global method from a implemented with . :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.vb" id="Snippet2"::: @@ -590,10 +590,10 @@ . + The global method that this method defines is not usable until you call . ## Examples - The following example illustrates the use of `DefineGlobalMethod` to create a type-independent method tied to the current . After building the global method, must be called in order to complete it. + The following example illustrates the use of `DefineGlobalMethod` to create a type-independent method tied to the current . After building the global method, must be called in order to complete it. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.vb" id="Snippet1"::: @@ -685,10 +685,10 @@ . + You cannot use the global method that this method defines until you call . ## Examples - The following code sample illustrates the use of `DefineGlobalMethod` to create a type-independent method tied to the current . After building the global method, must be called in order to complete it. + The following code sample illustrates the use of `DefineGlobalMethod` to create a type-independent method tied to the current . After building the global method, must be called in order to complete it. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.vb" id="Snippet1"::: @@ -813,7 +813,7 @@ ## Remarks This overload is provided for designers of managed compilers. - You cannot use the global method that this method defines until you call . ]]> + You cannot use the global method that this method defines until you call . ]]> The method is not static. That is, does not include . @@ -973,10 +973,10 @@ ## Remarks is automatically included in `attributes`. - The data defined by this method is not created until the method is called. + The data defined by this method is not created until the method is called. ## Examples - The following example uses the method to define an initialized data field in the `.sdata` section of the portable executable (PE) file. + The following example uses the method to define an initialized data field in the `.sdata` section of the portable executable (PE) file. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/modulebuilder_defineinitializeddata.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/modulebuilder_defineinitializeddata.vb" id="Snippet1"::: @@ -1069,18 +1069,18 @@ - This method allows you to embed a manifest resource BLOB into a dynamic assembly. -- To embed a managed resource into the manifest module of a dynamic assembly or into a satellite module, use the method to get a resource writer, and use the method to add the resource. +- To embed a managed resource into the manifest module of a dynamic assembly or into a satellite module, use the method to get a resource writer, and use the method to add the resource. -- To link a managed resource into a dynamic assembly, use the method to get a resource writer, and use the method to add the linked resource. +- To link a managed resource into a dynamic assembly, use the method to get a resource writer, and use the method to add the linked resource. -- To link a manifest resource BLOB into a dynamic assembly, use the method to add the linked resource. +- To link a manifest resource BLOB into a dynamic assembly, use the method to add the linked resource. - In addition, a single Win32 resource can be attached to an assembly by using the method or the method. This resource does not appear in the assembly manifest. + In addition, a single Win32 resource can be attached to an assembly by using the method or the method. This resource does not appear in the assembly manifest. ## Examples - The following example generates and saves a dynamic assembly named `EmittedManifestResourceAssembly.exe`, which contains an embedded unmanaged resource. The example creates the assembly, which consists of one module, and opens a memory stream to contain the unmanaged resource. The code then calls the method to define the resource. + The following example generates and saves a dynamic assembly named `EmittedManifestResourceAssembly.exe`, which contains an embedded unmanaged resource. The example creates the assembly, which consists of one module, and opens a memory stream to contain the unmanaged resource. The code then calls the method to define the resource. > [!NOTE] > You can use any kind of stream for your resource; for example, you can read the unmanaged binary data from a file. @@ -1211,7 +1211,7 @@ The following example illustrates the use of the `DefinePInvokeMethod` method to create a for an external unmanaged method, `MessageBoxA`, in the Windows API. The example displays a message box with **Retry** and **Cancel** buttons, and displays the return value from the message box. > [!IMPORTANT] -> To get a non-zero return value, you must add to the method implementation flags after you create the , by using the and methods. +> To get a non-zero return value, you must add to the method implementation flags after you create the , by using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.vb" id="Snippet1"::: @@ -1324,9 +1324,9 @@ The following example illustrates the use of the `DefinePInvokeMethod` method to create a for an external unmanaged method, `MessageBoxA`, in the Windows API. The example displays a message box with **Retry** and **Cancel** buttons, and displays the return value from the message box. > [!IMPORTANT] -> To get a non-zero return value, you must add to the method implementation flags after you create the , by using the and methods. +> To get a non-zero return value, you must add to the method implementation flags after you create the , by using the and methods. - This example uses a different overload of the method, but the technique is the same. + This example uses a different overload of the method, but the technique is the same. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.vb" id="Snippet1"::: @@ -1454,7 +1454,7 @@ ## Remarks The caller must not call the `ResourceWriter.Generate()` and `ResourceWriter.Close()` methods, because these methods are called by `ModuleBuilder.Save` when the dynamic assembly is written to disk. - Use this method to embed a managed resource. To embed a manifest resource blob, use the method. For a summary of embedding and linking managed resources and manifest resource blobs, see the method. + Use this method to embed a managed resource. To embed a manifest resource blob, use the method. For a summary of embedding and linking managed resources and manifest resource blobs, see the method. ## Examples The following example illustrates the use of `DefineResource` to add an external resource to the current . @@ -1515,7 +1515,7 @@ ## Remarks The caller must not call the `ResourceWriter.Generate()` and `ResourceWriter.Close()` methods, because these methods are called by `ModuleBuilder.Save` when the dynamic assembly is written to disk. - Use this method to embed a managed resource. To embed a manifest resource blob, use the method. For a summary of embedding and linking managed resources and manifest resource blobs, see the method. + Use this method to embed a managed resource. To embed a manifest resource blob, use the method. For a summary of embedding and linking managed resources and manifest resource blobs, see the method. ## Examples The following example illustrates the use of DefineResource to add an external resource to the current . @@ -2271,7 +2271,7 @@ ## Remarks is automatically included in `attributes`. - The data defined by this method is not created until the method is called. ]]> + The data defined by this method is not created until the method is called. ]]> The length of is zero. @@ -2614,7 +2614,7 @@ ## Examples - The following example demonstrates how to use to obtain the corresponding to a method that returns an array value. + The following example demonstrates how to use to obtain the corresponding to a method that returns an array value. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.vb" id="Snippet1"::: @@ -2729,12 +2729,12 @@ , except that it returns the token of the array method instead of the method itself. + This method is similar to , except that it returns the token of the array method instead of the method itself. ## Examples - The following example demonstrates how to use to obtain the corresponding to a method that returns an array value. + The following example demonstrates how to use to obtain the corresponding to a method that returns an array value. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.vb" id="Snippet2"::: @@ -2985,7 +2985,7 @@ and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods like and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. ]]> @@ -3048,10 +3048,10 @@ or methods. + When you emit dynamic assemblies, fields in the .sdata region of the portable executable (PE) file are defined by using the or methods. > [!IMPORTANT] -> Module-level fields cannot be retrieved until after the method has been called for the module. +> Module-level fields cannot be retrieved until after the method has been called for the module. ]]> @@ -3137,10 +3137,10 @@ or methods. + When you emit dynamic assemblies, fields in the .sdata region of the portable executable (PE) file are defined by using the or methods. > [!IMPORTANT] -> Module-level fields cannot be retrieved until after the method has been called for the module. +> Module-level fields cannot be retrieved until after the method has been called for the module. ]]> @@ -3299,10 +3299,10 @@ method. Use the inherited method to get methods that have been declared at the module level. Module-level methods are defined in emitted code by using the method. + This method provides the implementation for all overloads of the inherited method. Use the inherited method to get methods that have been declared at the module level. Module-level methods are defined in emitted code by using the method. > [!IMPORTANT] -> Module-level methods cannot be retrieved until after the method has been called for the module. +> Module-level methods cannot be retrieved until after the method has been called for the module. ]]> @@ -3423,10 +3423,10 @@ method. + Module-level methods are defined in emitted code by using the method. > [!IMPORTANT] -> Module-level methods cannot be retrieved until after the method has been called for the module. +> Module-level methods cannot be retrieved until after the method has been called for the module. ]]> @@ -3933,7 +3933,7 @@ , , and methods instead. ]]> + Do not use this method to generate array types, pointer types, or byref types. Use the , , and methods instead. ]]> Length of is zero or is greater than 1023. @@ -4010,7 +4010,7 @@ , , and methods instead. ]]> + Do not use this method to generate array types, pointer types, or byref types. Use the , , and methods instead. ]]> Length of is zero or is greater than 1023. @@ -4091,7 +4091,7 @@ ## Remarks The `throwOnError` parameter only affects what happens when the type is not found. It does not affect any other exceptions that might be thrown. In particular, if the type is found but cannot be loaded, can be thrown even if `throwOnError` is `false`. - Do not use this method to generate array types, pointer types, or byref types. Use the , , and methods instead. ]]> + Do not use this method to generate array types, pointer types, or byref types. Use the , , and methods instead. ]]> Length of is zero or is greater than 1023. @@ -4683,12 +4683,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -4769,12 +4769,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -4859,12 +4859,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericMethodArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericMethodArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -5065,12 +5065,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> diff --git a/xml/System.Reflection.Emit/OpCode.xml b/xml/System.Reflection.Emit/OpCode.xml index 8fbdffd1e08..ca675b4b04f 100644 --- a/xml/System.Reflection.Emit/OpCode.xml +++ b/xml/System.Reflection.Emit/OpCode.xml @@ -412,7 +412,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -463,7 +463,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/OpCodes.xml b/xml/System.Reflection.Emit/OpCodes.xml index bad01e1e99a..9c5a1be5158 100644 --- a/xml/System.Reflection.Emit/OpCodes.xml +++ b/xml/System.Reflection.Emit/OpCodes.xml @@ -153,9 +153,9 @@ |add|`*`|`int32`|`*`| |add|`*`|`native int`|`*`| - The following method overload can use the `add` opcode: + The following method overload can use the `add` opcode: -- +- ]]> @@ -243,9 +243,9 @@ |add|`*`|`int32`|`*`| |add|`*`|`native int`|`*`| - The following method overload can use the `add.ovf` opcode: + The following method overload can use the `add.ovf` opcode: -- +- ]]> @@ -333,9 +333,9 @@ |add|`*`|`int32`|`*`| |add|`*`|`native int`|`*`| - The following method overload can use the `add.ovf.un` opcode: + The following method overload can use the `add.ovf.un` opcode: -- +- ]]> @@ -404,9 +404,9 @@ `And` is an integer-specific operation. - The following method overload can use the `and` opcode: + The following method overload can use the `and` opcode: -- +- ]]> @@ -465,9 +465,9 @@ The `arglist` instruction returns an opaque handle (an unmanaged pointer, of type `native int`) that represents the argument list of the current method. This handle is valid only during the lifetime of the current method. You can, however, pass the handle to other methods as long as the current method is on the thread of control. You can only execute the `arglist` instruction within a method that takes a variable number of arguments. - The following method overload can use the `arglist` opcode: + The following method overload can use the `arglist` opcode: -- +- ]]> @@ -538,9 +538,9 @@ Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction (such transfers are severely restricted and must use the instruction instead). - The following method overload can use the `beq` opcode: + The following method overload can use the `beq` opcode: -- +- ]]> @@ -611,9 +611,9 @@ Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction (such transfers are severely restricted and must use the instruction instead). - The following method overload can use the `beq.s` opcode: + The following method overload can use the `beq.s` opcode: -- +- ]]> @@ -680,9 +680,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bge` opcode: + The following method overload can use the `bge` opcode: -- +- ]]> @@ -749,9 +749,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bge.s` opcode: + The following method overload can use the `bge.s` opcode: -- +- ]]> @@ -818,9 +818,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bge.un` opcode: + The following method overload can use the `bge.un` opcode: -- +- ]]> @@ -887,9 +887,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bge.un.s` opcode: + The following method overload can use the `bge.un.s` opcode: -- +- ]]> @@ -956,9 +956,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bgt` opcode: + The following method overload can use the `bgt` opcode: -- +- ]]> @@ -1025,9 +1025,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bgt.s` opcode: + The following method overload can use the `bgt.s` opcode: -- +- ]]> @@ -1094,9 +1094,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bgt.un` opcode: + The following method overload can use the `bgt.un` opcode: -- +- ]]> @@ -1163,9 +1163,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bgt.un.s` opcode: + The following method overload can use the `bgt.un.s` opcode: -- +- ]]> @@ -1232,9 +1232,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `ble` opcode: + The following method overload can use the `ble` opcode: -- +- ]]> @@ -1301,9 +1301,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `ble.s` opcode: + The following method overload can use the `ble.s` opcode: -- +- ]]> @@ -1370,9 +1370,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `ble.un` opcode: + The following method overload can use the `ble.un` opcode: -- +- ]]> @@ -1439,9 +1439,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `ble.un.s` opcode: + The following method overload can use the `ble.un.s` opcode: -- +- ]]> @@ -1508,9 +1508,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `blt` opcode: + The following method overload can use the `blt` opcode: -- +- ]]> @@ -1577,9 +1577,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `blt.s` opcode: + The following method overload can use the `blt.s` opcode: -- +- ]]> @@ -1646,9 +1646,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `blt.un` opcode: + The following method overload can use the `blt.un` opcode: -- +- ]]> @@ -1715,9 +1715,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `blt.un.s` opcode: + The following method overload can use the `blt.un.s` opcode: -- +- ]]> @@ -1784,9 +1784,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bne.un` opcode: + The following method overload can use the `bne.un` opcode: -- +- ]]> @@ -1853,9 +1853,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bne.un.s` opcode: + The following method overload can use the `bne.un.s` opcode: -- +- ]]> @@ -1930,9 +1930,9 @@ is thrown if the class cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) is converted to native code, rather than at runtime. - The following method overload can use the `box` opcode: + The following method overload can use the `box` opcode: -- +- ]]> @@ -1993,9 +1993,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `br` opcode: + The following method overload can use the `br` opcode: -- +- ]]> @@ -2056,9 +2056,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `br.s` opcode: + The following method overload can use the `br.s` opcode: -- +- ]]> @@ -2121,9 +2121,9 @@ The `break` instruction can trap to a debugger, do nothing, or raise a security exception. The exact behavior is implementation-defined. - The following method overload can use the `break` opcode: + The following method overload can use the `break` opcode: -- +- ]]> @@ -2190,9 +2190,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `brfalse` opcode: + The following method overload can use the `brfalse` opcode: -- +- ]]> @@ -2259,9 +2259,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `brfalse.s` opcode: + The following method overload can use the `brfalse.s` opcode: -- +- ]]> @@ -2330,9 +2330,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `brtrue` opcode: + The following method overload can use the `brtrue` opcode: -- +- ]]> @@ -2401,9 +2401,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `brtrue.s` opcode: + The following method overload can use the `brtrue.s` opcode: -- +- ]]> @@ -2481,16 +2481,16 @@ > [!NOTE] > When calling methods of System.Object on value types, consider using the `constrained` prefix with the `callvirt` instruction instead of emitting a `call` instruction. This removes the need to emit different IL depending on whether or not the value type overrides the method, avoiding a potential versioning problem. Consider using the `constrained` prefix when invoking interface methods on value types, since the value type method implementing the interface method can be changed using a `MethodImpl`. These issues are described in more detail in the opcode. - The following method overloads can use the `call` opcode: + The following method overloads can use the `call` opcode: -- +- -- +- -- +- > [!NOTE] -> The method is provided for `varargs` calls. Use the method for normal calls. +> The method is provided for `varargs` calls. Use the method for normal calls. ]]> @@ -2565,11 +2565,11 @@ may be thrown if the system security does not grant the caller access to the called method. The security check can occur when the Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at runtime. - The following methods can be used to perform a `calli` instruction on the stack. Note that `calli` should be called through the below methods rather than using the class to place the instruction directly on the stack. + The following methods can be used to perform a `calli` instruction on the stack. Note that `calli` should be called through the below methods rather than using the class to place the instruction directly on the stack. -- for calls using a managed calling convention. +- for calls using a managed calling convention. -- for calls using an unmanaged calling convention. +- for calls using an unmanaged calling convention. ]]> @@ -2653,11 +2653,11 @@ > [!NOTE] > When calling methods of System.Object on value types, consider using the `constrained` prefix with the `callvirt` instruction. This removes the need to emit different IL depending on whether or not the value type overrides the method, avoiding a potential versioning problem. Consider using the `constrained` prefix when invoking interface methods on value types, since the value type method implementing the interface method can be changed using a `MethodImpl`. These issues are described in more detail in the opcode. - The following method overload can use the `callvirt` opcode: + The following method overload can use the `callvirt` opcode: -- +- -- +- ]]> @@ -2732,9 +2732,9 @@ is thrown if class cannot be found. This is typically detected when a Microsoft Intermediate Language (MSIL) instruction is converted to native code rather than at runtime. - The following method overload can use the `castclass` opcode: + The following method overload can use the `castclass` opcode: -- +- ]]> @@ -2803,9 +2803,9 @@ For floating-point number, `ceq` will return 0 if the numbers are unordered (either or both are NaN). The infinite values are equal to themselves. - The following method overload can use the `ceq` opcode: + The following method overload can use the `ceq` opcode: -- +- ]]> @@ -2874,9 +2874,9 @@ - For floating-point numbers, `cgt` returns 0 if the numbers are unordered (that is, if one or both of the arguments are NaN). - The following method overload can use the `cgt` opcode: + The following method overload can use the `cgt` opcode: -- +- ]]> @@ -2949,9 +2949,9 @@ Otherwise an `int32` value of 0 is pushed on the stack. - The following method overload can use the `cgt.un` opcode: + The following method overload can use the `cgt.un` opcode: -- +- ]]> @@ -3020,9 +3020,9 @@ Note that a special exception or a derived class of may be more appropriate, passing the incorrect value to the exception handler. - The following method overload can use the `ckfinite` opcode: + The following method overload can use the `ckfinite` opcode: -- +- ]]> @@ -3091,9 +3091,9 @@ - For floating-point numbers, `clt` returns 0 if the numbers are unordered (that is, if one or both of the arguments are NaN). - The following method overload can use the `clt` opcode: + The following method overload can use the `clt` opcode: -- +- ]]> @@ -3168,9 +3168,9 @@ Otherwise, an `int32` value of 0 is pushed on the stack. - The following method overload can use the `clt.un` opcode: + The following method overload can use the `clt.un` opcode: -- +- ]]> @@ -3252,9 +3252,9 @@ The `constrained` prefix can also be used for invocation of interface methods on value types, because the value type method implementing the interface method can be changed using a `MethodImpl`. If the `constrained` prefix is not used, the compiler is forced to choose which of the value type's methods to bind to at compile time. Using the `constrained` prefix allows the MSIL to bind to the method that implements the interface method at run time, rather than at compile time. - The following method overload can use the `constrained` opcode: + The following method overload can use the `constrained` opcode: -- +- ]]> @@ -3325,9 +3325,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i` opcode: + The following method overload can use the `conv.i` opcode: -- +- ]]> @@ -3398,9 +3398,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i1` opcode: + The following method overload can use the `conv.i1` opcode: -- +- ]]> @@ -3471,9 +3471,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i2` opcode: + The following method overload can use the `conv.i2` opcode: -- +- ]]> @@ -3544,9 +3544,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i4` opcode: + The following method overload can use the `conv.i4` opcode: -- +- ]]> @@ -3617,9 +3617,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i8` opcode: + The following method overload can use the `conv.i8` opcode: -- +- ]]> @@ -3688,9 +3688,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i` opcode: + The following method overload can use the `conv.ovf.i` opcode: -- +- ]]> @@ -3759,9 +3759,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i.un` opcode: + The following method overload can use the `conv.ovf.i.un` opcode: -- +- ]]> @@ -3830,9 +3830,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i1` opcode: + The following method overload can use the `conv.ovf.i1` opcode: -- +- ]]> @@ -3901,9 +3901,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i1.un` opcode: + The following method overload can use the `conv.ovf.i1.un` opcode: -- +- ]]> @@ -3972,9 +3972,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i2` opcode: + The following method overload can use the `conv.ovf.i2` opcode: -- +- ]]> @@ -4043,9 +4043,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i2.un` opcode: + The following method overload can use the `conv.ovf.i2.un` opcode: -- +- ]]> @@ -4114,9 +4114,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i4` opcode: + The following method overload can use the `conv.ovf.i4` opcode: -- +- ]]> @@ -4185,9 +4185,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i4.un` opcode: + The following method overload can use the `conv.ovf.i4.un` opcode: -- +- ]]> @@ -4256,9 +4256,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i8` opcode: + The following method overload can use the `conv.ovf.i8` opcode: -- +- ]]> @@ -4327,9 +4327,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i8.un` opcode: + The following method overload can use the `conv.ovf.i8.un` opcode: -- +- ]]> @@ -4398,9 +4398,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u` opcode: + The following method overload can use the `conv.ovf.u` opcode: -- +- ]]> @@ -4469,9 +4469,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.uvf.u.un` opcode: + The following method overload can use the `conv.uvf.u.un` opcode: -- +- ]]> @@ -4540,9 +4540,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u1` opcode: + The following method overload can use the `conv.ovf.u1` opcode: -- +- ]]> @@ -4611,9 +4611,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u1.un` opcode: + The following method overload can use the `conv.ovf.u1.un` opcode: -- +- ]]> @@ -4682,9 +4682,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u2` opcode: + The following method overload can use the `conv.ovf.u2` opcode: -- +- ]]> @@ -4753,9 +4753,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u2.un` opcode: + The following method overload can use the `conv.ovf.u2.un` opcode: -- +- ]]> @@ -4824,9 +4824,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u4` opcode: + The following method overload can use the `conv.ovf.u4` opcode: -- +- ]]> @@ -4895,9 +4895,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u4.un` opcode: + The following method overload can use the `conv.ovf.u4.un` opcode: -- +- ]]> @@ -4966,9 +4966,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u8` opcode: + The following method overload can use the `conv.ovf.u8` opcode: -- +- ]]> @@ -5037,9 +5037,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u8.un` opcode: + The following method overload can use the `conv.ovf.u8.un` opcode: -- +- ]]> @@ -5110,9 +5110,9 @@ No exceptions are ever thrown when using this field. - The following method overload can use the `conv.r.un` opcode: + The following method overload can use the `conv.r.un` opcode: -- +- ]]> @@ -5183,9 +5183,9 @@ No exceptions are ever thrown when using this field. - The following method overload can use the `conv.r4` opcode: + The following method overload can use the `conv.r4` opcode: -- +- ]]> @@ -5256,9 +5256,9 @@ No exceptions are ever thrown when using this field. - The following method overload can use the `conv.r8` opcode: + The following method overload can use the `conv.r8` opcode: -- +- ]]> @@ -5329,9 +5329,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u` opcode: + The following method overload can use the `conv.u` opcode: -- +- ]]> @@ -5402,9 +5402,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u1` opcode: + The following method overload can use the `conv.u1` opcode: -- +- ]]> @@ -5475,9 +5475,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u2` opcode: + The following method overload can use the `conv.u2` opcode: -- +- ]]> @@ -5548,9 +5548,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u4` opcode: + The following method overload can use the `conv.u4` opcode: -- +- ]]> @@ -5621,9 +5621,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u8` opcode: + The following method overload can use the `conv.u8` opcode: -- +- ]]> @@ -5696,9 +5696,9 @@ may be thrown if an invalid address is detected. - The following method overload can use the `cpblk` opcode: + The following method overload can use the `cpblk` opcode: -- +- ]]> @@ -5765,9 +5765,9 @@ may be thrown if an invalid address is detected. - The following method overload can use the `cpobj` opcode: + The following method overload can use the `cpobj` opcode: -- +- ]]> @@ -5852,9 +5852,9 @@ Note that on Intel-based platforms an is thrown when computing (minint div -1). Floating-point operations never throw an exception (they produce NaNs or infinities instead). - The following method overload can use the `div` opcode: + The following method overload can use the `div` opcode: -- +- ]]> @@ -5921,9 +5921,9 @@ The `div.un` instruction computes `value1` divided by `value2`, both taken as unsigned integers, and pushes the `result` on the stack. - The following method overload can use the `div.un` opcode: + The following method overload can use the `div.un` opcode: -- +- ]]> @@ -5990,9 +5990,9 @@ The `dup` instruction duplicates the top element of the stack, and leaves two identical values atop it. - The following method overload can use the `dup` opcode: + The following method overload can use the `dup` opcode: -- +- ]]> @@ -6065,9 +6065,9 @@ Control cannot be transferred into a filter block except through the exception mechanism. Control cannot be transferred out of a filter block except through the use of a `throw` instruction or by executing the final `endfilter` instruction. You cannot embed a `try` block within a `filter` block. If an exception is thrown inside the `filter` block, it is intercepted and a value of 0 (`exception_continue_search`) is returned. - The following method overload can use the `endfilter` opcode: + The following method overload can use the `endfilter` opcode: -- +- ]]> @@ -6132,9 +6132,9 @@ Note that the `endfault` and `endfinally` instructions are aliases - they correspond to the same opcode. - The following method overload can use the `endfinally` (`endfault`) opcode, as well as the `ILGenerator` method . + The following method overload can use the `endfinally` (`endfault`) opcode, as well as the `ILGenerator` method . -- +- - @@ -6207,9 +6207,9 @@ may be thrown if an invalid address is detected. - The following method overload can use the `initblk` opcode: + The following method overload can use the `initblk` opcode: -- +- ]]> @@ -6274,9 +6274,9 @@ Unlike , `initobj` does not call the constructor method. `Initobj` is intended for initializing value types, while `newobj` is used to allocate and initialize objects. - The following method overload can use the `initobj` opcode: + The following method overload can use the `initobj` opcode: -- +- ]]> @@ -6343,9 +6343,9 @@ is thrown if class cannot be found. This is typically detected when the Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at runtime. - The following method overload can use the `isinst` opcode: + The following method overload can use the `isinst` opcode: -- +- ]]> @@ -6408,9 +6408,9 @@ The `jmp` instruction cannot be used to transferred control out of a `try`, `filter`, `catch`, or `finally` block. - The following method overload can use the `jmp` opcode: + The following method overload can use the `jmp` opcode: -- +- ]]> @@ -6475,9 +6475,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg` opcode: + The following method overload can use the `ldarg` opcode: -- +- ]]> @@ -6542,9 +6542,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.0` opcode: + The following method overload can use the `ldarg.0` opcode: -- +- ]]> @@ -6609,9 +6609,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.1` opcode: + The following method overload can use the `ldarg.1` opcode: -- +- ]]> @@ -6676,9 +6676,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.2` opcode: + The following method overload can use the `ldarg.2` opcode: -- +- ]]> @@ -6743,9 +6743,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.3` opcode: + The following method overload can use the `ldarg.3` opcode: -- +- ]]> @@ -6812,9 +6812,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.s` opcode: + The following method overload can use the `ldarg.s` opcode: -- +- ]]> @@ -6879,9 +6879,9 @@ `ldarga` is used for by-ref parameter passing. For other cases, and should be used. - The following method overload can use the `ldarga` opcode: + The following method overload can use the `ldarga` opcode: -- +- ]]> @@ -6948,9 +6948,9 @@ `ldarga.s` is used for by-ref parameter passing. For other cases, and should be used. - The following method overload can use the `ldarga.s` opcode: + The following method overload can use the `ldarga.s` opcode: -- +- ]]> @@ -7017,9 +7017,9 @@ 3. Use a short form instruction followed by a for constants that can be expressed in 8 or fewer bits. - The following method overload can use the `ldc.i4` opcode: + The following method overload can use the `ldc.i4` opcode: -- +- ]]> @@ -7080,9 +7080,9 @@ This is a special short encoding for the push of the integer value 0. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.0` opcode: + The following method overload can use the `ldc.i4.0` opcode: -- +- ]]> @@ -7143,9 +7143,9 @@ This is a special short encoding for the push of the integer value 1. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.1` opcode: + The following method overload can use the `ldc.i4.1` opcode: -- +- ]]> @@ -7206,9 +7206,9 @@ This is a special short encoding for the push of the integer value 2. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.2` opcode: + The following method overload can use the `ldc.i4.2` opcode: -- +- ]]> @@ -7269,9 +7269,9 @@ This is a special short encoding for the push of the integer value 3. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.3` opcode: + The following method overload can use the `ldc.i4.3` opcode: -- +- ]]> @@ -7332,9 +7332,9 @@ This is a special short encoding for the push of the integer value 4. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.4` opcode: + The following method overload can use the `ldc.i4.4` opcode: -- +- ]]> @@ -7395,9 +7395,9 @@ This is a special short encoding for the push of the integer value 5. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.5` opcode: + The following method overload can use the `ldc.i4.5` opcode: -- +- ]]> @@ -7458,9 +7458,9 @@ This is a special short encoding for the push of the integer value 6. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.6` opcode: + The following method overload can use the `ldc.i4.6` opcode: -- +- ]]> @@ -7521,9 +7521,9 @@ This is a special short encoding for the push of the integer value 7. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.7` opcode: + The following method overload can use the `ldc.i4.7` opcode: -- +- ]]> @@ -7584,9 +7584,9 @@ This is a special short encoding for the push of the integer value 8. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.8` opcode: + The following method overload can use the `ldc.i4.8` opcode: -- +- ]]> @@ -7647,9 +7647,9 @@ This is a special short encoding for the push of the integer value -1. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.m1` opcode: + The following method overload can use the `ldc.i4.m1` opcode: -- +- ]]> @@ -7710,7 +7710,7 @@ `ldc.i4.s` is a more efficient encoding for pushing the integers from -128 to 127 onto the evaluation stack. -The following method overloads can use the `ldc.i4.s` opcode: +The following method overloads can use the `ldc.i4.s` opcode: - - @@ -7774,9 +7774,9 @@ The following method overloads This encoding pushes an `int64` value onto the stack. - The following method overload can use the `ldc.i8` opcode: + The following method overload can use the `ldc.i8` opcode: -- +- ]]> @@ -7837,9 +7837,9 @@ The following method overloads This encoding pushes a `float32` value onto the stack. - The following method overload can use the `ldc.r4` opcode: + The following method overload can use the `ldc.r4` opcode: -- +- ]]> @@ -7900,9 +7900,9 @@ The following method overloads This encoding pushes a `float64` value onto the stack. - The following method overload can use the `ldc.r8` opcode: + The following method overload can use the `ldc.r8` opcode: -- +- ]]> @@ -7974,9 +7974,9 @@ The following method overloads is thrown if `index` is negative, or larger than the upper bound of `array`. - The following method overload can use the `ldelem` opcode: + The following method overload can use the `ldelem` opcode: -- +- ]]> @@ -8053,9 +8053,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i` opcode: + The following method overload can use the `ldelem.i` opcode: -- +- ]]> @@ -8132,9 +8132,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i1` opcode: + The following method overload can use the `ldelem.i1` opcode: -- +- ]]> @@ -8211,9 +8211,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i2` opcode: + The following method overload can use the `ldelem.i2` opcode: -- +- ]]> @@ -8290,9 +8290,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i4` opcode: + The following method overload can use the `ldelem.i4` opcode: -- +- ]]> @@ -8369,9 +8369,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i8` opcode: + The following method overload can use the `ldelem.i8` opcode: -- +- ]]> @@ -8448,9 +8448,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.r4` opcode: + The following method overload can use the `ldelem.r4` opcode: -- +- ]]> @@ -8527,9 +8527,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.r8` opcode: + The following method overload can use the `ldelem.r8` opcode: -- +- ]]> @@ -8604,9 +8604,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.ref` opcode: + The following method overload can use the `ldelem.ref` opcode: -- +- ]]> @@ -8683,9 +8683,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.u1` opcode: + The following method overload can use the `ldelem.u1` opcode: -- +- ]]> @@ -8762,9 +8762,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.u2` opcode: + The following method overload can use the `ldelem.u2` opcode: -- +- ]]> @@ -8841,9 +8841,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.u4` opcode: + The following method overload can use the `ldelem.u4` opcode: -- +- ]]> @@ -8920,9 +8920,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelema` opcode: + The following method overload can use the `ldelema` opcode: -- +- ]]> @@ -8993,9 +8993,9 @@ The following method overloads is thrown if the specified field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at run time. - The following method overload can use the `ldfld` opcode: + The following method overload can use the `ldfld` opcode: -- +- ]]> @@ -9070,9 +9070,9 @@ The following method overloads is thrown if the specified field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at run time. - The following method overload can use the `ldflda` opcode: + The following method overload can use the `ldflda` opcode: -- +- ]]> @@ -9135,9 +9135,9 @@ The following method overloads The value returned points to native code using the CLR calling convention. This method pointer should not be passed to unmanaged native code as a callback routine. - The following method overload can use the `ldftn` opcode: + The following method overload can use the `ldftn` opcode: -- +- ]]> @@ -9212,9 +9212,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i` opcode: + The following method overload can use the `ldind.i` opcode: -- +- ]]> @@ -9289,9 +9289,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i1` opcode: + The following method overload can use the `ldind.i1` opcode: -- +- ]]> @@ -9366,9 +9366,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i2` opcode: + The following method overload can use the `ldind.i2` opcode: -- +- ]]> @@ -9443,9 +9443,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i4` opcode: + The following method overload can use the `ldind.i4` opcode: -- +- ]]> @@ -9520,9 +9520,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i8` opcode: + The following method overload can use the `ldind.i8` opcode: -- +- ]]> @@ -9597,9 +9597,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.r4` opcode: + The following method overload can use the `ldind.r4` opcode: -- +- ]]> @@ -9674,9 +9674,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.r8` opcode: + The following method overload can use the `ldind.r8` opcode: -- +- ]]> @@ -9751,9 +9751,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.ref` opcode: + The following method overload can use the `ldind.ref` opcode: -- +- ]]> @@ -9828,9 +9828,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.u1` opcode: + The following method overload can use the `ldind.u1` opcode: -- +- ]]> @@ -9905,9 +9905,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.u2` opcode: + The following method overload can use the `ldind.u2` opcode: -- +- ]]> @@ -9982,9 +9982,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.u4` opcode: + The following method overload can use the `ldind.u4` opcode: -- +- ]]> @@ -10051,9 +10051,9 @@ The following method overloads is thrown if the array reference is a null reference. - The following method overload can use the `ldlen` opcode: + The following method overload can use the `ldlen` opcode: -- +- ]]> @@ -10118,11 +10118,11 @@ The following method overloads The type of the value is the same as the type of the local variable, which is specified in the method header. See Partition I. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overloads can use the `ldloc` opcode: + The following method overloads can use the `ldloc` opcode: -- +- -- +- ]]> @@ -10185,9 +10185,9 @@ The following method overloads The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldloc.0` opcode: + The following method overload can use the `ldloc.0` opcode: -- +- ]]> @@ -10250,9 +10250,9 @@ The following method overloads The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldloc.1` opcode: + The following method overload can use the `ldloc.1` opcode: -- +- ]]> @@ -10315,9 +10315,9 @@ The following method overloads The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldloc.2` opcode: + The following method overload can use the `ldloc.2` opcode: -- +- ]]> @@ -10380,9 +10380,9 @@ The following method overloads The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldloc.3` opcode: + The following method overload can use the `ldloc.3` opcode: -- +- ]]> @@ -10445,11 +10445,11 @@ The following method overloads The type of the value is the same as the type of the local variable, which is specified in the method header. See Partition I. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overloads can use the `ldloc.s` opcode: + The following method overloads can use the `ldloc.s` opcode: -- +- -- +- ]]> @@ -10510,9 +10510,9 @@ The following method overloads The `ldloca` instruction pushes the address of the local variable number at the passed index onto the stack, where local variables are numbered 0 onwards. The value pushed on the stack is already aligned correctly for use with instructions like and . The result is a managed pointer (type `&`). The local variable is stored in unmanaged memory, so the return value can be converted to an unmanaged pointer without pinning. - The following method overload can use the `ldloca` opcode: + The following method overload can use the `ldloca` opcode: -- +- ]]> @@ -10575,9 +10575,9 @@ The following method overloads The `ldloca.s` instruction provides an efficient encoding for use with the local variables 0 through 255. - The following method overload can use the `ldloca.s` opcode: + The following method overload can use the `ldloca.s` opcode: -- +- ]]> @@ -10640,9 +10640,9 @@ The following method overloads `ldnull` provides a null reference that is size-independent. - The following method overload can use the `ldnull` opcode: + The following method overload can use the `ldnull` opcode: -- +- ]]> @@ -10713,9 +10713,9 @@ The following method overloads is thrown if class cannot be found. This is typically detected when the Microsoft Intermediate Language (MSIL) instruction is converted to native code rather than at runtime. - The following method overload can use the `ldobj` opcode: + The following method overload can use the `ldobj` opcode: -- +- ]]> @@ -10778,9 +10778,9 @@ The following method overloads The `ldsfld` instruction can have a prefix. - The following method overload can use the `ldsfld` opcode: + The following method overload can use the `ldsfld` opcode: -- +- ]]> @@ -10845,9 +10845,9 @@ The following method overloads is thrown if field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at runtime. - The following method overload can use the `ldsflda` opcode: + The following method overload can use the `ldsflda` opcode: -- +- ]]> @@ -10910,9 +10910,9 @@ The following method overloads The Common Language Infrastructure (CLI) guarantees that the result of two `ldstr` instructions referring to two metadata tokens that have the same sequence of characters return precisely the same string object (a process known as "string interning"). - The following method overload can use the `ldstr` opcode: + The following method overload can use the `ldstr` opcode: -- +- ]]> @@ -10977,13 +10977,13 @@ The following method overloads For information on runtime handles, see the following classes: , , and . - The following method overloads can use the `ldtoken` opcode: + The following method overloads can use the `ldtoken` opcode: -- +- -- +- -- +- ]]> @@ -11050,9 +11050,9 @@ The following method overloads The unmanaged pointer points to native code using the CLR calling convention. This method pointer should not be passed to unmanaged native code as a callback routine. - The following method overload can use the `ldvirtftn` opcode: + The following method overload can use the `ldvirtftn` opcode: -- +- ]]> @@ -11117,9 +11117,9 @@ The following method overloads If an instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. - The following method overloads can use the `leave` opcode: + The following method overloads can use the `leave` opcode: -- +- ]]> @@ -11184,9 +11184,9 @@ The following method overloads If an instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. - The following method overload can use the `leave.s` opcode: + The following method overload can use the `leave.s` opcode: -- +- ]]> @@ -11257,9 +11257,9 @@ The following method overloads is thrown if there is insufficient memory to service the request. - The following method overload can use the `localloc` opcode: + The following method overload can use the `localloc` opcode: -- +- ]]> @@ -11328,9 +11328,9 @@ The following method overloads is thrown if `class` cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at runtime. - The following method overload can use the `mkrefany` opcode: + The following method overload can use the `mkrefany` opcode: -- +- ]]> @@ -11401,9 +11401,9 @@ The following method overloads For floating-point types, 0 * infinity = NaN. - The following method overload can use the `mul` opcode: + The following method overload can use the `mul` opcode: -- +- ]]> @@ -11472,9 +11472,9 @@ The following method overloads is thrown if the result can not be represented in the result type. - The following method overload can use the `mul.ovf` opcode: + The following method overload can use the `mul.ovf` opcode: -- +- ]]> @@ -11543,9 +11543,9 @@ The following method overloads is thrown if the result can not be represented in the result type. - The following method overload can use the `mul.ovf.un` opcode: + The following method overload can use the `mul.ovf.un` opcode: -- +- ]]> @@ -11614,9 +11614,9 @@ The following method overloads Negating a floating-point number cannot overflow, and negating NaN returns NaN. - The following method overload can use the `neg` opcode: + The following method overload can use the `neg` opcode: -- +- ]]> @@ -11691,9 +11691,9 @@ The following method overloads is thrown if `numElems` is less than 0. - The following method overload can use the `newarr` opcode: + The following method overload can use the `newarr` opcode: -- +- ]]> @@ -11770,9 +11770,9 @@ The following method overloads is thrown if a constructor method `ctor` with the indicated name, class and signature could not be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code, rather than at runtime. - The following method overload can use the `newobj` opcode: + The following method overload can use the `newobj` opcode: -- +- ]]> @@ -11831,9 +11831,9 @@ The following method overloads The `nop` operation does nothing. It is intended to fill in space if opcodes are patched. - The following method overload can use the `nop` opcode: + The following method overload can use the `nop` opcode: -- +- ]]> @@ -11898,9 +11898,9 @@ The following method overloads The `not` instruction computes the bitwise complement of an integer value and pushes the result onto the stack. The return type is the same as the operand type. - The following method overload can use the `not` opcode: + The following method overload can use the `not` opcode: -- +- ]]> @@ -11969,9 +11969,9 @@ The following method overloads `Or` is an integer-specific operation. - The following method overload can use the `or` opcode: + The following method overload can use the `or` opcode: -- +- ]]> @@ -12032,9 +12032,9 @@ The following method overloads The `pop` instruction removes the top element from the stack. - The following method overload can use the `pop` opcode: + The following method overload can use the `pop` opcode: -- +- ]]> @@ -12460,9 +12460,9 @@ callvirt m In general it would be unsafe to skip the run-time check if the array held elements of a reference type. To be safe, it is necessary to ensure that no modifications to the array are made through this pointer. The verifier rules ensure this. The restricted managed pointer can be passed as the object of instance method calls, so it is not strictly speaking read-only for value types, but there is no type safety problem for value types. - The following method overload can use the `readonly` opcode: + The following method overload can use the `readonly` opcode: -- +- ]]> @@ -12529,9 +12529,9 @@ callvirt m The `refanytype` instruction retrieves the type token embedded in the typed reference. See the instruction for information on creating typed references. - The following method overload can use the `refanytype` opcode: + The following method overload can use the `refanytype` opcode: -- +- ]]> @@ -12602,9 +12602,9 @@ callvirt m is thrown if `type` cannot be found. - The following method overload can use the `refanyval` opcode: + The following method overload can use the `refanyval` opcode: -- +- ]]> @@ -12682,9 +12682,9 @@ callvirt m Note that on the Intel-based platforms an is thrown when computing (minint `rem` -1). - The following method overload can use the `rem` opcode: + The following method overload can use the `rem` opcode: -- +- ]]> @@ -12761,9 +12761,9 @@ callvirt m Integral operations throw if `value2` is zero. - The following method overload can use the `rem.un` opcode: + The following method overload can use the `rem.un` opcode: -- +- ]]> @@ -12830,9 +12830,9 @@ callvirt m The `ret` instruction cannot be used to transfer control out of a`try`, `filter`, `catch`, or `finally` block. From within a `try` or `catch`, use the instruction with a destination of a `ret` instruction that is outside all enclosing exception blocks. Because the `filter` and `finally` blocks are logically part of exception handling and not the method in which their code is embedded, correctly generated Microsoft Intermediate Language (MSIL) instructions do not perform a method return from within a `filter` or `finally`. - The following method overload can use the `ret` opcode: + The following method overload can use the `ret` opcode: -- +- ]]> @@ -12891,9 +12891,9 @@ callvirt m The `rethrow` instruction is only permitted within the body of a `catch` handler. It throws the same exception that was caught by this handler. - The following method overload can use the `rethrow` opcode: + The following method overload can use the `rethrow` opcode: -- +- ]]> @@ -12962,9 +12962,9 @@ callvirt m `Shl` inserts a zero bit in the lowest position on each shift. - The following method overload can use the `shl` opcode: + The following method overload can use the `shl` opcode: -- +- ]]> @@ -13033,9 +13033,9 @@ callvirt m `Shr` replicates the high order bit on each shift, preserving the sign of the original value in the `result`. - The following method overload can use the `shr` opcode: + The following method overload can use the `shr` opcode: -- +- ]]> @@ -13104,9 +13104,9 @@ callvirt m `Shr.un` inserts a zero bit in the highest position on each shift. - The following method overload can use the `shr.un` opcode: + The following method overload can use the `shr.un` opcode: -- +- ]]> @@ -13169,9 +13169,9 @@ callvirt m For a reference type, the size returned is the size of a reference value of the corresponding type (4 bytes on 32-bit systems), not the size of the data stored in objects referred to by the reference value. A generic type parameter can be used only in the body of the type or method that defines it. When that type or method is instantiated, the generic type parameter is replaced by a value type or reference type. - The following method overload can use the `sizeof` opcode: + The following method overload can use the `sizeof` opcode: -- +- ]]> @@ -13237,9 +13237,9 @@ callvirt m Performing a store into arguments that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the argument. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `starg` opcode: + The following method overload can use the `starg` opcode: -- +- ]]> @@ -13306,9 +13306,9 @@ callvirt m Performing a store into arguments that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the argument. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `starg.s` opcode: + The following method overload can use the `starg.s` opcode: -- +- ]]> @@ -13382,9 +13382,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem` opcode: + The following method overload can use the `stelem` opcode: -- +- ]]> @@ -13459,9 +13459,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i` opcode: + The following method overload can use the `stelem.i` opcode: -- +- ]]> @@ -13536,9 +13536,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i1` opcode: + The following method overload can use the `stelem.i1` opcode: -- +- ]]> @@ -13613,9 +13613,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i2` opcode: + The following method overload can use the `stelem.i2` opcode: -- +- ]]> @@ -13690,9 +13690,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i4` opcode: + The following method overload can use the `stelem.i4` opcode: -- +- ]]> @@ -13767,9 +13767,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i8` opcode: + The following method overload can use the `stelem.i8` opcode: -- +- ]]> @@ -13844,9 +13844,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.r4` opcode: + The following method overload can use the `stelem.r4` opcode: -- +- ]]> @@ -13921,9 +13921,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.r8` opcode: + The following method overload can use the `stelem.r8` opcode: -- +- ]]> @@ -13992,7 +13992,7 @@ callvirt m Arrays are objects and hence represented by a value of type `O`. The index is type `native int`. - Note that `stelem.ref` implicitly casts the supplied value to the element type of `array` before assigning the value to the array element. This cast can fail, even for verified code. Thus the `stelem.ref` instruction can throw . For one-dimensional arrays that aren't zero-based and for multidimensional arrays, the class provides a method. + Note that `stelem.ref` implicitly casts the supplied value to the element type of `array` before assigning the value to the array element. This cast can fail, even for verified code. Thus the `stelem.ref` instruction can throw . For one-dimensional arrays that aren't zero-based and for multidimensional arrays, the class provides a method. is thrown if `array` is a null reference. @@ -14000,9 +14000,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.ref` opcode: + The following method overload can use the `stelem.ref` opcode: -- +- ]]> @@ -14071,9 +14071,9 @@ callvirt m is thrown if `field` is not found in the metadata. This is typically checked when the Microsoft Intermediate Language (MSIL) instruction is converted to native code, not at runtime. - The following method overload can use the `stfld` opcode: + The following method overload can use the `stfld` opcode: -- +- ]]> @@ -14142,9 +14142,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i` opcode: + The following method overload can use the `stind.i` opcode: -- +- ]]> @@ -14213,9 +14213,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i1` opcode: + The following method overload can use the `stind.i1` opcode: -- +- ]]> @@ -14284,9 +14284,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i2` opcode: + The following method overload can use the `stind.i2` opcode: -- +- ]]> @@ -14355,9 +14355,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i4` opcode: + The following method overload can use the `stind.i4` opcode: -- +- ]]> @@ -14426,9 +14426,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i8` opcode: + The following method overload can use the `stind.i8` opcode: -- +- ]]> @@ -14497,9 +14497,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.r4` opcode: + The following method overload can use the `stind.r4` opcode: -- +- ]]> @@ -14568,9 +14568,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.r8` opcode: + The following method overload can use the `stind.r8` opcode: -- +- ]]> @@ -14639,9 +14639,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.ref` opcode: + The following method overload can use the `stind.ref` opcode: -- +- ]]> @@ -14706,11 +14706,11 @@ callvirt m Correct Microsoft Intermediate Language (MSIL) instructions require that `index` be a valid local index. For the `stloc` instruction, `index` must lie in the range 0 to 65534 inclusive (specifically, 65535 is not valid). The reason for excluding 65535 is pragmatic: likely implementations will use a 2-byte integer to track both a local's index, as well as the total number of locals for a given method. If an index of 65535 had been made valid, it would require a wider integer to track the number of locals in such a method. - The following method overloads can use the `stloc` opcode: + The following method overloads can use the `stloc` opcode: -- +- -- +- ]]> @@ -14775,9 +14775,9 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `stloc.0` opcode: + The following method overload can use the `stloc.0` opcode: -- +- ]]> @@ -14842,9 +14842,9 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `stloc.1` opcode: + The following method overload can use the `stloc.1` opcode: -- +- ]]> @@ -14909,9 +14909,9 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `stloc.2` opcode: + The following method overload can use the `stloc.2` opcode: -- +- ]]> @@ -14976,9 +14976,9 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `stloc.3` opcode: + The following method overload can use the `stloc.3` opcode: -- +- ]]> @@ -15043,11 +15043,11 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overloads can use the `stloc.s` opcode: + The following method overloads can use the `stloc.s` opcode: -- +- -- +- ]]> @@ -15116,9 +15116,9 @@ callvirt m is thrown if class cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at run time. - The following method overload can use the `stobj` opcode: + The following method overload can use the `stobj` opcode: -- +- ]]> @@ -15185,9 +15185,9 @@ callvirt m is thrown if field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at run time. - The following method overload can use the `stsfld` opcode: + The following method overload can use the `stsfld` opcode: -- +- ]]> @@ -15258,9 +15258,9 @@ callvirt m Floating-point overflow returns `+inf` (`PositiveInfinity`) or `-inf` (`NegativeInfinity`). - The following method overload can use the `sub` opcode: + The following method overload can use the `sub` opcode: -- +- ]]> @@ -15329,9 +15329,9 @@ callvirt m This operation is performed on signed integers; for floating-point values, use . - The following method overload can use the `sub.ovf` opcode: + The following method overload can use the `sub.ovf` opcode: -- +- ]]> @@ -15400,9 +15400,9 @@ callvirt m This operation is performed on signed integers; for floating-point values, use . - The following method overload can use the `sub.ovf.un` opcode: + The following method overload can use the `sub.ovf.un` opcode: -- +- ]]> @@ -15471,9 +15471,9 @@ callvirt m Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. (Such transfers are severely restricted and must use the leave instruction instead). - The following method overload can use the `switch` opcode. The `Label[]` argument is an array of Labels representing 32-bit offsets. + The following method overload can use the `switch` opcode. The `Label[]` argument is an array of Labels representing 32-bit offsets. -- +- @@ -15544,9 +15544,9 @@ callvirt m The current frame cannot be discarded when control is transferred from untrusted code to trusted code, since this would jeopardize code identity security. The .NET Framework security checks can therefore cause the `tail` to be ignored, leaving a standard instruction. Similarly, in order to allow the exit of a synchronized region to occur after the call returns, the `tail` prefix is ignored when used to exit a method that is marked synchronized. - The following method overload can use the `tail` opcode: + The following method overload can use the `tail` opcode: -- +- ]]> @@ -15681,9 +15681,9 @@ callvirt m is thrown if the object reference is a null reference. - The following method overload can use the `throw` opcode: + The following method overload can use the `throw` opcode: -- +- ]]> @@ -15750,11 +15750,11 @@ callvirt m The `unaligned` and `volatile` prefixes can be combined in either order. They must immediately precede a `ldind`, `stind`, `ldfld`, `stfld`, `ldobj`, `stobj`, `initblk`, or `cpblk` instruction. Only the prefix is allowed for the and instructions. - The following method overloads can use the `unaligned` opcode: + The following method overloads can use the `unaligned` opcode: -- +- -- +- ]]> @@ -15833,9 +15833,9 @@ callvirt m is thrown if the value type `valType` cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code, rather than at runtime. - The following method overload can use the `unbox` opcode: + The following method overload can use the `unbox` opcode: -- +- ]]> @@ -15907,9 +15907,9 @@ callvirt m is thrown if `obj` is a null reference. - The following method overload can use the `unbox.any` opcode: + The following method overload can use the `unbox.any` opcode: -- +- ]]> @@ -15972,9 +15972,9 @@ callvirt m The and `volatile` prefixes can be combined in either order. They must immediately precede a `ldind`, `stind`, `ldfld`, `stfld`, `ldobj`, `stobj`, `initblk`, or `cpblk` instruction. Only the `volatile` prefix is allowed for the and instructions. - The following method overload can use the `volatile` opcode: + The following method overload can use the `volatile` opcode: -- +- ]]> @@ -16043,9 +16043,9 @@ callvirt m `Xor` is an integer-specific operation. - The following method overload can use the `xor` opcode: + The following method overload can use the `xor` opcode: -- +- ]]> diff --git a/xml/System.Reflection.Emit/ParameterBuilder.xml b/xml/System.Reflection.Emit/ParameterBuilder.xml index 7d2f9d80a3c..b81707f57e0 100644 --- a/xml/System.Reflection.Emit/ParameterBuilder.xml +++ b/xml/System.Reflection.Emit/ParameterBuilder.xml @@ -82,7 +82,7 @@ ## Remarks Parameter attributes need to consistent with the method signature. If you specify `Out` attributes for a parameter, you should ensure that the type of that method parameter is a `ByRef` type. - Some attributes require that you call with viable parameters in order for the Microsoft intermediate language (MSIL) to work correctly at runtime. For example, if you define a with ParameterAttributes.Out for parameter 1 of a `MethodBuilder`, then parameter 1 of must be a reference such as Type.GetType("System.String&"), rather than Type.GetType("System.String"). + Some attributes require that you call with viable parameters in order for the Microsoft intermediate language (MSIL) to work correctly at runtime. For example, if you define a with ParameterAttributes.Out for parameter 1 of a `MethodBuilder`, then parameter 1 of must be a reference such as Type.GetType("System.String&"), rather than Type.GetType("System.String"). diff --git a/xml/System.Reflection.Emit/ParameterToken.xml b/xml/System.Reflection.Emit/ParameterToken.xml index 2b093dbb083..56929f30de9 100644 --- a/xml/System.Reflection.Emit/ParameterToken.xml +++ b/xml/System.Reflection.Emit/ParameterToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/PropertyBuilder.xml b/xml/System.Reflection.Emit/PropertyBuilder.xml index c5b6548520f..ce44322dd50 100644 --- a/xml/System.Reflection.Emit/PropertyBuilder.xml +++ b/xml/System.Reflection.Emit/PropertyBuilder.xml @@ -85,7 +85,7 @@ ## Examples - The following code sample demonstrates how to implement properties in a dynamic type using a `PropertyBuilder` obtained via to create the property framework and an associated to implement the IL logic within the property. + The following code sample demonstrates how to implement properties in a dynamic type using a `PropertyBuilder` obtained via to create the property framework and an associated to implement the IL logic within the property. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/PropertyBuilder/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/PropertyBuilder/Overview/source.vb" id="Snippet1"::: @@ -1673,7 +1673,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati or , retrieve the object from the type, and call . + To set the value of a property, reflect on the property's parent type using or , retrieve the object from the type, and call . ]]> @@ -1736,7 +1736,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati or , retrieve the object from the type, and call . + To set the value of a property, reflect on the property's parent type using or , retrieve the object from the type, and call . ]]> diff --git a/xml/System.Reflection.Emit/PropertyToken.xml b/xml/System.Reflection.Emit/PropertyToken.xml index 9bccef5812d..1b875c4acd6 100644 --- a/xml/System.Reflection.Emit/PropertyToken.xml +++ b/xml/System.Reflection.Emit/PropertyToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/SignatureHelper.xml b/xml/System.Reflection.Emit/SignatureHelper.xml index e246d5f3225..11701c82d1c 100644 --- a/xml/System.Reflection.Emit/SignatureHelper.xml +++ b/xml/System.Reflection.Emit/SignatureHelper.xml @@ -76,7 +76,7 @@ class to create a signature blob that can be passed to the method of the class. A object can also be passed to the method overload to insert an instruction and a signature token into a Microsoft intermediate language (MSIL) stream. For information on signature blobs and signature metadata, see the ECMA Partition II Metadata documentation. + Use the class to create a signature blob that can be passed to the method of the class. A object can also be passed to the method overload to insert an instruction and a signature token into a Microsoft intermediate language (MSIL) stream. For information on signature blobs and signature metadata, see the ECMA Partition II Metadata documentation. For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -140,7 +140,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: method overload. + To add an argument with optional or required custom modifiers, use the method overload. ]]> @@ -203,7 +203,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: method overload. + To add an argument with optional or required custom modifiers, use the method overload. ]]> @@ -993,7 +993,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: ## Remarks This overload creates a signature with a standard calling convention. - To create a method signature with custom modifiers, use the method overload and then use the or method overloads to add arguments with custom modifiers. + To create a method signature with custom modifiers, use the method overload and then use the or method overloads to add arguments with custom modifiers. ]]> @@ -1082,7 +1082,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: method overload. + To create a signature helper for a property with optional or required custom modifiers, use the method overload. ]]> @@ -1204,7 +1204,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: ## Remarks See the namespace for classes that represent custom modifiers. - If a property has no custom modifiers, use the method overload. + If a property has no custom modifiers, use the method overload. ]]> @@ -1347,7 +1347,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: ## Remarks See the namespace for classes that represent custom modifiers. - If a property has no custom modifiers, use the method overload. + If a property has no custom modifiers, use the method overload. > [!NOTE] > This method overload is introduced in the .NET Framework 3.5 or later. diff --git a/xml/System.Reflection.Emit/SignatureToken.xml b/xml/System.Reflection.Emit/SignatureToken.xml index c30f25b2e49..1dd30038951 100644 --- a/xml/System.Reflection.Emit/SignatureToken.xml +++ b/xml/System.Reflection.Emit/SignatureToken.xml @@ -195,7 +195,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -230,7 +230,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/StringToken.xml b/xml/System.Reflection.Emit/StringToken.xml index b56d7d155e6..fa5dc4d17ed 100644 --- a/xml/System.Reflection.Emit/StringToken.xml +++ b/xml/System.Reflection.Emit/StringToken.xml @@ -168,7 +168,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -203,7 +203,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/TypeBuilder.xml b/xml/System.Reflection.Emit/TypeBuilder.xml index 551fb287014..dfe7aa54dc9 100644 --- a/xml/System.Reflection.Emit/TypeBuilder.xml +++ b/xml/System.Reflection.Emit/TypeBuilder.xml @@ -399,7 +399,7 @@ The following code sample demonstrates how to build a type dynamically by using Read-only. The full name of this type qualified by the display name of the assembly. ) and the display name of the assembly (), separated by a comma and a space. +The format of the returned string is the concatenation of the full name of the type () and the display name of the assembly (), separated by a comma and a space. See for a description of the format of the display name of an assembly. ]]> @@ -567,18 +567,18 @@ See for a description of the format of the method must be called on the enclosing type before it is called on the nested type. + If this type is a nested type, the method must be called on the enclosing type before it is called on the nested type. - If the current type derives from an incomplete type or implements incomplete interfaces, call the method on the parent type and the interface types before calling it on the current type. + If the current type derives from an incomplete type or implements incomplete interfaces, call the method on the parent type and the interface types before calling it on the current type. - If the enclosing type contains a field that is a value type defined as a nested type (for example, a field that is an enumeration defined as a nested type), calling the method on the enclosing type will generate a event. This is because the loader cannot determine the size of the enclosing type until the nested type has been completed. The caller should define a handler for the event to complete the definition of the nested type by calling on the object that represents the nested type. The code example for this topic shows how to define such an event handler. + If the enclosing type contains a field that is a value type defined as a nested type (for example, a field that is an enumeration defined as a nested type), calling the method on the enclosing type will generate a event. This is because the loader cannot determine the size of the enclosing type until the nested type has been completed. The caller should define a handler for the event to complete the definition of the nested type by calling on the object that represents the nested type. The code example for this topic shows how to define such an event handler. - A type is created only once, no matter how many times the method is called. All calls return the same object. + A type is created only once, no matter how many times the method is called. All calls return the same object. ## Examples - The following code example shows how to define an event handler for the event, in order to call the method on a nested type during a call on the enclosing type. + The following code example shows how to define an event handler for the event, in order to call the method on a nested type during a call on the enclosing type. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/TypeBuilder/CreateType/nestedenum.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/TypeBuilder/CreateType/nestedenum.vb" id="Snippet1"::: @@ -876,9 +876,9 @@ See for a description of the format of the If you define a constructor for your dynamic type, a parameterless constructor is not provided. You have the following options for providing a parameterless constructor in addition to the constructor you defined: -- If you want a parameterless constructor that simply calls the parameterless constructor of the base class, you can use the method to create one (and optionally restrict access to it). Do not provide an implementation for this parameterless constructor. If you do, an exception is thrown when you try to use the constructor. No exception is thrown when the method is called. +- If you want a parameterless constructor that simply calls the parameterless constructor of the base class, you can use the method to create one (and optionally restrict access to it). Do not provide an implementation for this parameterless constructor. If you do, an exception is thrown when you try to use the constructor. No exception is thrown when the method is called. -- If you want a parameterless constructor that does something more than simply calling the parameterless constructor of the base class, or that calls another constructor of the base class, or that does something else entirely, you must use the method to create one, and provide your own implementation. +- If you want a parameterless constructor that does something more than simply calling the parameterless constructor of the base class, or that calls another constructor of the base class, or that does something else entirely, you must use the method to create one, and provide your own implementation. @@ -1765,16 +1765,16 @@ See for a description of the format of the method. + Use this method overload when you do not know the method signature at the time you define the method. For example, the parameter types and return type of a generic method might be specified by the method's generic type parameters, which must be defined after the method has been added to the type. The parameters and return type of the method can be set later using the method. - This method overload defines a method with . If you need to define a method without a signature, with a different calling convention, use the method overload. + This method overload defines a method with . If you need to define a method without a signature, with a different calling convention, use the method overload. ## Examples - The following code example defines a generic method named `DemoMethod` whose parameter type and return type are specified by its generic type parameters. The method is defined without a signature, using the standard calling convention. The method is used to make `DemoMethod` a generic method, and the newly defined type parameters are then used for the signature and return type. + The following code example defines a generic method named `DemoMethod` whose parameter type and return type are specified by its generic type parameters. The method is defined without a signature, using the standard calling convention. The method is used to make `DemoMethod` a generic method, and the newly defined type parameters are then used for the signature and return type. - This code example is part of a larger example provided for the method. + This code example is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet4"::: @@ -1850,7 +1850,7 @@ See for a description of the format of the method. + Use this method overload when you do not know the method signature at the time you define the method. For example, the parameter types and return type of a generic method might be specified by the method's generic type parameters, which must be defined after the method has been added to the type. The parameters and return type of the method can be set later using the method. ]]> @@ -2160,7 +2160,7 @@ See for a description of the format of the or method overloads to define the method and then use the method to define the parameter and return types with custom modifiers. + Use this overload if you need to specify custom modifiers. If you need to specify custom modifiers after the method has been created, as you would, for example, with a generic method whose parameter types are specified by its generic type parameters, you can use the or method overloads to define the method and then use the method to define the parameter and return types with custom modifiers. > [!NOTE] > For more information on custom modifiers, see [ECMA C# and Common Language Infrastructure Standards](/dotnet/standard/components#applicable-standards) and [Standard ECMA-335 - Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -2330,7 +2330,7 @@ See for a description of the format of the ## Remarks Do not use this method to emit method overrides or interface implementations. To override a method of a base class or to implement a method of an interface, simply emit a method with the same name and signature as the method to be overridden or implemented, as demonstrated in the code example. - The method is used when a method body and a method declaration have different names. For example, a class might override a base class method and also provide a separate implementation for an interface member with the same name, as demonstrated in the code example. + The method is used when a method body and a method declaration have different names. For example, a class might override a base class method and also provide a separate implementation for an interface member with the same name, as demonstrated in the code example. `DefineMethodOverride` defines a `methodimpl`, which consists of a pair of metadata tokens. One token points to an implementation, and the other token points to a declaration that the body implements. The body must be defined on the type the method impl is defined on, and the body must be virtual (`Overridable` in Visual Basic). The declaration can be made to a method defined on an interface implemented by the type, a method on a derived class, or a method defined in the type. If the declaration is on an interface only, the slot defined for the interface is altered. If the declaration is made to a method on a base type, the slot for the method is overridden and any duplicates for the overridden method are also replaced. The overridden method cannot be the actual method that is declared. If the method is on the same type, the slot is replaced and any duplicates for the replaced methods are overridden. @@ -2338,12 +2338,12 @@ See for a description of the format of the > For more information about method impls, see `MethodImpl` in the ECMA Partition II Metadata documentation at [ECMA C# and Common Language Infrastructure Standards](/dotnet/standard/components#applicable-standards) and [Standard ECMA-335 - Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). > [!IMPORTANT] -> After the method is called, some features of `methodInfoBody` cannot be changed. For example, you cannot apply an attribute to a generic type parameter of `methodInfoBody` by using the method. If you must use the method, do so after all characteristics of `methodInfoBody` have been defined. +> After the method is called, some features of `methodInfoBody` cannot be changed. For example, you cannot apply an attribute to a generic type parameter of `methodInfoBody` by using the method. If you must use the method, do so after all characteristics of `methodInfoBody` have been defined. ## Examples The following code example contains an interface `I` with a method `M()`, a base class `A` that implements the interface, and a derived class `C` that overrides the base class implementation of `M()` and also provides a separate explicit implementation of `I.M()`. - The `main()` method of the code example shows how to emit the derived class `C`. The override of `A.M()` is accomplished simply by emitting a method `M()` with the same signature. However, to provide a separate implementation of `I.M()`, you must define a method body and then use the method to associate that method body with a representing `I.M()`. The name of the method body does not matter. + The `main()` method of the code example shows how to emit the derived class `C`. The override of `A.M()` is accomplished simply by emitting a method `M()` with the same signature. However, to provide a separate implementation of `I.M()`, you must define a method body and then use the method to associate that method body with a representing `I.M()`. The name of the method body does not matter. The code example creates an instance of the emitted class. It obtains a object for `I.M()`, and uses it to invoke the emitted class's explicit interface implementation. It then obtains a object for `A.M()`, and uses it to invoke the emitted class's override of that method. @@ -2458,11 +2458,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2532,11 +2532,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2636,11 +2636,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2742,11 +2742,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2848,11 +2848,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2965,11 +2965,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -3232,7 +3232,7 @@ See for a description of the format of the ## Examples - The following example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. + The following example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. > [!IMPORTANT] > To get a non-zero return value, you must add the flag. @@ -3359,7 +3359,7 @@ See for a description of the format of the ## Examples - The following code example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. + The following code example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. > [!IMPORTANT] > To get a non-zero return value, you must add the flag. @@ -3522,7 +3522,7 @@ See for a description of the format of the > For more information on custom modifiers, see [ECMA C# and Common Language Infrastructure Standards](/dotnet/standard/components#applicable-standards) and [Standard ECMA-335 - Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ## Examples - The following code example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. + The following code example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. The example creates a dynamic assembly with one dynamic module and a single type, `MyType`, that contains the `PInvoke` method. The `PInvoke` method represents the Win32 `GetTickCount` function. @@ -4712,16 +4712,16 @@ See for a description of the format of the method provides a way to get a object that represents a constructor of a constructed generic type whose generic type definition is represented by a object. + The method provides a way to get a object that represents a constructor of a constructed generic type whose generic type definition is represented by a object. - For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a constructor of `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G`. In order to emit the code to create an instance of the constructed type, you need a object that represents the constructor of this constructed type - in other words, that creates an instance of `G`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents the constructor of `G` as parameter `constructor`. The return value is the object you need to emit the function call. The code example demonstrates this scenario. + For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a constructor of `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G`. In order to emit the code to create an instance of the constructed type, you need a object that represents the constructor of this constructed type - in other words, that creates an instance of `G`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents the constructor of `G` as parameter `constructor`. The return value is the object you need to emit the function call. The code example demonstrates this scenario. ## Examples The following code example contains source code for a generic class named `Sample` that has a type parameter named `T`. The class has a field named `Field`, of type `T`, and a generic method named `GM` with its own type parameter, named `U`. Method `GM` creates an instance of `Sample`, substituting its own type parameter `U` for the type parameter of `Sample`, and stores its input parameter in `Field`. This source code is compiled but not used; you can view it with the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) and compare it to the code emitted by class `Example`. - The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample` and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. The method is used to create a that represents the parameterless constructor of the constructed generic type `Sample` in the instruction that creates the instance. + The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample` and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. The method is used to create a that represents the parameterless constructor of the constructed generic type `Sample` in the instruction that creates the instance. A dummy type is defined to hold the entry-point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. @@ -4884,7 +4884,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5054,7 +5054,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5122,7 +5122,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5188,7 +5188,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5247,7 +5247,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5325,7 +5325,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5380,16 +5380,16 @@ See for a description of the format of the method provides a way to get a object that represents a field of a constructed generic type whose generic type definition is represented by a object. + The method provides a way to get a object that represents a field of a constructed generic type whose generic type definition is represented by a object. - For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a field `public T F` in C# syntax (`Public F As T` in Visual Basic) that's defined by `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G` and calls field `F` on that instance. In order to emit the function call, you need a object that represents `F` on the constructed type - in other words, that is of type `U` rather than type `T`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents `F` as parameter `field`. The return value is the object you need to emit the function call. The code example demonstrates this scenario. + For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a field `public T F` in C# syntax (`Public F As T` in Visual Basic) that's defined by `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G` and calls field `F` on that instance. In order to emit the function call, you need a object that represents `F` on the constructed type - in other words, that is of type `U` rather than type `T`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents `F` as parameter `field`. The return value is the object you need to emit the function call. The code example demonstrates this scenario. ## Examples The following code example contains source code for a generic class named Sample that has a type parameter named `T`. The class has a field named `Field`, of type `T`, and a generic method named `GM` with its own type parameter, named `U`. Method `GM` creates an instance of `Sample`, substituting its own type parameter `U` for the type parameter of `Sample`, and stores its input parameter in `Field`. This source code is compiled but not used; you can view it with the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) and compare it to the code emitted by class `Example`. - The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample`, and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. The method is used to create a that represents the field of the constructed generic type `Sample` in the and instructions. + The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample`, and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. The method is used to create a that represents the field of the constructed generic type `Sample` in the and instructions. A dummy type is defined to hold the entry-point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. @@ -5468,9 +5468,9 @@ See for a description of the format of the method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. - Retrieve the type using or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5521,7 +5521,7 @@ See for a description of the format of the ## Remarks The elements of the returned array are in the order in which they appear in the list of type parameters for the generic type definition. - A object represents a generic type definition if the method has been used to give it generic type parameters. This method retrieves the objects that represent the generic type parameters. + A object represents a generic type definition if the method has been used to give it generic type parameters. This method retrieves the objects that represent the generic type parameters. For more information on generic types in reflection and a list of the invariant conditions for terms used in generic reflection, see the property. @@ -5605,9 +5605,9 @@ See for a description of the format of the method on a object for which the property returns `true`, the property returns the current instance. A that represents a generic type is always a generic type definition. + If you call the method on a object for which the property returns `true`, the property returns the current instance. A that represents a generic type is always a generic type definition. - If you used the method to construct a generic type from a object that represents a generic type definition, using the method on the constructed type gets back the object that represents the generic type definition. + If you used the method to construct a generic type from a object that represents a generic type definition, using the method on the constructed type gets back the object that represents the generic type definition. ]]> @@ -5682,7 +5682,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5748,7 +5748,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5863,7 +5863,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5926,7 +5926,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5981,16 +5981,16 @@ See for a description of the format of the method provides a way to get a object that represents a method of a constructed generic type whose generic type definition is represented by a object. + The method provides a way to get a object that represents a method of a constructed generic type whose generic type definition is represented by a object. - For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a method `T M()` in C# syntax (`Function M() As T` in Visual Basic) that is defined by `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G` and calls method `M` on that instance. In order to emit the function call, you need a object that represents `M` on the constructed type - in other words, that returns type `U` rather than type `T`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents `T M()` as parameter `method`. The return value is the object you need to emit the function call. The code example demonstrates a scenario similar to this. + For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a method `T M()` in C# syntax (`Function M() As T` in Visual Basic) that is defined by `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G` and calls method `M` on that instance. In order to emit the function call, you need a object that represents `M` on the constructed type - in other words, that returns type `U` rather than type `T`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents `T M()` as parameter `method`. The return value is the object you need to emit the function call. The code example demonstrates a scenario similar to this. ## Examples The following code example contains source code for a generic class named `Sample` that has a type parameter named `T`. The class has a field named `Field`, of type `T`, and a generic method named `GM` with its own type parameter, named `U`. Method `GM` creates an instance of `Sample`, substituting its own type parameter `U` for the type parameter of `Sample`, and stores its input parameter in `Field`. This source code is compiled but not used; you can view it with the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) and compare it to the code emitted by class `Example`. - The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample` and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. A dummy type is defined to hold the entry-point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. The method is used to create a for the static `GM` method of the constructed generic type `Sample`, and the method is then used to create a that can emitted in a method call. + The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample` and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. A dummy type is defined to hold the entry-point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. The method is used to create a for the static `GM` method of the constructed generic type `Sample`, and the method is then used to create a that can emitted in a method call. When the code example is run, it saves the emitted assembly as TypeBuilderGetFieldExample.exe. You can run TypeBuilderGetFieldExample.exe, and you can use the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) to compare the emitted code with the code for the `Sample` class that is compiled into the code example itself. @@ -6163,7 +6163,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -6235,7 +6235,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. If this type is complete, for example, if `CreateType` has been called on this type, but there are nested types that are not complete, then `GetNestedTypes` will only return those nested types for which `CreateType` has been called. @@ -6298,7 +6298,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. If this type is complete, for example, if `CreateType` has been called on this type, but there are nested types that are not complete, then `GetNestedTypes` will only return those nested types for which `CreateType` has been called. @@ -6359,7 +6359,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -6499,7 +6499,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -6641,7 +6641,7 @@ See for a description of the format of the > [!NOTE] > Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked using Reflection whenever the code is fully trusted. - This method is not currently supported. You can retrieve the type using or and use reflection on the retrieved type. + This method is not currently supported. You can retrieve the type using or and use reflection on the retrieved type. ]]> @@ -7006,7 +7006,7 @@ See for a description of the format of the method has been called, the type represented by the object is complete. Exceptions are thrown on any further attempts to add members or change other characteristics of the type. + After the method has been called, the type represented by the object is complete. Exceptions are thrown on any further attempts to add members or change other characteristics of the type. ]]> @@ -7096,7 +7096,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + This method is not supported for incomplete generic type parameters. Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -7228,7 +7228,7 @@ See for a description of the format of the object represents a generic type definition if the method has been used to give it generic type parameters. An instance of the class that is generic is always a generic type definition. + A object represents a generic type definition if the method has been used to give it generic type parameters. An instance of the class that is generic is always a generic type definition. For more information on generic types in reflection and a list of the invariant conditions for terms used in generic reflection, see the property. @@ -7282,9 +7282,9 @@ See for a description of the format of the object represents a generic type definition if the method has been used to give it generic type parameters. An instance of the class that is generic is always a generic type definition. + A object represents a generic type definition if the method has been used to give it generic type parameters. An instance of the class that is generic is always a generic type definition. - A can be used to build generic type definitions, but not constructed generic types. To get a constructed generic type, call the method on a that represents a generic type definition. + A can be used to build generic type definitions, but not constructed generic types. To get a constructed generic type, call the method on a that represents a generic type definition. For more information on generic types in reflection and a list of the invariant conditions for terms used in generic reflection, see the property. @@ -7423,7 +7423,7 @@ See for a description of the format of the , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -7435,7 +7435,7 @@ See for a description of the format of the The runtime begins evaluating transparency levels at the assembly. For example, if the dynamic assembly is security-critical, annotations on types are ignored, and all types are security-critical. - By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. + By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. > [!NOTE] > Default inheritance is limited to the runtime's evaluation of transparency. No attributes are applied to the dynamic assembly. If you want to add security attributes, you must apply them yourself. @@ -7494,7 +7494,7 @@ See for a description of the format of the , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -7506,7 +7506,7 @@ See for a description of the format of the The runtime begins evaluating transparency levels at the assembly. For example, if the dynamic assembly is security-critical, annotations on types are ignored, and all types are security-critical. - By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. + By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. > [!NOTE] > Default inheritance is limited to the runtime's evaluation of transparency. No attributes are applied to the dynamic assembly. If you want to add security attributes, you must apply them yourself. @@ -7565,7 +7565,7 @@ See for a description of the format of the , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -7577,7 +7577,7 @@ See for a description of the format of the The runtime begins evaluating transparency levels at the assembly. For example, if the dynamic assembly is security-critical, annotations on types are ignored, and all types are security-critical. - By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. + By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. > [!NOTE] > Default inheritance is limited to the runtime's evaluation of transparency. No attributes are applied to the dynamic assembly. If you want to add security attributes, you must apply them yourself. @@ -7829,7 +7829,7 @@ See for a description of the format of the method provides a way to generate an array type with any possible element type, including generic types. + The method provides a way to generate an array type with any possible element type, including generic types. @@ -7897,7 +7897,7 @@ See for a description of the format of the method provides a way to generate an array type with any possible element type, including generic types. + The method provides a way to generate an array type with any possible element type, including generic types. @@ -7958,7 +7958,7 @@ See for a description of the format of the method provides a way to generate `ref` types (`ByRef` in Visual Basic) for parameter lists. + The method provides a way to generate `ref` types (`ByRef` in Visual Basic) for parameter lists. > [!NOTE] > Using Microsoft intermediate language (MSIL) syntax, if the current represents `MyType`, then the type returned by this method would be `MyType&`. @@ -8044,11 +8044,11 @@ See for a description of the format of the method before calling the method on a that represents a generic type definition. If the current does not represent the definition of a generic type, an is thrown. + Use this method when your emitted code requires a type constructed from the current generic type definition. It is not necessary to call the method before calling the method on a that represents a generic type definition. If the current does not represent the definition of a generic type, an is thrown. The object returned by this method functions as a placeholder for a constructed generic type in your emitted code. It is an instance of a class derived from that has limited capabilities. In particular: -- To get methods, fields, and constructors for these constructed generic types, use the , , and method overloads. +- To get methods, fields, and constructors for these constructed generic types, use the , , and method overloads. - Two instances that represent the same constructed type do not compare as equal. For example, in the following code `t1.Equals(t2)` returns `false`: @@ -8114,7 +8114,7 @@ See for a description of the format of the method provides a way to generate pointer types for parameter lists. + The method provides a way to generate pointer types for parameter lists. > [!NOTE] > Using Microsoft intermediate language (MSIL) syntax, if the current represents `MyType`, then the type returned by this method would be `MyType*`. @@ -8655,9 +8655,9 @@ For more information on how to format `binaryAttribute`, see [ECMA C# and Common ## Remarks If `parent` is `null`, is used as the base type. - In the .NET Framework versions 1.0 and 1.1, no exception is thrown if `parent` is an interface type, but a is thrown when the method is called. + In the .NET Framework versions 1.0 and 1.1, no exception is thrown if `parent` is an interface type, but a is thrown when the method is called. - The method does not check for most invalid parent types. For example, it does not reject a parent type that has no parameterless constructor when the current type has a parameterless constructor, it does not reject sealed types, and it does not reject the type. In all these cases, exceptions are thrown by the method. + The method does not check for most invalid parent types. For example, it does not reject a parent type that has no parameterless constructor when the current type has a parameterless constructor, it does not reject sealed types, and it does not reject the type. In all these cases, exceptions are thrown by the method. ]]> @@ -9063,7 +9063,7 @@ For more information on how to format `binaryAttribute`, see [ECMA C# and Common or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> diff --git a/xml/System.Reflection.Emit/TypeToken.xml b/xml/System.Reflection.Emit/TypeToken.xml index 7b9ac9e4556..f8fc7f57184 100644 --- a/xml/System.Reflection.Emit/TypeToken.xml +++ b/xml/System.Reflection.Emit/TypeToken.xml @@ -201,7 +201,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -236,7 +236,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Metadata/MethodBodyBlock.xml b/xml/System.Reflection.Metadata/MethodBodyBlock.xml index 63e220fa4d0..9d79e3ec94a 100644 --- a/xml/System.Reflection.Metadata/MethodBodyBlock.xml +++ b/xml/System.Reflection.Metadata/MethodBodyBlock.xml @@ -33,7 +33,7 @@ method to get a `MethodBodyBlock` instance for the specified method. +The method body contains Common Intermediate Language (CIL) instructions that make up a method and information about its local variables and exception regions. You can use the method to get a `MethodBodyBlock` instance for the specified method. The format of CIL instructions and metadata is defined by the ECMA-335 specification. For more information, see [Standard ECMA-335 - Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/) on the Ecma International Web site. diff --git a/xml/System.Reflection.Metadata/MethodDebugInformation.xml b/xml/System.Reflection.Metadata/MethodDebugInformation.xml index d6b6f761656..cb8c418d76b 100644 --- a/xml/System.Reflection.Metadata/MethodDebugInformation.xml +++ b/xml/System.Reflection.Metadata/MethodDebugInformation.xml @@ -213,9 +213,9 @@ See [MethodDebugInformation Table: 0x31](https://github.com/dotnet/runtime/blob/ A blob encoding sequence points, or a handle whose property is if the method doesn't have sequence points. - method to decode the blob. + Use the method to decode the blob. ]]> diff --git a/xml/System.Reflection.PortableExecutable/CodeViewDebugDirectoryData.xml b/xml/System.Reflection.PortableExecutable/CodeViewDebugDirectoryData.xml index ab76e7ca68e..dfc11c99e78 100644 --- a/xml/System.Reflection.PortableExecutable/CodeViewDebugDirectoryData.xml +++ b/xml/System.Reflection.PortableExecutable/CodeViewDebugDirectoryData.xml @@ -45,7 +45,7 @@ ## Remarks -This structure is returned by a call to the method. +This structure is returned by a call to the method. ]]> diff --git a/xml/System.Reflection/AmbiguousMatchException.xml b/xml/System.Reflection/AmbiguousMatchException.xml index b3f12b3a222..1cad21a3f02 100644 --- a/xml/System.Reflection/AmbiguousMatchException.xml +++ b/xml/System.Reflection/AmbiguousMatchException.xml @@ -89,7 +89,7 @@ ## Remarks `AmbiguousMatchException` uses the HRESULT COR_E_AMBIGUOUSMATCH, which has the value 0x8000211D. - An `AmbiguousMatchException` is thrown when a member is invoked late-bound and multiple overloads satisfy the binding criteria, or when more than one member matches the binding criteria passed to a reflection method that can return only a single result (for example, or ). + An `AmbiguousMatchException` is thrown when a member is invoked late-bound and multiple overloads satisfy the binding criteria, or when more than one member matches the binding criteria passed to a reflection method that can return only a single result (for example, or ). ]]> @@ -158,8 +158,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("").| +||`null`| +||The empty string ("").| ]]> @@ -221,8 +221,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The `message` string.| +||`null`| +||The `message` string.| ]]> @@ -286,8 +286,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| diff --git a/xml/System.Reflection/Assembly.xml b/xml/System.Reflection/Assembly.xml index 70bf710c1d8..b72cc15f9ce 100644 --- a/xml/System.Reflection/Assembly.xml +++ b/xml/System.Reflection/Assembly.xml @@ -122,29 +122,29 @@ ## Remarks Use the class to load assemblies, to explore the metadata and constituent parts of assemblies, to discover the types contained in assemblies, and to create instances of those types. - To get an array of objects representing the assemblies currently loaded into an application domain (for example, the default application domain of a simple project), use the method. + To get an array of objects representing the assemblies currently loaded into an application domain (for example, the default application domain of a simple project), use the method. To load assemblies dynamically, the class provides the following static methods (`Shared` methods in Visual Basic). Assemblies are loaded into the application domain where the load operation occurs. -- The recommended way to load assemblies is to use the method, which identifies the assembly to be loaded by its display name (for example, "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"). The search for the assembly follows the rules described in [How the Runtime Locates Assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies). +- The recommended way to load assemblies is to use the method, which identifies the assembly to be loaded by its display name (for example, "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"). The search for the assembly follows the rules described in [How the Runtime Locates Assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies). -- The and methods enable you to load an assembly for reflection, but not for execution. For example, an assembly that targets a 64-bit platform can be examined by code that is running on a 32-bit platform. +- The and methods enable you to load an assembly for reflection, but not for execution. For example, an assembly that targets a 64-bit platform can be examined by code that is running on a 32-bit platform. -- The and methods are provided for rare scenarios in which an assembly must be identified by path. +- The and methods are provided for rare scenarios in which an assembly must be identified by path. - To get an object for the currently executing assembly, use the method. + To get an object for the currently executing assembly, use the method. Many members of the class provide information about an assembly. For example: -- The method returns an object that provides access to the parts of the assembly display name. +- The method returns an object that provides access to the parts of the assembly display name. -- The method lists the attributes applied to the assembly. +- The method lists the attributes applied to the assembly. -- The method provides access to the files in the assembly manifest. +- The method provides access to the files in the assembly manifest. -- The method provides the names of the resources in the assembly manifest. +- The method provides the names of the resources in the assembly manifest. - The method lists all the types in the assembly. The method lists the types that are visible to callers outside the assembly. The method can be used to search for a particular type in the assembly. The method can be used to search for and create instances of types in the assembly. + The method lists all the types in the assembly. The method lists the types that are visible to callers outside the assembly. The method can be used to search for a particular type in the assembly. The method can be used to search for and create instances of types in the assembly. For more information on assemblies, see the "Application Domains and Assemblies" section in the [Application Domains](/dotnet/framework/app-domains/application-domains) topic. @@ -153,7 +153,7 @@ ## Examples The following code example shows how to obtain the currently executing assembly, create an instance of a type contained in that assembly, and invoke one of the type's methods with late binding. For this purpose, the code example defines a class named `Example`, with a method named `SampleMethod`. The constructor of the class accepts an integer, which is used to compute the return value of the method. - The code example also demonstrates the use of the method to obtain an object that can be used to parse the full name of the assembly. The example displays the version number of the assembly, the property, and the property. + The code example also demonstrates the use of the method to obtain an object that can be used to parse the full name of the assembly. The example displays the version number of the assembly, the property, and the property. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/Overview/source.vb" id="Snippet1"::: @@ -283,7 +283,7 @@ ## Remarks To get the absolute path to the loaded manifest-containing file, use the property instead. - If the assembly was loaded as a byte array, using an overload of the method that takes an array of bytes, this property returns the location of the caller of the method, not the location of the loaded assembly. + If the assembly was loaded as a byte array, using an overload of the method that takes an array of bytes, this property returns the location of the caller of the method, not the location of the loaded assembly. In .NET 5 and later versions, for bundled assemblies, this property throws an exception. @@ -381,14 +381,14 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex - You haven't specified the fully qualified name of the type. -- You've specified the fully qualified type name, but its case doesn't match the case of the type's property. For a case-insensitive comparison of `typeName` with the type's full name, call the overload and specify `true` for the `ignoreCase` argument. +- You've specified the fully qualified type name, but its case doesn't match the case of the type's property. For a case-insensitive comparison of `typeName` with the type's full name, call the overload and specify `true` for the `ignoreCase` argument. - The type doesn't exist in the current instance. ## Examples - The following example defines a `Person` class and calls the method to instantiate it. + The following example defines a `Person` class and calls the method to instantiate it. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/CreateInstance/createinstance1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/CreateInstance/createinstance1.vb" id="Snippet1"::: @@ -499,7 +499,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex ## Examples - The following example defines a `Person` class. It then calls the method to instantiate it, but because the casing of the `typeName` argument doesn't match that of the type's property, the method returns `null`. When the example passes the same string to the overload and specifies that the comparison should be case-insensitive, the `Person` class is found, and a `Person` object is successfully instantiated. + The following example defines a `Person` class. It then calls the method to instantiate it, but because the casing of the `typeName` argument doesn't match that of the type's property, the method returns `null`. When the example passes the same string to the overload and specifies that the comparison should be case-insensitive, the `Person` class is found, and a `Person` object is successfully instantiated. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/CreateInstance/createinstance2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/CreateInstance/createinstance2.vb" id="Snippet2"::: @@ -710,7 +710,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex See for a description of the format of the display name of an assembly. - To accommodate changes in versions of the common language runtime, use this method rather than constructing the qualified name yourself. For information about qualified assembly names, see . + To accommodate changes in versions of the common language runtime, use this method rather than constructing the qualified name yourself. For information about qualified assembly names, see . ]]> @@ -818,7 +818,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex property is comparable to the method, except that the property returns a collection of objects, and the method returns an array of objects. + The property is comparable to the method, except that the property returns a collection of objects, and the method returns an array of objects. The returned array includes nested types. @@ -940,7 +940,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex method performs a test for reference equality to determine whether the current instance and `o` are equal. + The method performs a test for reference equality to determine whether the current instance and `o` are equal. ]]> @@ -1170,9 +1170,9 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex See for a description of the format of the display name of an assembly. > [!NOTE] -> Writing your own code to parse display names is not recommended. Instead, pass the display name to the constructor, which parses it and populates the appropriate fields of the new . +> Writing your own code to parse display names is not recommended. Instead, pass the display name to the constructor, which parses it and populates the appropriate fields of the new . - In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. However, it is not included in the string returned by the property, for compatibility reasons. See . + In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. However, it is not included in the string returned by the property, for compatibility reasons. See . @@ -1315,17 +1315,17 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex method is expanded inline by the just-in-time (JIT) compiler, or if its caller is expanded inline, the assembly that is returned by may differ unexpectedly. For example, consider the following methods and assemblies: + If the method that calls the method is expanded inline by the just-in-time (JIT) compiler, or if its caller is expanded inline, the assembly that is returned by may differ unexpectedly. For example, consider the following methods and assemblies: -- Method `M1` in assembly `A1` calls . +- Method `M1` in assembly `A1` calls . - Method `M2` in assembly `A2` calls `M1`. - Method `M3` in assembly `A3` calls `M2`. - When `M1` is not inlined, returns `A2`. When `M1` is inlined, returns `A3`. Similarly, when `M2` is not inlined, returns `A2`. When `M2` is inlined, returns `A3`. + When `M1` is not inlined, returns `A2`. When `M1` is inlined, returns `A3`. Similarly, when `M2` is not inlined, returns `A2`. When `M2` is inlined, returns `A3`. - This effect also occurs when `M1` executes as a tail call from `M2`, or when `M2` executes as a tail call from `M3`. You can prevent the JIT compiler from inlining the method that calls , by applying the attribute with the flag, but there is no similar mechanism for preventing tail calls. + This effect also occurs when `M1` executes as a tail call from `M2`, or when `M2` executes as a tail call from `M3`. You can prevent the JIT compiler from inlining the method that calls , by applying the attribute with the flag, but there is no similar mechanism for preventing tail calls. @@ -1560,7 +1560,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods like and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. ]]> @@ -1622,9 +1622,9 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex ## Remarks - **.NET Framework only:** In the default application domain, this method returns the process executable. In other application domains, this method returns the first executable that was executed by . + **.NET Framework only:** In the default application domain, this method returns the process executable. In other application domains, this method returns the first executable that was executed by . - The method can return `null` when a managed assembly has been loaded from an unmanaged application. For example, if an unmanaged application creates an instance of a COM component written in C#, a call to the method from the C# component returns null, because the entry point for the process was unmanaged code rather than a managed assembly. + The method can return `null` when a managed assembly has been loaded from an unmanaged application. For example, if an unmanaged application creates an instance of a COM component written in C#, a call to the method from the C# component returns null, because the entry point for the process was unmanaged code rather than a managed assembly. ]]> @@ -1688,12 +1688,12 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetExecutingAssembly/assembly1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetExecutingAssembly/assembly1.vb" id="Snippet1"::: - To get the assembly that contains the method that called the currently executing code, use . + To get the assembly that contains the method that called the currently executing code, use . ## Examples - The following example uses the property to get the currently executing assembly based on a type contained in that assembly. It also calls the method to show that it returns an object that represents the same assembly. + The following example uses the property to get the currently executing assembly based on a type contained in that assembly. It also calls the method to show that it returns an object that represents the same assembly. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetExecutingAssembly/getexecutingassembly1.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetExecutingAssembly/getexecutingassembly1.vb" id="Snippet5"::: @@ -1758,10 +1758,10 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex method. + The only types visible outside an assembly are public types and public types nested within other public types. To retrieve all types within an assembly, including those that are non-public, use the method. ## Examples - The following code sample defines a number of classes with various access levels, and calls to display the ones that are visible from outside the assembly. + The following code sample defines a number of classes with various access levels, and calls to display the ones that are visible from outside the assembly. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetExportedTypes/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetExportedTypes/source.vb" id="Snippet1"::: @@ -1923,7 +1923,7 @@ In .NET 5 and later versions, for bundled assemblies, this method throws an exce ## Remarks This method works on public and private resource files. - This overload is equivalent to calling the overload and specifying `false`. + This overload is equivalent to calling the overload and specifying `false`. ]]> @@ -2337,13 +2337,13 @@ In .NET 5 and later versions, for bundled assemblies, this method throws an exce ## Remarks You can use each resource name in the array returned by this method as follows: -- You can pass the resource name to the method to get additional information about the resource. +- You can pass the resource name to the method to get additional information about the resource. -- If the name identifies a binary .resources file, you can remove its .resources file extension and pass it to the constructor to instantiate the resource manager. +- If the name identifies a binary .resources file, you can remove its .resources file extension and pass it to the constructor to instantiate the resource manager. -- You can pass the resource name to the method to retrieve a object that you can then pass to the constructor. +- You can pass the resource name to the method to retrieve a object that you can then pass to the constructor. -- You can pass the resource name to the method to retrieve a object that you can then pass to the constructor. +- You can pass the resource name to the method to retrieve a object that you can then pass to the constructor. Resource information is returned only if the resource is visible to the caller, or the caller has . @@ -2427,7 +2427,7 @@ In .NET 5 and later versions, for bundled assemblies, this method throws an exce > [!NOTE] > This method returns `null` if a private resource in another assembly is accessed and the caller does not have with the flag. - If the assembly manifest lists a resource file, returns a object even if the resource file cannot be found on disk at the time. If the resource file is not found, passing the resulting object to the constructor causes an . + If the assembly manifest lists a resource file, returns a object even if the resource file cannot be found on disk at the time. If the resource file is not found, passing the resulting object to the constructor causes an . ]]> @@ -2517,7 +2517,7 @@ Note: In .NET for Win > [!NOTE] > This method returns `null` if a private resource in another assembly is accessed and the caller does not have with the flag. - If the assembly manifest lists a resource file, returns a object even if the resource file cannot be found on disk at the time. If the resource file is not found, passing the resulting object to the constructor causes an . + If the assembly manifest lists a resource file, returns a object even if the resource file cannot be found on disk at the time. If the resource file is not found, passing the resulting object to the constructor causes an . ]]> @@ -2599,7 +2599,7 @@ Note: In .NET for Win Classes in the `Reflection.Emit` namespace emit the scope name for a dynamic module. The scope name can be determined by the property. Pass the kind of module you want to `Assembly.GetModule`. For example, if you want the module that contains the assembly manifest, pass the scope name of the module to `GetModule`. Otherwise, pass the file name of the module. Assemblies loaded by one of the `Load` methods that have a byte[] parameter have only one module, and that is the manifest module. Always seek these modules using the scope name. - A type can be retrieved from a specific module using . Calling `Module.GetType` on the module containing the manifest will not initiate a search of the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . + A type can be retrieved from a specific module using . Calling `Module.GetType` on the module containing the manifest will not initiate a search of the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . ]]> @@ -3004,7 +3004,7 @@ Note: In .NET for Win ## Examples - The following code example demonstrates calling the method. This code example is part of a larger example provided for the class. + The following code example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetReferencedAssemblies/Reflection.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetReferencedAssemblies/Reflection.vb" id="Snippet1"::: @@ -3158,7 +3158,7 @@ Note: In .NET for Win ## Remarks Satellite assemblies contain localized resources, as distinct from main application assemblies, which contain non-localizable executable code and resources for a single culture that serve as the default or neutral culture. - Call the overload to use your current assembly version. + Call the overload to use your current assembly version. If `version` is `null`, the current assembly version is used if both the resource and main assemblies are signed. @@ -3283,15 +3283,15 @@ Note: In .NET for Win method overload, which can optionally include an assembly display name as part of the type name. + This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the method overload, which can optionally include an assembly display name as part of the type name. - In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. + In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). ## Examples - The following example defines an abstract `MeansOfTransportation` class in the `Transportation` namespace. It calls the method to retrieve its object, calls the method to get an array of objects that represent the type's properties, and then displays information on the type's abstract properties. Note that the call to the method uses the type's fully qualified name (that is, its namespace along with its type name). + The following example defines an abstract `MeansOfTransportation` class in the `Transportation` namespace. It calls the method to retrieve its object, calls the method to get an array of objects that represent the type's properties, and then displays information on the type's abstract properties. Note that the call to the method uses the type's fully qualified name (that is, its namespace along with its type name). :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetType/gettype1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetType/gettype1.vb" id="Snippet1"::: @@ -3390,9 +3390,9 @@ Note: In .NET for Win method overload, which can optionally include an assembly display name as part of the type name. + This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the method overload, which can optionally include an assembly display name as part of the type name. - In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. + In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). @@ -3498,9 +3498,9 @@ Note: In .NET for Win method overload, which can optionally include an assembly display name as part of the type name. + This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the method overload, which can optionally include an assembly display name as part of the type name. - In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. + In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). @@ -3588,9 +3588,9 @@ Note: In .NET for Win method. + The returned array includes nested and non-public types. To retrieve only public types, use the method. - If the method is called on an assembly and a type in that assembly is dependent on a type in an assembly that has not been loaded (for example, if it derives from a type in the second assembly), a is thrown. For example, this can happen if the first assembly was loaded with the or methods, and the second assembly was not loaded. It can also happen with assemblies loaded using the and methods if the second assembly cannot be located when the method is called. + If the method is called on an assembly and a type in that assembly is dependent on a type in an assembly that has not been loaded (for example, if it derives from a type in the second assembly), a is thrown. For example, this can happen if the first assembly was loaded with the or methods, and the second assembly was not loaded. It can also happen with assemblies loaded using the and methods if the second assembly cannot be located when the method is called. > [!NOTE] > If a type has been forwarded to another assembly, it is not included in the returned array. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). @@ -3784,7 +3784,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim ## Remarks For example, the value for the .NET Framework version 1.1 would be v1.1.4322. The binary files for that version would be located in the path %windir%\Microsoft.NET\Framework\v1.1.4322. - By default, is set to the version of the CLR used to build the assembly. However, it might have been set to another value at compile time. + By default, is set to the version of the CLR used to build the assembly. However, it might have been set to another value at compile time. ]]> @@ -3893,7 +3893,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim attribute to an assembly and then uses to indicate whether it was applied. It also tests an attribute that was not applied. + The following code example applies the attribute to an assembly and then uses to indicate whether it was applied. It also tests an attribute that was not applied. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/IsDefined/isdefined.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/IsDefined/isdefined.vb" id="Snippet1"::: @@ -4088,7 +4088,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim This method overload always creates a new object in its own isolated load context. - **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. + **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. ]]> @@ -4159,16 +4159,16 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim ## Remarks - In .NET Core/.NET 5+, the target assembly will be loaded into the current or into the context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm). + In .NET Core/.NET 5+, the target assembly will be loaded into the current or into the context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm). > [!NOTE] > **.NET Framework only:** For information about loading assemblies from remote locations, see [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element). > [!NOTE] -> **.NET Framework only:** Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). +> **.NET Framework only:** Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). > [!NOTE] -> **.NET Framework only:** If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. +> **.NET Framework only:** If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. ## Examples The following example instantiates an object and uses it to load the `sysglobal.dll` assembly. The example then displays the full name of the assembly's public types. @@ -4254,7 +4254,7 @@ Note: In .NET for Win ## Remarks - In .NET Core/.NET 5+, the target assembly will be loaded into the current or into the context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm). + In .NET Core/.NET 5+, the target assembly will be loaded into the current or into the context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm). To load the correct assembly, it's recommended to call the `Load` method by passing the long form of the assembly name. The long form of an assembly name consists of its simple name (such as "System" for the System.dll assembly) along with its version, culture, public key token, and optionally its processor architecture. It corresponds to the assembly's property. The following example illustrates the use of a long name to load the System.dll assembly for .NET Framework 4: @@ -4263,7 +4263,7 @@ To load the correct assembly, it's recommended to call the `Load` method by pass is thrown if `assemblyString` specifies the full assembly name, and the first assembly that matches the simple name has a different version, culture, or public key token. The loader does not continue probing for other assemblies that match the simple name. - In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . + In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . @@ -4365,7 +4365,7 @@ In .NET Core/5+, the target assembly is loaded into the current object in its own isolated load context. - **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. + **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. ]]> @@ -4430,22 +4430,22 @@ In .NET Core/5+, the target assembly is loaded into the current `](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. > [!NOTE] -> Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). +> Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. -- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. +- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. > [!NOTE] -> If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. +> If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. - If you call the method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. + If you call the method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. ]]> @@ -4518,17 +4518,17 @@ In .NET Core/5+, the target assembly is loaded into the current method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. -- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. +- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. If you call this method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. - In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . + In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . ]]> @@ -4606,15 +4606,15 @@ The assembly is loaded using the supplied evidence. The raw bytes representing t Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. -- When you use a method overload with a `Byte[]` parameter to load a COFF image, evidence is inherited from the calling assembly. +- When you use a method overload with a `Byte[]` parameter to load a COFF image, evidence is inherited from the calling assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image are ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image are ignored. - If you call the method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. + If you call the method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. ]]> @@ -4760,7 +4760,7 @@ The assembly is loaded using the supplied evidence. The raw bytes representing t The assembly is loaded into a new AssemblyLoadContext created for this purpose. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm"). - Use the method to load and examine assemblies that have the same identity, but are located in different paths. does not load files into the load-from context, and does not resolve dependencies using the load path, as the method does. is useful in this limited scenario because cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly. + Use the method to load and examine assemblies that have the same identity, but are located in different paths. does not load files into the load-from context, and does not resolve dependencies using the load path, as the method does. is useful in this limited scenario because cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly. **.NET Framework only:** See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. @@ -4828,7 +4828,7 @@ The assembly is loaded into a new AssemblyLoadContext created for this purpose. method to load and examine assemblies that have the same identity, but are located in different paths. does not load files into the context, and does not resolve dependencies using the load path, as the method does. is useful in this limited scenario because cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly. + Use the method to load and examine assemblies that have the same identity, but are located in different paths. does not load files into the context, and does not resolve dependencies using the load path, as the method does. is useful in this limited scenario because cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. @@ -4942,29 +4942,29 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio **.NET Framework only:** Assemblies can be loaded into one of three contexts, or can be loaded without context: -- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. +- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. -- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. It also allows dependencies on that path to be found and loaded because the path information is maintained by the context. , , and are examples of methods that load by path. +- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. It also allows dependencies on that path to be found and loaded because the path information is maintained by the context. , , and are examples of methods that load by path. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. -- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. +- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. -- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. +- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. - The method has the following disadvantages. Consider using instead. + The method has the following disadvantages. Consider using instead. -- If an assembly with the same identity is already loaded in the load-from context, returns the loaded assembly even if a different path was specified. +- If an assembly with the same identity is already loaded in the load-from context, returns the loaded assembly even if a different path was specified. - An assembly can be loaded in the load-from context even though an assembly with the same identity exists in the load context. Interoperability between the two assemblies will not work, leading to errors such as , , or other unexpected behavior. -- Calling with a location that's in the probing path will load the assembly in the load context and not in the load-from context. +- Calling with a location that's in the probing path will load the assembly in the load context and not in the load-from context. -- If an assembly file whose identity is goverened by a binding redirect policy is passed to , the policy will be applied and the assembly will be loaded from the probing path in the load context. +- If an assembly file whose identity is goverened by a binding redirect policy is passed to , the policy will be applied and the assembly will be loaded from the probing path in the load context. - If an assembly is loaded in the load-from context, and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. -- demands and , or , on the specified path. +- demands and , or , on the specified path. - If a native image exists for `assemblyFile`, it is not used. The assembly cannot be loaded as domain neutral. @@ -5053,41 +5053,41 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio Assemblies can be loaded into one of three contexts, or can be loaded without context: -- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. +- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. -- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. , , and are examples of methods that load by path. +- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. , , and are examples of methods that load by path. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. -- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. +- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. -- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. +- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. The load-from context allows an assembly to be loaded from a path not included in probing, and yet allows dependencies on that path to be found and loaded because the path information is maintained by the context. - The method has the following disadvantages. Consider using instead. + The method has the following disadvantages. Consider using instead. -- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. +- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. -- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. +- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. -- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. +- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. -- demands and , or , on the specified path. +- demands and , or , on the specified path. - If a native image exists for `assemblyFile`, it is not used. The assembly cannot be loaded as domain neutral. Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. - If you call this method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. -- When you use a method with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. +- When you use a method with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. ]]> @@ -5188,7 +5188,7 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio ## Remarks - This API is not supported in .NET Core/.NET 5+. This method throws when called. Use instead. + This API is not supported in .NET Core/.NET 5+. This method throws when called. Use instead. The `assemblyFile` parameter must refer to a URI without escape characters. This method supplies escape characters for all invalid characters in the URI. @@ -5199,27 +5199,27 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio Assemblies can be loaded into one of three contexts, or can be loaded without context: -- The load context contains assemblies found by probing: in the global assembly cache, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. +- The load context contains assemblies found by probing: in the global assembly cache, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. -- The load-from context contains assemblies for which the user provided a path that is not included in probing. , , and are examples of methods that load by path. +- The load-from context contains assemblies for which the user provided a path that is not included in probing. , , and are examples of methods that load by path. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. -- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. +- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. -- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. +- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. The load-from context allows an assembly to be loaded from a path that is not included in probing, and yet allows dependencies on that path to be found and loaded because the path information is maintained by the context. - The method has the following disadvantages. Consider using instead. + The method has the following disadvantages. Consider using instead. -- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. +- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. -- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. +- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. -- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. +- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. -- demands and , or , on the specified path. +- demands and , or , on the specified path. - If a native image exists for `assemblyFile`, it is not used. The assembly cannot be loaded as domain-neutral. @@ -5307,41 +5307,41 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio Assemblies can be loaded into one of three contexts, or can be loaded without context: -- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. +- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. -- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. , , and are examples of methods that load by path. +- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. , , and are examples of methods that load by path. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. -- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. +- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. -- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. +- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. The load-from context allows an assembly to be loaded from a path not included in probing, and yet allows dependencies on that path to be found and loaded because the path information is maintained by the context. - The method has the following disadvantages. Consider using instead. + The method has the following disadvantages. Consider using instead. -- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. +- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. -- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. +- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. -- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. +- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. -- demands and , or , on the specified path. +- demands and , or , on the specified path. - If a native image exists for `assemblyFile`, it is not used. The assembly cannot be loaded as domain neutral. Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. - If you call this method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. -- When you use a method with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. +- When you use a method with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. ]]> @@ -5554,7 +5554,7 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio ## Remarks > [!IMPORTANT] -> The overloads of the method are obsolete and have been retained for backward compatibility. The non-obsolete alternative is . +> The overloads of the method are obsolete and have been retained for backward compatibility. The non-obsolete alternative is . ]]> @@ -5637,13 +5637,13 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio ## Remarks > [!IMPORTANT] -> The method is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . +> The method is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . - Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the method overload or the method overload. + Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the method overload or the method overload. - In .NET Core/5+, the target assembly is loaded into the current or the if it's set. + In .NET Core/5+, the target assembly is loaded into the current or the if it's set. - This method first calls . If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number. + This method first calls . If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number. ]]> @@ -5706,13 +5706,13 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio ## Remarks > [!IMPORTANT] -> The method is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . +> The method is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . Evidence is the set of information that constitutes input to security policy decisions, such as what permissions can be granted to code. - Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the method or the method. + Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the method or the method. - This method first calls . If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number. + This method first calls . If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number. ]]> @@ -6165,7 +6165,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e method, you cannot execute code in the assembly. To execute code, the assembly must be loaded into the execution context. + If an assembly has been loaded into the reflection-only context, using the method, you cannot execute code in the assembly. To execute code, the assembly must be loaded into the execution context. ]]> @@ -6244,7 +6244,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e method. + You cannot execute code from an assembly loaded into the reflection-only context. To execute code, the assembly must be loaded into the execution context as well, using the method. The reflection-only context is no different from other contexts. Assemblies that are loaded into the context can be unloaded only by unloading the application domain. @@ -6325,7 +6325,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e ## Remarks Dependencies are not automatically loaded into the reflection-only context. - You cannot execute code from an assembly loaded into the reflection-only context. To execute code, the assembly must be loaded into the execution context as well, using the method. + You cannot execute code from an assembly loaded into the reflection-only context. To execute code, the assembly must be loaded into the execution context as well, using the method. The reflection-only context is no different from other contexts. Assemblies that are loaded into the context can be unloaded only by unloading the application domain. @@ -6410,7 +6410,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e ## Remarks Dependencies are not automatically loaded into the reflection-only context. To automatically load dependencies, handle the event and load the dependency in the event handler. - You cannot execute code from an assembly that has been loaded into the reflection-only context. To execute the code, load the assembly with the method. + You cannot execute code from an assembly that has been loaded into the reflection-only context. To execute the code, load the assembly with the method. The `assemblyFile` parameter must refer to a URI without escape characters. This method supplies escape characters for all invalid characters in the URI. @@ -6794,7 +6794,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e > [!CAUTION] > If you use either of these solutions, you must be certain that it is safe to load `assemblyFile` with full trust. - For a discussion of load contexts, including the load-from context, see the method overload. + For a discussion of load contexts, including the load-from context, see the method overload. ]]> diff --git a/xml/System.Reflection/AssemblyFlagsAttribute.xml b/xml/System.Reflection/AssemblyFlagsAttribute.xml index 47e8ffbf52e..094aa13f392 100644 --- a/xml/System.Reflection/AssemblyFlagsAttribute.xml +++ b/xml/System.Reflection/AssemblyFlagsAttribute.xml @@ -72,7 +72,7 @@ To access the flags that have been specified for an assembly, use the property to obtain an object, then use the property to obtain an value. - To specify flags for a dynamic assembly, set the property of the object that you pass to the method. + To specify flags for a dynamic assembly, set the property of the object that you pass to the method. diff --git a/xml/System.Reflection/AssemblyName.xml b/xml/System.Reflection/AssemblyName.xml index bced6a8e924..a7ff993db10 100644 --- a/xml/System.Reflection/AssemblyName.xml +++ b/xml/System.Reflection/AssemblyName.xml @@ -135,31 +135,31 @@ A "++" becomes "\\+\\+", and a "\\" becomes "\\\\". - This qualified name can be persisted and later used to load the . To search for and load a , use either with the type name only or with the assembly qualified type name. with the type name only will look for the in the caller's assembly and then in the System assembly. with the assembly qualified type name will look for the in any assembly. + This qualified name can be persisted and later used to load the . To search for and load a , use either with the type name only or with the assembly qualified type name. with the type name only will look for the in the caller's assembly and then in the System assembly. with the assembly qualified type name will look for the in any assembly. A fully specified must have the name, culture, public key or public key token, major version, minor version, build number, and revision number parameters. The last four are packaged in the type. - To create a simple name, create an object using the parameterless constructor and set the . The other properties are optional. + To create a simple name, create an object using the parameterless constructor and set the . The other properties are optional. - To create a full strong name, create an object using the parameterless constructor and set the and . The other properties are optional. Use and to set the public key and the strong name. The strong name signing always uses the hash algorithm. + To create a full strong name, create an object using the parameterless constructor and set the and . The other properties are optional. Use and to set the public key and the strong name. The strong name signing always uses the hash algorithm. To ensure that the names are constructed correctly, use the following properties: -- -- -- +- +- +- You can also get the name by using the `/l` option with the [Gacutil.exe (Global Assembly Cache Tool)](/dotnet/framework/tools/gacutil-exe-gac-tool). For a partially specified strong name, create an object using the parameterless constructor and set the name and public key. An assembly created using such an can be signed later using the Assembly Linker (Al.exe). - It is possible to specify a public key and a with inconsistent values. This can be useful in developer scenarios. In this case, the public key retrieved with specifies the correct public key, while the specifies the public and private keys used during development. When the runtime detects a mismatch between the and the public key, it looks up in the registry the correct key that matches the public key. + It is possible to specify a public key and a with inconsistent values. This can be useful in developer scenarios. In this case, the public key retrieved with specifies the correct public key, while the specifies the public and private keys used during development. When the runtime detects a mismatch between the and the public key, it looks up in the registry the correct key that matches the public key. The format of the display name of an is a comma-delimited Unicode string that begins with the name, as follows: `Name <,Culture = CultureInfo> <,Version = Major.Minor.Build.Revision> <, StrongName> <,PublicKeyToken> '\0'` - `Name` is the textual name of the assembly. `CultureInfo` is the RFC1766-format-defined culture. `Major`, `Minor`, `Build`, and `Revision` are the major version, minor version, build number, and revision number of the assembly. `StrongName` is the hexadecimal-encoded low-order 64 bits of the hash value of the public key generated using the SHA-1 hashing algorithm and the public key specified by . `PublicKeyToken` is the hexadecimal-encoded public key specified by . + `Name` is the textual name of the assembly. `CultureInfo` is the RFC1766-format-defined culture. `Major`, `Minor`, `Build`, and `Revision` are the major version, minor version, build number, and revision number of the assembly. `StrongName` is the hexadecimal-encoded low-order 64 bits of the hash value of the public key generated using the SHA-1 hashing algorithm and the public key specified by . `PublicKeyToken` is the hexadecimal-encoded public key specified by . Hexadecimal encoding is defined as the conversion of each byte of a binary object to two hexadecimal characters, progressing from least to most significant byte. Additional display values will be added as deemed necessary. @@ -456,10 +456,10 @@ Note: In .NET for Win ## Remarks When an assembly is loaded, this value can also be obtained using the property. - If the assembly was loaded as a byte array, this property returns the location of the caller of the method overload, not the location of the loaded assembly. + If the assembly was loaded as a byte array, this property returns the location of the caller of the method overload, not the location of the loaded assembly. > [!NOTE] -> Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). +> Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). @@ -815,14 +815,14 @@ Note: In .NET for Win mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 ``` - Writing your own code to parse display names is not recommended. Instead, pass the display name to the constructor, which parses it and populates the appropriate fields of the new . + Writing your own code to parse display names is not recommended. Instead, pass the display name to the constructor, which parses it and populates the appropriate fields of the new . When an assembly is loaded, this value can also be obtained using the property. ## Examples - The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the code example sets the , , , and properties, which together comprise an assembly's full name, or display name. The property is then used to retrieve the display name. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the code example sets the , , , and properties, which together comprise an assembly's full name, or display name. The property is then used to retrieve the display name. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/CodeBase/assemblyname_codebase.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/CodeBase/assemblyname_codebase.vb" id="Snippet4"::: @@ -1032,7 +1032,7 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 method is used to give the assembly a public key. The method is then used to retrieve the public key, which is displayed to the console. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to give the assembly a public key. The method is then used to retrieve the public key, which is displayed to the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/Flags/assemblyname_keypair.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/Flags/assemblyname_keypair.vb" id="Snippet2"::: @@ -1099,7 +1099,7 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 method is used to set the assembly's public key token. The method is then used to retrieve the public key token, which is displayed to the console. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to set the assembly's public key token. The method is then used to retrieve the public key token, which is displayed to the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/Flags/assemblyname_keypair.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/Flags/assemblyname_keypair.vb" id="Snippet3"::: @@ -1162,7 +1162,7 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 ## Remarks > [!IMPORTANT] -> Starting with the .NET Framework 4, the property of an object that is returned by the method is if there is no hash algorithm for the referenced assembly, or if the hash algorithm of the referenced assembly is not identified by the enumeration. In previous versions of the .NET Framework, the property returned in this situation. +> Starting with the .NET Framework 4, the property of an object that is returned by the method is if there is no hash algorithm for the referenced assembly, or if the hash algorithm of the referenced assembly is not identified by the enumeration. In previous versions of the .NET Framework, the property returned in this situation. @@ -1541,12 +1541,12 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 method to provide a public key token. Otherwise, a is thrown when the method is called. + You must also use the method to provide a public key token. Otherwise, a is thrown when the method is called. ## Examples - The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to give the assembly a public key. The method is then used to retrieve the public key, which is displayed to the console. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to give the assembly a public key. The method is then used to retrieve the public key, which is displayed to the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.vb" id="Snippet1"::: @@ -1608,12 +1608,12 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 method, you must also use the method to provide a public key token. Otherwise, a is thrown when the method is called. + When you set the public key by calling the method, you must also use the method to provide a public key token. Otherwise, a is thrown when the method is called. ## Examples - The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to set the assembly's public key token. The method is then used to retrieve the public key token, which is displayed to the console. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to set the assembly's public key token. The method is then used to retrieve the public key token, which is displayed to the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.vb" id="Snippet2"::: @@ -1887,7 +1887,7 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 ## Examples - The following example gets an object for a hypothetical `MyAssembly.exe` assembly, and then uses the method to retrieve the full assembly name, or display name. + The following example gets an object for a hypothetical `MyAssembly.exe` assembly, and then uses the method to retrieve the full assembly name, or display name. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/GetAssemblyName/assemblyname_getassemblyname.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/GetAssemblyName/assemblyname_getassemblyname.vb" id="Snippet2"::: @@ -2023,9 +2023,9 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 information indicates, for example, that the assembly cannot execute side-by-side with other versions due to conflicts over a device driver. + information indicates, for example, that the assembly cannot execute side-by-side with other versions due to conflicts over a device driver. - Currently, always returns , and is not used by the loader. This property is reserved for a future feature. + Currently, always returns , and is not used by the loader. This property is reserved for a future feature. ]]> diff --git a/xml/System.Reflection/AssemblyVersionAttribute.xml b/xml/System.Reflection/AssemblyVersionAttribute.xml index 5f7df368e7b..b95cc9663f1 100644 --- a/xml/System.Reflection/AssemblyVersionAttribute.xml +++ b/xml/System.Reflection/AssemblyVersionAttribute.xml @@ -111,14 +111,14 @@ You can mitigate some of these issues by limiting the use of time-based versions The assembly major and minor versions are used as the type library version number when the assembly is exported. Some COM hosts do not accept type libraries with the version number 0.0. Therefore, if you want to expose an assembly to COM clients, set the assembly version explicitly to 1.0 in the `AssemblyVersionAttribute` page for projects created outside Visual Studio 2005 and with no `AssemblyVersionAttribute` specified. Do this even when the assembly version is 0.0. All projects created in Visual Studio 2005 have a default assembly version of 1.0.*. - To get the name of an assembly you have loaded, call on the assembly to get an , and then get the property. To get the name of an assembly you have not loaded, call from your client application to check the assembly version that your application uses. + To get the name of an assembly you have loaded, call on the assembly to get an , and then get the property. To get the name of an assembly you have not loaded, call from your client application to check the assembly version that your application uses. The attribute can only be applied once. Some Visual Studio project templates already include the attribute. In those projects, adding the attribute in code causes a compiler error. ## Examples - The following example uses the attribute to assign a version number to an assembly. At compile time, this version information is stored with the assembly's metadata. At run time, the example retrieves the value of the property on a type found in the assembly to get a reference to the executing assembly, and it retrieves the assembly's version information from the property of the object returned by the method. + The following example uses the attribute to assign a version number to an assembly. At compile time, this version information is stored with the assembly's metadata. At run time, the example retrieves the value of the property on a type found in the assembly to get a reference to the executing assembly, and it retrieves the assembly's version information from the property of the object returned by the method. :::code language="csharp" source="~/snippets/csharp/System/Version/Overview/example1.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Version/Overview/example1.vb" id="Snippet6"::: diff --git a/xml/System.Reflection/Binder.xml b/xml/System.Reflection/Binder.xml index 07d19d8a756..a9caf7c3932 100644 --- a/xml/System.Reflection/Binder.xml +++ b/xml/System.Reflection/Binder.xml @@ -68,7 +68,7 @@ class are used by methods such as , which selects from a set of possible members to execute, based on a set of parameter types and argument values; , which selects a method based on parameter types; and so on. + Implementations of the class are used by methods such as , which selects from a set of possible members to execute, based on a set of parameter types and argument values; , which selects a method based on parameter types; and so on. A default implementation of the class is provided by the property. @@ -193,9 +193,9 @@ , the default binder implementation provided by simply returns the first element of `match`. No selection is done. + If `bindingAttr` does not include , the default binder implementation provided by simply returns the first element of `match`. No selection is done. - This method controls the binding provided by . + This method controls the binding provided by . If a binder implementation allows coercion of string values to numeric types, the `culture` parameter is necessary to convert a string that represents 1000 to a value, because 1000 is represented differently by different cultures. The default binder does not do such string coercions. @@ -300,9 +300,9 @@ ## Remarks The default binder takes into account both parameters that have values and `params` arrays (`ParamArray` arrays in Visual Basic). Thus, it is possible to find a match in cases where `args` and `match` do not contain the same number of elements. - The binder enables a client to map the array of arguments back to its original form if the argument array has been manipulated by . Use this remap capability to get back by-reference arguments when such arguments are present. When you pass arguments by name, the binder reorders the argument array. The `state` parameter keeps track of argument reordering, thus enabling the binder's method to reorder the argument array to its original form. + The binder enables a client to map the array of arguments back to its original form if the argument array has been manipulated by . Use this remap capability to get back by-reference arguments when such arguments are present. When you pass arguments by name, the binder reorders the argument array. The `state` parameter keeps track of argument reordering, thus enabling the binder's method to reorder the argument array to its original form. - The method is used by the method. + The method is used by the method. If a binder implementation allows coercion of string values to numeric types, the `culture` parameter is necessary to convert a string that represents 1000 to a value, because 1000 is represented differently by different cultures. The default binder does not do such string coercions. diff --git a/xml/System.Reflection/BindingFlags.xml b/xml/System.Reflection/BindingFlags.xml index b2347942dbe..dbb26b4d540 100644 --- a/xml/System.Reflection/BindingFlags.xml +++ b/xml/System.Reflection/BindingFlags.xml @@ -92,39 +92,39 @@ ## Remarks These `BindingFlags` control binding for a great many classes in the `System`, `System.Reflection`, and `System.Runtime` namespaces that invoke, create, get, set, and find members and types. - `BindingFlags` are used in the following methods and other places such as : + `BindingFlags` are used in the following methods and other places such as : -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- `InvokeMember` and `GetMethod` are especially important. @@ -137,7 +137,7 @@ > [!NOTE] > You must specify `Instance` or `Static` along with `Public` or `NonPublic` or no members will be returned. - The following table lists the coercions performed by the default . This table applies especially to the `BindingFlags.ExactBinding` binding flag. The general principle is that should perform only widening coercions, which never lose data. An example of a widening coercion is coercing a value that is a 32-bit signed integer to a value that is a 64-bit signed integer. This is distinguished from a narrowing coercion, which may lose data. An example of a narrowing coercion is coercing a 64-bit signed integer to a 32-bit signed integer. + The following table lists the coercions performed by the default . This table applies especially to the `BindingFlags.ExactBinding` binding flag. The general principle is that should perform only widening coercions, which never lose data. An example of a widening coercion is coercing a value that is a 32-bit signed integer to a value that is a 64-bit signed integer. This is distinguished from a narrowing coercion, which may lose data. An example of a narrowing coercion is coercing a 64-bit signed integer to a 32-bit signed integer. |Source Type|Target Type| |-----------------|-----------------| diff --git a/xml/System.Reflection/ConstructorInfo.xml b/xml/System.Reflection/ConstructorInfo.xml index 2734ebef483..ffd8f4368bf 100644 --- a/xml/System.Reflection/ConstructorInfo.xml +++ b/xml/System.Reflection/ConstructorInfo.xml @@ -97,15 +97,15 @@ on a `ConstructorInfo` returned by either the or method of a object. + `ConstructorInfo` is used to discover the attributes of a constructor as well as to invoke a constructor. Objects are created by calling on a `ConstructorInfo` returned by either the or method of a object. > [!NOTE] -> inherits from several members, such as , that can be used to examine generic methods. In the .NET Framework version 2.0 constructors cannot be generic, so these members return `false` or `null`. +> inherits from several members, such as , that can be used to examine generic methods. In the .NET Framework version 2.0 constructors cannot be generic, so these members return `false` or `null`. ## Examples - The following example uses `ConstructorInfo` with and to find the constructors that match the specified search criteria. + The following example uses `ConstructorInfo` with and to find the constructors that match the specified search criteria. :::code language="csharp" source="~/snippets/csharp/System/Type/GetConstructor/type_getconstructor3.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetConstructor/type_getconstructor3.vb" id="Snippet1"::: @@ -442,7 +442,7 @@ Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked using reflection whenever the code is fully trusted. > [!NOTE] -> To create an instance of a value type that has no instance constructors, use the method. +> To create an instance of a value type that has no instance constructors, use the method. This method is a convenience method for the following overloaded version, using default values. This method cannot be overridden. @@ -537,7 +537,7 @@ Note: In .NET for Win Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked using reflection whenever the code is fully trusted. > [!NOTE] -> To create an instance of a value type that has no instance constructors, use the method. +> To create an instance of a value type that has no instance constructors, use the method. > [!NOTE] > This method can be used to access non-public members if the caller has been granted with the flag and if the grant set of the non-public members is restricted to the caller's grant set, or a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later. @@ -615,7 +615,7 @@ Note: In .NET for Win . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a constructor. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a constructor. diff --git a/xml/System.Reflection/CustomAttributeData.xml b/xml/System.Reflection/CustomAttributeData.xml index 518ad51de86..4fc65e692a3 100644 --- a/xml/System.Reflection/CustomAttributeData.xml +++ b/xml/System.Reflection/CustomAttributeData.xml @@ -84,7 +84,7 @@ , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. + Code that is being examined in the reflection-only context cannot be executed, so it is not always possible to examine custom attributes by creating instances of them and then examining their properties, using methods like , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. The class allows examination of custom attributes in the reflection-only context by providing an abstraction for attributes. The members of this class can be used to obtain the positional arguments and named arguments of the attribute. Use the property to get a list of structures that represent the positional arguments, and use the property to get a list of structures that represent the named arguments. @@ -94,15 +94,15 @@ When you have a structure for an argument, whether named or positional, use the property to get the type and the property to get the value. > [!NOTE] -> For an array argument, the property returns a generic of objects. Each object in the collection represents the corresponding element of the array. +> For an array argument, the property returns a generic of objects. Each object in the collection represents the corresponding element of the array. - can be used in the execution context as well as in the reflection-only context. For example, you might want to avoid loading the assembly that contains the code for a custom attribute. Using the class is different from using methods like : + can be used in the execution context as well as in the reflection-only context. For example, you might want to avoid loading the assembly that contains the code for a custom attribute. Using the class is different from using methods like : - The properties and methods of only provide you with the values that were specified for the attribute instance, not the semantics of the constructor. For example, a string argument of an attribute might be converted internally to some other representation, and returned in a canonical form; or a property might have side effects when the actual attribute code is executed. - The properties and methods of do not allow you to retrieve the custom attributes inherited from base classes. - To create instances of the class, use the `static` (`Shared` in Visual Basic) factory methods. + To create instances of the class, use the `static` (`Shared` in Visual Basic) factory methods. @@ -362,7 +362,7 @@ ## Remarks This method gets the positional arguments that were specified for the custom attribute instance without executing any of the custom attribute code. Thus, it can be used in the reflection-only context. - Use the method to get the named arguments specified for the attribute instance. + Use the method to get the named arguments specified for the attribute instance. @@ -500,7 +500,7 @@ method that can always be used in the Reflection-only context. + This method provides an alternative to the method that can always be used in the Reflection-only context. @@ -511,7 +511,7 @@ The attribute that is applied to the type demonstrates array properties, with both positional and named arguments. - The method is used in `Main()` to get the custom attributes applied to the assembly. The return value of the method is passed to the `ShowAttributeData` method. + The method is used in `Main()` to get the custom attributes applied to the assembly. The return value of the method is passed to the `ShowAttributeData` method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: @@ -591,7 +591,7 @@ The attribute that is applied to the type demonstrates array properties, with both positional and named arguments. - The method is used in `Main()` to get the custom attributes that were applied to a type and to a test method ( derives from ). The return value of is passed to the `ShowAttributeData` method. + The method is used in `Main()` to get the custom attributes that were applied to a type and to a test method ( derives from ). The return value of is passed to the `ShowAttributeData` method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: @@ -718,7 +718,7 @@ method that can always be used in the Reflection-only context. + This method provides an alternative to the method that can always be used in the Reflection-only context. @@ -729,7 +729,7 @@ The attribute that is applied to the type demonstrates array properties, with both positional and named arguments. - The method is used in `Main()` to retrieve the custom attributes applied to a parameter of a test method. The return value of is passed to the `ShowAttributeData` method. + The method is used in `Main()` to retrieve the custom attributes applied to a parameter of a test method. The return value of is passed to the `ShowAttributeData` method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: @@ -843,7 +843,7 @@ The list that is returned contains only the named arguments that were specified for the attribute instance. - Use the method to get the positional arguments that were specified for the attribute instance. + Use the method to get the positional arguments that were specified for the attribute instance. @@ -923,7 +923,7 @@ The attribute that is applied to the type demonstrates array properties, with both positional and named arguments. - In this example, the method is used in the `ShowAttributeData` method, to identify the attribute whose data is being displayed. + In this example, the method is used in the `ShowAttributeData` method, to identify the attribute whose data is being displayed. :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: diff --git a/xml/System.Reflection/CustomAttributeExtensions.xml b/xml/System.Reflection/CustomAttributeExtensions.xml index b7e61f363f6..e9ac77523d4 100644 --- a/xml/System.Reflection/CustomAttributeExtensions.xml +++ b/xml/System.Reflection/CustomAttributeExtensions.xml @@ -125,11 +125,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified assembly. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -188,11 +188,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified member. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -254,11 +254,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified module. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -317,11 +317,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified parameter. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -384,11 +384,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -453,11 +453,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified parameter, and optionally inspects the ancestors of that parameter. A custom attribute matching , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -529,11 +529,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified assembly. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -602,11 +602,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified member. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -678,11 +678,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified module. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -751,11 +751,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified parameter. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -830,11 +830,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -909,11 +909,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified parameter, and optionally inspects the ancestors of that parameter. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> diff --git a/xml/System.Reflection/CustomAttributeFormatException.xml b/xml/System.Reflection/CustomAttributeFormatException.xml index f5abb016e49..247a95b158c 100644 --- a/xml/System.Reflection/CustomAttributeFormatException.xml +++ b/xml/System.Reflection/CustomAttributeFormatException.xml @@ -130,8 +130,8 @@ |Property|Value| |--------------|-----------| -||null| -||The empty string ("").| +||null| +||The empty string ("").| ]]> @@ -185,7 +185,7 @@ |Property|Value| |--------------|-----------| -||`null`| +||`null`| ]]> @@ -303,8 +303,8 @@ |Property|Value| |--------------|-----------| -||The `inner` exception.| -||The error message string.| +||The `inner` exception.| +||The error message string.| ]]> diff --git a/xml/System.Reflection/CustomAttributeNamedArgument.xml b/xml/System.Reflection/CustomAttributeNamedArgument.xml index 78e316b1ad6..7d3111e85ca 100644 --- a/xml/System.Reflection/CustomAttributeNamedArgument.xml +++ b/xml/System.Reflection/CustomAttributeNamedArgument.xml @@ -93,14 +93,14 @@ , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. + Code that is being examined in the reflection-only context cannot be executed, so it is not always possible to examine custom attributes by creating instances of them and then examining their properties, using methods like , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. The structure is used by the class to provide access to a named argument specified for a custom attribute instance, without executing the code of the corresponding property of the custom attribute type. The property returns a structure that contains the type and value of the named argument. > [!IMPORTANT] > Whether an argument is named or positional, you must access its type and value by using the structure. - To create instances of the class, use the `static` factory method. + To create instances of the class, use the `static` factory method. @@ -589,7 +589,7 @@ if the two structures are equal; otherwise, . - .]]> + .]]> @@ -643,7 +643,7 @@ if the two structures are different; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection/CustomAttributeTypedArgument.xml b/xml/System.Reflection/CustomAttributeTypedArgument.xml index 8467c8a06e4..3f502dfec79 100644 --- a/xml/System.Reflection/CustomAttributeTypedArgument.xml +++ b/xml/System.Reflection/CustomAttributeTypedArgument.xml @@ -93,15 +93,15 @@ , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. + Code that is being examined in the reflection-only context cannot be executed, so it is not always possible to examine custom attributes by creating instances of them and then examining their properties, using methods like , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. The structure is used by the class to provide access to the type and value of a positional argument specified for a custom attribute instance, without executing the attribute constructor. It also provides access to the type and value of a named argument without executing the code of the corresponding property of the custom attribute type. The types and values of all the positional and named arguments of an attribute instance are provided by structures. The positional attributes returned by the property are directly represented by structures, but the named arguments returned by the property are represented by structures; to get the structure for a named argument, use the property. - If an argument is an array of values, the property of the that represents the argument returns a generic of objects. Each object in the collection represents the corresponding element of the array. + If an argument is an array of values, the property of the that represents the argument returns a generic of objects. Each object in the collection represents the corresponding element of the array. - To create instances of the class, use the `static` factory method. + To create instances of the class, use the `static` factory method. @@ -176,7 +176,7 @@ constructor. + The `value` parameter cannot be `null` for this constructor, because the argument type is inferred from the type of `value`. To specify a `null` value, use the constructor. This constructor is for use by inheritors of the class. It is not intended for use in application code. @@ -522,7 +522,7 @@ if the two structures are equal; otherwise, . - .]]> + .]]> @@ -576,7 +576,7 @@ if the two structures are different; otherwise, . - .]]> + .]]> @@ -683,7 +683,7 @@ ## Remarks If the represents an array argument, this property returns a `ReadOnlyCollection` (`ReadOnlyCollection(Of CustomAttributeTypedArgument)` in Visual Basic). Each element of the collection represents the corresponding element of the array argument. - The type of the value can be obtained by using the property. gets the actual type of the value returned by the property for simple arguments or for elements of array arguments. It returns the array type for array arguments. + The type of the value can be obtained by using the property. gets the actual type of the value returned by the property for simple arguments or for elements of array arguments. It returns the array type for array arguments. @@ -699,7 +699,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: - | + | ]]> diff --git a/xml/System.Reflection/EventInfo.xml b/xml/System.Reflection/EventInfo.xml index 083085ec963..c95dba567d4 100644 --- a/xml/System.Reflection/EventInfo.xml +++ b/xml/System.Reflection/EventInfo.xml @@ -98,7 +98,7 @@ class to inspect events and to hook up event handlers, as shown in the example code for the method. + Use the class to inspect events and to hook up event handlers, as shown in the example code for the method. > [!NOTE] > is not intended to be used to raise events. An object raises events as dictated by its internal state. @@ -109,7 +109,7 @@ The event model works equally well for single-cast and multicast delegates. When the delegate's invoke method is called, only a single object will have a method called on it. A multicast modifier can be applied to a delegate declaration, which allows multiple methods to be called when the invoke method of the delegate is called. - Calling on `EventInfo` when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. + Calling on `EventInfo` when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. @@ -243,11 +243,11 @@ You might use the `AddEventHandler` method when you load a type after the progra ## Examples The following example creates an instance of the class, creates an event handler using a dynamic assembly, and hooks up the dynamic event handler. All actions are performed using late binding. - The instance is stored in a variable of type , and all code that accesses the does so late-bound. The example uses the method to get the event, and the property to get the delegate type for the event. + The instance is stored in a variable of type , and all code that accesses the does so late-bound. The example uses the method to get the event, and the property to get the delegate type for the event. The example gets a for the `Invoke` method of the delegate type and obtains the signature of the delegate from the instance. The example then creates a dynamic assembly with one module containing a single type named `Handler` and gives the type a `static` method (`Shared` method in Visual Basic) named `DynamicHandler` that handles the event. - After the dynamic type is created, the example gets a for the finished method and uses it to create a delegate instance. This instance is passed to the method to hook up the event. The program then pauses to allow the event to be raised. + After the dynamic type is created, the example gets a for the finished method and uses it to create a delegate instance. This instance is passed to the method to hook up the event. The program then pauses to allow the event to be raised. :::code language="csharp" source="~/snippets/csharp/System.Reflection/EventInfo/AddEventHandler/source.cs"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/EventInfo/AddEventHandler/source.vb"::: @@ -321,7 +321,7 @@ Note: In with a value of `true`. + This property is the equivalent of calling the with a value of `true`. ]]> @@ -773,13 +773,13 @@ add_( handler) ## Remarks The metadata for an event can associate four kinds of methods with the event: -- The `.addon` directive specifies the method used to add event handlers. Use the method to retrieve an for that method. +- The `.addon` directive specifies the method used to add event handlers. Use the method to retrieve an for that method. -- The `.removeon` directive specifies the method used to detach event handlers. Use the method to retrieve an for that method. +- The `.removeon` directive specifies the method used to detach event handlers. Use the method to retrieve an for that method. -- The `.fire` directive specifies the method used to raise the event. Use the method to retrieve an for that method. +- The `.fire` directive specifies the method used to raise the event. Use the method to retrieve an for that method. -- The `.other` directive specifies any other methods associated with the event. Use the method to retrieve an array of objects for those methods. +- The `.other` directive specifies any other methods associated with the event. Use the method to retrieve an array of objects for those methods. The methods associated with an event using the `.other` directive have no special significance to the runtime. The C# and Visual Basic compilers do not use the `.other` directive. @@ -839,13 +839,13 @@ add_( handler) ## Remarks The metadata for an event can associate four kinds of methods with the event: -- The `.addon` directive specifies the method used to add event handlers. Use the method to retrieve an for that method. +- The `.addon` directive specifies the method used to add event handlers. Use the method to retrieve an for that method. -- The `.removeon` directive specifies the method used to detach event handlers. Use the method to retrieve an for this method. +- The `.removeon` directive specifies the method used to detach event handlers. Use the method to retrieve an for this method. -- The `.fire` directive specifies the method used to raise the event. Use the method to retrieve an for this method. +- The `.fire` directive specifies the method used to raise the event. Use the method to retrieve an for this method. -- The `.other` directive specifies any other methods associated with the event. Use the method to retrieve an array of objects for those methods. +- The `.other` directive specifies any other methods associated with the event. Use the method to retrieve an array of objects for those methods. The methods associated with an event using the `.other` directive have no special significance to the runtime. The C# and Visual Basic compilers do not use the `.other` directive. @@ -1335,7 +1335,7 @@ remove_( handler) . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is an event. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is an event. ]]> @@ -1492,7 +1492,7 @@ remove_( handler) with a value of `true`. + This property is the equivalent of calling the with a value of `true`. ]]> @@ -1637,7 +1637,7 @@ Note: In with a value of `true`. + This property is the equivalent of calling the with a value of `true`. ]]> diff --git a/xml/System.Reflection/ExceptionHandlingClause.xml b/xml/System.Reflection/ExceptionHandlingClause.xml index b8934305a71..90746e1b9b0 100644 --- a/xml/System.Reflection/ExceptionHandlingClause.xml +++ b/xml/System.Reflection/ExceptionHandlingClause.xml @@ -62,13 +62,13 @@ class provides information about the clauses in a `try`…`catch`…`finally` block (`Try`…`Catch`…`Finally` in Visual Basic). To get a list of exception-handling clauses in a method, obtain a that represents the method. Use the method to obtain a object, and then use the property to get the list of clauses. + The class provides information about the clauses in a `try`…`catch`…`finally` block (`Try`…`Catch`…`Finally` in Visual Basic). To get a list of exception-handling clauses in a method, obtain a that represents the method. Use the method to obtain a object, and then use the property to get the list of clauses. > [!NOTE] > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. You can use Ildasm.exe to examine the MSIL for the compiled code example, to see how the offsets and lengths are calculated. @@ -185,7 +185,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -309,7 +309,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -378,7 +378,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -446,7 +446,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -557,7 +557,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -625,7 +625,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. diff --git a/xml/System.Reflection/ExceptionHandlingClauseOptions.xml b/xml/System.Reflection/ExceptionHandlingClauseOptions.xml index 0380ee90a81..703085068b0 100644 --- a/xml/System.Reflection/ExceptionHandlingClauseOptions.xml +++ b/xml/System.Reflection/ExceptionHandlingClauseOptions.xml @@ -57,13 +57,13 @@ object and call the method to obtain the method body. Use the property to obtain a list of objects. + To examine the exception-handling clauses in a method, obtain a object and call the method to obtain the method body. Use the property to obtain a list of objects. > [!NOTE] > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example provided for the class. diff --git a/xml/System.Reflection/FieldInfo.xml b/xml/System.Reflection/FieldInfo.xml index cb6f4be5bef..16c8c7954fa 100644 --- a/xml/System.Reflection/FieldInfo.xml +++ b/xml/System.Reflection/FieldInfo.xml @@ -97,14 +97,14 @@ class does not have a public constructor. objects are obtained by calling either the or method of a `Type` object. + The field information is obtained from metadata. The class does not have a public constructor. objects are obtained by calling either the or method of a `Type` object. Fields are variables defined in the class. provides access to the metadata for a field within a class and provides dynamic set and get functionality for the field. The class is not loaded into memory until invoke or get is called on the object. ## Examples - The following example uses the method to get the field-related information from the class, and then displays field attributes. + The following example uses the method to get the field-related information from the class, and then displays field attributes. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/Overview/fieldinfo.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/Overview/fieldinfo.vb" id="Snippet1"::: @@ -406,7 +406,7 @@ ## Examples - The following example creates a field, gets its type and , and displays its . + The following example creates a field, gets its type and , and displays its . :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/FieldType/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/FieldType/source.vb" id="Snippet1"::: @@ -492,7 +492,7 @@ ## Examples - The following code example uses the method to get objects for the fields of a type, gets a structure for each field, and then retrieves the objects from the handles using this overload of the method. + The following code example uses the method to get objects for the fields of a type, gets a structure for each field, and then retrieves the objects from the handles using this overload of the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/GetFieldFromHandle/fieldinfo_getfieldfromhandle.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/GetFieldFromHandle/fieldinfo_getfieldfromhandle.vb" id="Snippet1"::: @@ -573,14 +573,14 @@ Implementations are compatible in some cases. For example, a single implementation is shared by all types that are constructed from a particular generic type definition by using reference types for the generic type arguments. For example, `MyType`, `MyType`, and `MyType` all share the same implementation. In this situation, the object that is returned represents a field on the type that `declaringType` specifies, regardless of the original source of `handle`. This practice is not recommended, because it works only if the generic type arguments of the constructed type are reference types. - If a generic argument is a value type, the runtime type handle of the constructed type is not compatible with runtime field handles from constructions that have a reference type in the same generic parameter position, or that have a different value type in that position. In that case, the only way to use the overload is to ensure that `declaringType` is the runtime type handle for the constructed type that `handle` belongs to. + If a generic argument is a value type, the runtime type handle of the constructed type is not compatible with runtime field handles from constructions that have a reference type in the same generic parameter position, or that have a different value type in that position. In that case, the only way to use the overload is to ensure that `declaringType` is the runtime type handle for the constructed type that `handle` belongs to. ## Examples The following example shows how to retrieve objects for fields on constructed generic classes. The example defines the generic type `Test` (`Test(Of T)` in Visual Basic) with a single field named `TestField`, of type `T`. The example gets the and for the case where `T` is , and demonstrates the following: -- An exception is thrown if the method overload is used. This is true even if the field is not of type `T`. +- An exception is thrown if the method overload is used. This is true even if the field is not of type `T`. - A is retrieved successfully if the runtime type handle is from the same construction as the runtime field handle, in this case `Test`. @@ -686,9 +686,9 @@ , , and , which are used to obtain custom modifiers from a function pointer. + A modified type supports , , and , which are used to obtain custom modifiers from a function pointer. - To obtain the normal, unmodified type from a modified type, use . + To obtain the normal, unmodified type from a modified type, use . This method is provided for designers of managed compilers. For more information on custom modifiers, see classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -747,7 +747,7 @@ and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -864,7 +864,7 @@ and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -972,12 +972,12 @@ > To use this functionality, your application should target .NET Framework 3.5 or later. ## Examples - The following example uses the method to retrieve the value of a static field. Note that the value of the `obj` argument is `null`. + The following example uses the method to retrieve the value of a static field. Note that the value of the `obj` argument is `null`. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/GetValue/getfldval.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/GetValue/getfldval.vb" id="Snippet1"::: - The following example retrieves an array of objects that represents the fields of the `FieldsClass` type, and then calls the to display the value of each field for the `fieldsInst` object. + The following example retrieves an array of objects that represents the fields of the `FieldsClass` type, and then calls the to display the value of each field for the `fieldsInst` object. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/GetValue/fieldinfo_getvalue.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/GetValue/fieldinfo_getvalue.vb" id="Snippet1"::: @@ -1114,7 +1114,7 @@ Note: In .NET for Win The visibility of a field is exactly described by if the only visibility modifier is `internal` (`Friend` in Visual Basic). This property is `false` for fields that are `protected internal` in C# (`Protected Friend` in Visual Basic); use the property to identify such fields. ## Examples - The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/IsAssembly/source.vb" id="Snippet1"::: @@ -1183,7 +1183,7 @@ Note: In .NET for Win The visibility of a field is exactly described by if the only visibility modifier is `protected`. This property is `false` for fields that are `protected internal` in C# (`Protected Friend` in Visual Basic); use the property to identify such fields. ## Examples - The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/source.cs" id="Snippet1"::: @@ -1256,7 +1256,7 @@ Note: In .NET for Win The visibility of a field is exactly described by if the visibility modifier is `private protected` in C# or `Private Protected` in Visual Basic. ## Examples - The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/IsAssembly/source.vb" id="Snippet1"::: @@ -1329,7 +1329,7 @@ Note: In .NET for Win The visibility of a field is exactly described by if the visibility modifier is `protected internal` in C# (`Protected Friend` in Visual Basic). ## Examples - The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/IsAssembly/source.vb" id="Snippet1"::: @@ -1807,7 +1807,7 @@ Myfieldb - B readonly field, IsInitOnly = True , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -1818,7 +1818,7 @@ Myfieldb - B readonly field, IsInitOnly = True Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -1873,7 +1873,7 @@ Myfieldb - B readonly field, IsInitOnly = True , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -1884,7 +1884,7 @@ Myfieldb - B readonly field, IsInitOnly = True Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -1939,7 +1939,7 @@ Myfieldb - B readonly field, IsInitOnly = True , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -1950,7 +1950,7 @@ Myfieldb - B readonly field, IsInitOnly = True Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -2162,7 +2162,7 @@ Myfieldb - B static field; IsStatic - True . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a field. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a field. diff --git a/xml/System.Reflection/GenericParameterAttributes.xml b/xml/System.Reflection/GenericParameterAttributes.xml index 7575bf1765a..3d354d85eac 100644 --- a/xml/System.Reflection/GenericParameterAttributes.xml +++ b/xml/System.Reflection/GenericParameterAttributes.xml @@ -73,7 +73,7 @@ ## Examples - The following code example defines a generic type `Test` with two type parameters. The second type parameter has a base class constraint and a reference type constraint. When the program executes, the constraints are examined using the property and the method. + The following code example defines a generic type `Test` with two type parameters. The second type parameter has a base class constraint and a reference type constraint. When the program executes, the constraints are examined using the property and the method. :::code language="csharp" source="~/snippets/csharp/System/Type/GenericParameterAttributes/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GenericParameterAttributes/source.vb" id="Snippet1"::: diff --git a/xml/System.Reflection/ICustomAttributeProvider.xml b/xml/System.Reflection/ICustomAttributeProvider.xml index 176db36a0dd..12334c3116c 100644 --- a/xml/System.Reflection/ICustomAttributeProvider.xml +++ b/xml/System.Reflection/ICustomAttributeProvider.xml @@ -133,7 +133,7 @@ on or when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. + Calling on or when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. This method returns custom attributes defined directly on a non-inherited member only. @@ -199,7 +199,7 @@ This method returns custom attributes defined directly on a non-inherited member only. - Calling on or when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. + Calling on or when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. ]]> diff --git a/xml/System.Reflection/IReflect.xml b/xml/System.Reflection/IReflect.xml index a1dc3ff8114..a0193b341de 100644 --- a/xml/System.Reflection/IReflect.xml +++ b/xml/System.Reflection/IReflect.xml @@ -251,7 +251,7 @@ On .NET Framework, the interface is used to in method retrieves an array of objects by using the name and binding attribute that correspond to all public members or to all members that match a specified name. The case of the specified name is observed or ignored, as specified by . + The method retrieves an array of objects by using the name and binding attribute that correspond to all public members or to all members that match a specified name. The case of the specified name is observed or ignored, as specified by . ]]> @@ -847,9 +847,9 @@ On .NET Framework, the interface is used to in A method is invoked if the number of parameters in the method declaration equals the number of arguments in the specified argument list, and the type of each argument can be converted by the binder to the type of the parameter. > [!NOTE] -> The array of parameter modifiers passed to the method must contain a single parameter modifier. Only the first parameter modifier is considered when determining which argument needs to be passed by reference when exposed to COM. +> The array of parameter modifiers passed to the method must contain a single parameter modifier. Only the first parameter modifier is considered when determining which argument needs to be passed by reference when exposed to COM. - The binder finds all matching methods, in accordance with the type of binding requested (, , and so on). The set of methods is filtered by the name, number of arguments, and a set of search modifiers defined in the binder. After the method is selected, it is invoked, and accessibility is checked at that point. The search may control which set of methods is searched based upon the accessibility attribute associated with the method. selects the method to be invoked. The default binder selects the most specific match. + The binder finds all matching methods, in accordance with the type of binding requested (, , and so on). The set of methods is filtered by the name, number of arguments, and a set of search modifiers defined in the binder. After the method is selected, it is invoked, and accessibility is checked at that point. The search may control which set of methods is searched based upon the accessibility attribute associated with the method. selects the method to be invoked. The default binder selects the most specific match. Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked through reflection whenever the code is fully trusted. diff --git a/xml/System.Reflection/ImageFileMachine.xml b/xml/System.Reflection/ImageFileMachine.xml index 04c95f79add..063afeda242 100644 --- a/xml/System.Reflection/ImageFileMachine.xml +++ b/xml/System.Reflection/ImageFileMachine.xml @@ -55,14 +55,14 @@ Identifies the platform targeted by an executable. - method. - + method. + > [!NOTE] -> The values in this enumeration correspond to the constants IMAGE_FILE_MACHINE_I386, IMAGE_FILE_MACHINE_IA64, and IMAGE_FILE_MACHINE_AMD64 in the unmanaged Windows API, which are accessed by the unmanaged `GetPEKind` function. - +> The values in this enumeration correspond to the constants IMAGE_FILE_MACHINE_I386, IMAGE_FILE_MACHINE_IA64, and IMAGE_FILE_MACHINE_AMD64 in the unmanaged Windows API, which are accessed by the unmanaged `GetPEKind` function. + ]]> diff --git a/xml/System.Reflection/InterfaceMapping.xml b/xml/System.Reflection/InterfaceMapping.xml index 6cf66a76132..7605da9b1f0 100644 --- a/xml/System.Reflection/InterfaceMapping.xml +++ b/xml/System.Reflection/InterfaceMapping.xml @@ -71,13 +71,13 @@ Retrieves the mapping of an interface into the actual methods on a class that implements that interface. - structure when a type implements interface methods that use method names other than those specified by the interface, or when a type implements multiple interfaces which have a method with the same name. - - To obtain an structure, use the method. - + structure when a type implements interface methods that use method names other than those specified by the interface, or when a type implements multiple interfaces which have a method with the same name. + + To obtain an structure, use the method. + ]]> @@ -134,11 +134,11 @@ Shows the methods that are defined on the interface. - array. That is, the elements are in the same array indexing order. - + array. That is, the elements are in the same array indexing order. + ]]> @@ -245,11 +245,11 @@ Shows the methods that implement the interface. - array match their counterpart elements returned from the `TargetMethods` array. That is, the elements are in the same array indexing order. - + array match their counterpart elements returned from the `TargetMethods` array. That is, the elements are in the same array indexing order. + ]]> @@ -304,11 +304,11 @@ Represents the type that was used to create the interface mapping. - field is the instance of whose method returned the current structure. - + field is the instance of whose method returned the current structure. + ]]> diff --git a/xml/System.Reflection/InvalidFilterCriteriaException.xml b/xml/System.Reflection/InvalidFilterCriteriaException.xml index d357a49345a..21a2d786ad3 100644 --- a/xml/System.Reflection/InvalidFilterCriteriaException.xml +++ b/xml/System.Reflection/InvalidFilterCriteriaException.xml @@ -152,8 +152,8 @@ |Property|Value| |--------------|-----------| -||null| -||The empty string ("").| +||null| +||The empty string ("").| ]]> @@ -213,8 +213,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The error message string.| +||`null`| +||The error message string.| ]]> @@ -337,8 +337,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Reflection/LocalVariableInfo.xml b/xml/System.Reflection/LocalVariableInfo.xml index f963255a72e..4a28c2187b6 100644 --- a/xml/System.Reflection/LocalVariableInfo.xml +++ b/xml/System.Reflection/LocalVariableInfo.xml @@ -75,7 +75,7 @@ property. Use the method to obtain the for a object. + To get a list of local variables in a method, use the property. Use the method to obtain the for a object. > [!NOTE] > Local variable names are not persisted in metadata. In Microsoft intermediate language (MSIL), local variables are accessed by their position in the local variable signature. @@ -83,7 +83,7 @@ ## Examples - The following example defines a test method named `MethodBodyExample`, and displays its local variable information. The method is used to obtain a object for the test method. The property is then used to obtain a list of objects and to display their types and index order. + The following example defines a test method named `MethodBodyExample`, and displays its local variable information. The method is used to obtain a object for the test method. The property is then used to obtain a list of objects and to display their types and index order. This code example is part of a larger example provided for the class. diff --git a/xml/System.Reflection/MemberFilter.xml b/xml/System.Reflection/MemberFilter.xml index aef31a9b41f..31776558ed4 100644 --- a/xml/System.Reflection/MemberFilter.xml +++ b/xml/System.Reflection/MemberFilter.xml @@ -89,13 +89,13 @@ to include the member in the filtered list; otherwise . - and has a constructor and an `Invoke` method. (See the code example in `Delegate`.) - - The method uses this delegate to filter the list of members that it returns. - + and has a constructor and an `Invoke` method. (See the code example in `Delegate`.) + + The method uses this delegate to filter the list of members that it returns. + ]]> diff --git a/xml/System.Reflection/MemberInfo.xml b/xml/System.Reflection/MemberInfo.xml index ddf22b8f669..8c44710816e 100644 --- a/xml/System.Reflection/MemberInfo.xml +++ b/xml/System.Reflection/MemberInfo.xml @@ -283,7 +283,7 @@ - If the `Type` object from which this `MemberInfo` object was obtained did not declare this member, the property will represent one of its base types. -- If the `MemberInfo` object is a global member (that is, if it was obtained from the method, which returns global methods on a module), the returned will be `null`. +- If the `MemberInfo` object is a global member (that is, if it was obtained from the method, which returns global methods on a module), the returned will be `null`. @@ -422,7 +422,7 @@ method. + This method ignores the `inherit` parameter for properties and events. To search the inheritance chain for attributes on properties and events, use the appropriate overloads of the method. > [!NOTE] > In the .NET Framework version 2.0, this method returns security attributes on methods, constructors, and types if they are stored in the new metadata format. Assemblies compiled with version 2.0 use this format. Dynamic assemblies and assemblies compiled with earlier versions of the .NET Framework use the old XML format. See [Emitting Declarative Security Attributes](https://msdn.microsoft.com/library/9eeddee8-ca89-4440-b84b-fd613f590cd5). @@ -500,7 +500,7 @@ method. + This method ignores the `inherit` parameter for properties and events. To search the inheritance chain for attributes on properties and events, use the appropriate overloads of the method. > [!NOTE] > In the .NET Framework version 2.0, this method returns security attributes on methods, constructors, and types if the attributes are stored in the new metadata format. Assemblies compiled with version 2.0 use this format. Dynamic assemblies and assemblies compiled with earlier versions of the .NET Framework use the old XML format. See [Emitting Declarative Security Attributes](https://msdn.microsoft.com/library/9eeddee8-ca89-4440-b84b-fd613f590cd5). @@ -565,7 +565,7 @@ and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods like and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. This method gets custom attribute data for types, nested types, and type members, because the class and the classes in the namespace that represent type members all derive from . @@ -804,7 +804,7 @@ For more information, see [How to use and debug assembly unloadability in .NET C method. + This method ignores the `inherit` parameter for properties and events. To search the inheritance chain for attributes on properties and events, use the appropriate overloads of the method. > [!NOTE] > In the .NET Framework version 2.0, this method returns `true` if a type, method, or constructor has security attributes stored in the new metadata format. Assemblies compiled with version 2.0 use this format. Dynamic assemblies and assemblies compiled with earlier versions of the .NET Framework use the old XML format. See [Emitting Declarative Security Attributes](https://msdn.microsoft.com/library/9eeddee8-ca89-4440-b84b-fd613f590cd5). @@ -871,7 +871,7 @@ For more information, see [How to use and debug assembly unloadability in .NET C objects - for example, the array returned by - the property can be used to determine the member type of any given member. + This property is overridden in derived classes, and the override returns the appropriate member type. Therefore, when you examine a set of objects - for example, the array returned by - the property can be used to determine the member type of any given member. To get the `MemberType` property, get the class . From the `Type`, get the array. From the `MethodInfo` array, get the `MemberTypes`. @@ -997,7 +997,7 @@ For more information, see [How to use and debug assembly unloadability in .NET C ## Examples - The following code example declares a class that inherits and overrides . The example obtains objects for the class's `ToString` method and for the inherited method, and displays the names of the modules in which the two methods are declared. + The following code example declares a class that inherits and overrides . The example obtains objects for the class's `ToString` method and for the inherited method, and displays the names of the modules in which the two methods are declared. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MemberInfo/Module/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MemberInfo/Module/source.vb" id="Snippet1"::: @@ -1242,12 +1242,12 @@ For more information, see [How to use and debug assembly unloadability in .NET C ## Remarks The `ReflectedType` property retrieves the object that was used to obtain this instance of `MemberInfo`. This may differ from the value of the property if this object represents a member that is inherited from a base class. - If the `MemberInfo` object is a global member (that is, if it was obtained from the method, which returns global methods on a module), the returned will be `null`. + If the `MemberInfo` object is a global member (that is, if it was obtained from the method, which returns global methods on a module), the returned will be `null`. ## Examples - The following code example shows how the changes when the member is viewed from a obtained from type and from a obtained from the class itself, which inherits but does not override . + The following code example shows how the changes when the member is viewed from a obtained from type and from a obtained from the class itself, which inherits but does not override . :::code language="csharp" source="~/snippets/csharp/System.Reflection/MemberInfo/ReflectedType/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MemberInfo/ReflectedType/source.vb" id="Snippet1"::: diff --git a/xml/System.Reflection/MemberInfoExtensions.xml b/xml/System.Reflection/MemberInfoExtensions.xml index 6bf2b6e32e8..c18633b0e00 100644 --- a/xml/System.Reflection/MemberInfoExtensions.xml +++ b/xml/System.Reflection/MemberInfoExtensions.xml @@ -74,12 +74,12 @@ Gets a metadata token for the given member, if available. An integer representing the metadata token. The returned token is never nil. If unavailable, an exception is thrown. - to determine whether a metadata token is available before calling this method. -This method throws an exception if a metadata token is not available for the specified member. You can call to determine whether a metadata token is available before calling this method. - ]]> There is no metadata token available. @@ -123,12 +123,12 @@ This method throws an exception if a metadata token is not available for the spe if there is a metadata token available for the given member; otherwise, . - throws an exception if a metadata token is not available for the specified member. So use this method to determine whether a metadata token is available before calling . - throws an exception if a metadata token is not available for the specified member. So use this method to determine whether a metadata token is available before calling . - ]]> diff --git a/xml/System.Reflection/MemberTypes.xml b/xml/System.Reflection/MemberTypes.xml index 1c7027ab0aa..a0f045730be 100644 --- a/xml/System.Reflection/MemberTypes.xml +++ b/xml/System.Reflection/MemberTypes.xml @@ -79,9 +79,9 @@ ## Remarks These enumeration values are returned by the following properties: -- . +- . -- . +- . - . @@ -103,7 +103,7 @@ 1. Get a object that represents that type. -2. Retrieve the array that represents the members of that type by calling the method. +2. Retrieve the array that represents the members of that type by calling the method. 3. Retrieve the value of the From the property for each member in the array. A `switch` statement in C# or `Select Case` statement in Visual Basic is typically used to process member types. diff --git a/xml/System.Reflection/MetadataAssemblyResolver.xml b/xml/System.Reflection/MetadataAssemblyResolver.xml index 1b056de53ff..13d46e3bbf4 100644 --- a/xml/System.Reflection/MetadataAssemblyResolver.xml +++ b/xml/System.Reflection/MetadataAssemblyResolver.xml @@ -83,7 +83,7 @@ ## Remarks -Binding an assembly name to an assembly occurs when is called or when a type from one assembly has a dependency on another assembly. The handler that overrides `Resolve` should use , or to load the requested assembly and return it. +Binding an assembly name to an assembly occurs when is called or when a type from one assembly has a dependency on another assembly. The handler that overrides `Resolve` should use , or to load the requested assembly and return it. To indicate the failure to find an assembly, the handler should return `null` rather than throwing an exception. Returning `null` commits the failure so that future attempts to load that name will fail without re-invoking the handler. diff --git a/xml/System.Reflection/MetadataLoadContext.xml b/xml/System.Reflection/MetadataLoadContext.xml index a3e339adfdd..69510ae2afb 100644 --- a/xml/System.Reflection/MetadataLoadContext.xml +++ b/xml/System.Reflection/MetadataLoadContext.xml @@ -116,7 +116,7 @@ The core assembly is treated differently than other assemblies because reference Typically, this assembly is named "mscorlib" or "netstandard". If the core assembly cannot be found, the value will be `null`, and many other reflection methods, including those that parse method signatures, will throw an exception. The `CoreAssembly` is determined by passing the `coreAssemblyName` parameter passed to the constructor -to the method. +to the method. If no `coreAssemblyName` argument was specified in the constructor of , then default values are used, including "mscorlib", "System.Runtime" and "netstandard". @@ -126,16 +126,16 @@ Note that is not an ideal core assembly because it exclude The core assembly is not loaded until necessary. The following APIs do not trigger the search for the core assembly: -* -* -* -* +* +* +* +* * -* -* +* +* * -* -* +* +* * * * @@ -146,11 +146,11 @@ If a core assembly cannot be found or if the core assembly is missing types, thi * APIs that need to parse signatures or typespecs and return the results as objects will throw an exception. For example: * - * + * * - * + * -* APIs that need to compare types to well-known core types will not throw an exception, and the comparison will evaluate to `false`. For example, if you do not specify a core assembly, will return `false` for everything, even types named . Similarly, will return for everything. +* APIs that need to compare types to well-known core types will not throw an exception, and the comparison will evaluate to `false`. For example, if you do not specify a core assembly, will return `false` for everything, even types named . Similarly, will return for everything. * If a metadata entity sets flags that surface as a pseudo-custom attribute, and the core assembly does not contain the pseudo-custom attribute type, the necessary constructor or any of the parameter types of the constructor, the will not throw. It will omit the pseudo-custom attribute from the list of returned attributes. ]]> @@ -185,7 +185,7 @@ After disposal, it is not safe to use any obje Though objects provided by the strive to throw an , this is not guaranteed. -Some APIs may return fixed or previously cached data. Accessing objects *during* a method call may result in an unmanaged access violation and failfast. +Some APIs may return fixed or previously cached data. Accessing objects *during* a method call may result in an unmanaged access violation and failfast. ]]> @@ -238,7 +238,7 @@ Some APIs may return fixed or previously cached data. Accessing objects *during* resolve event, but does not match the behavior of . (The latter gives up without raising its resolve event.) +Note that the behavior of this method matches the behavior of the resolve event, but does not match the behavior of . (The latter gives up without raising its resolve event.) ]]> The resolver returns . @@ -270,7 +270,7 @@ Note that the behavior of this method matches the behavior of the resolve event but does not match the behavior of . (The latter gives up without raising its resolve event.) +Note that the behavior of this method matches the behavior of the resolve event but does not match the behavior of . (The latter gives up without raising its resolve event.) ]]> diff --git a/xml/System.Reflection/MethodBase.xml b/xml/System.Reflection/MethodBase.xml index 4e5f338ae69..8c190fb1cd6 100644 --- a/xml/System.Reflection/MethodBase.xml +++ b/xml/System.Reflection/MethodBase.xml @@ -470,14 +470,14 @@ that is returned by is obtained from the generic type definition (that is, returns `true`). Therefore, it does not reflect the type arguments that were used when the method was called. For example, if a method `M()` is defined on a generic type `C` (`C(Of T)` in Visual Basic), and is called from `C.M()`, then returns `C.M()` (`C(Of T).M()` in Visual Basic). + If the currently executing method is defined on a generic type, the that is returned by is obtained from the generic type definition (that is, returns `true`). Therefore, it does not reflect the type arguments that were used when the method was called. For example, if a method `M()` is defined on a generic type `C` (`C(Of T)` in Visual Basic), and is called from `C.M()`, then returns `C.M()` (`C(Of T).M()` in Visual Basic). - If the currently executing method is a generic method, returns the generic method definition. If the generic method is defined on a generic type, the is obtained from the generic type definition. + If the currently executing method is a generic method, returns the generic method definition. If the generic method is defined on a generic type, the is obtained from the generic type definition. ## Examples - The following example defines two types. The first is a non-generic class, `TestClass`, includes a constructor, a method named `GetValue`, and a read-write property named `GetValue`. The second is a generic class named `TestClass` that includes a constructor, a `GetValue` method, and a generic method, `ConvertValue`. Each constructor, method, and property accessor includes a call to the method. + The following example defines two types. The first is a non-generic class, `TestClass`, includes a constructor, a method named `GetValue`, and a read-write property named `GetValue`. The second is a generic class named `TestClass` that includes a constructor, a `GetValue` method, and a generic method, `ConvertValue`. Each constructor, method, and property accessor includes a call to the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/GetCurrentMethod/GetCurentMethod1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/GetCurrentMethod/GetCurentMethod1.vb" id="Snippet1"::: @@ -544,7 +544,7 @@ ## Remarks The elements of the returned array are in the order in which they appear in the list of type parameters for the generic method. -- If the current method is a closed constructed method (that is, the property returns `false`), the array returned by the method contains the types that have been assigned to the generic type parameters of the generic method definition. +- If the current method is a closed constructed method (that is, the property returns `false`), the array returned by the method contains the types that have been assigned to the generic type parameters of the generic method definition. - If the current method is a generic method definition, the array contains the type parameters. @@ -670,12 +670,12 @@ in order to use it. You can call the method on and objects, because the method is overridden in the runtime versions of these classes. For example, the runtime version of the class derives from the class, which in turn derives from the class. + You do not have to override the in order to use it. You can call the method on and objects, because the method is overridden in the runtime versions of these classes. For example, the runtime version of the class derives from the class, which in turn derives from the class. ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their types and index order. The property is used to obtain a list of exception-handling clauses. @@ -895,7 +895,7 @@ method to display the method implementation flags that are set by default. + The following example defines a constructor in a dynamic assembly and then uses the method to display the method implementation flags that are set by default. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/GetMethodImplementationFlags/constructorbuilder_getmodule_4.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/GetMethodImplementationFlags/constructorbuilder_getmodule_4.vb" id="Snippet3"::: @@ -958,7 +958,7 @@ method to retrieve the parameters of the `Invoke` method of a delegate. + The following example uses the method to retrieve the parameters of the `Invoke` method of a delegate. The example defines a delegate named `MyDelegate` and an event named `ev` of type `MyDelegate`. The code in the `Main` method discovers the event signature by getting the delegate type of the event, getting the `Invoke` method of the delegate type, and then retrieving and displaying the parameters. @@ -1087,9 +1087,9 @@ method overload, passing for `invokeAttr` and `null` for `binder` and `culture`. + This is a convenience method that calls the method overload, passing for `invokeAttr` and `null` for `binder` and `culture`. - If the invoked method throws an exception, the method returns the originating exception. + If the invoked method throws an exception, the method returns the originating exception. To invoke a static method using its object, pass `null` for `obj`. @@ -1223,7 +1223,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked via reflection whenever the code is fully trusted. - If the invoked method throws an exception, the method returns the originating exception. + If the invoked method throws an exception, the method returns the originating exception. > [!NOTE] > This method can be used to access non-public members if the caller has been granted with the flag and if the grant set of the non-public members is restricted to the caller's grant set, or a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later. @@ -1231,7 +1231,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, ## Examples - The following example demonstrates all members of the class using an overload of . The private method `CanConvertFrom` finds compatible types for a given type. For another example of invoking members in a custom binding scenario, see [Dynamically Loading and Using Types](/dotnet/framework/reflection-and-codedom/dynamically-loading-and-using-types). + The following example demonstrates all members of the class using an overload of . The private method `CanConvertFrom` finds compatible types for a given type. For another example of invoking members in a custom binding scenario, see [Dynamically Loading and Using Types](/dotnet/framework/reflection-and-codedom/dynamically-loading-and-using-types). :::code language="csharp" source="~/snippets/csharp/System.Reflection/Binder/Overview/binder.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Binder/Overview/binder.vb" id="Snippet1"::: @@ -1385,7 +1385,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, The visibility of a method or constructor is exactly described by if the only visibility modifier is `internal` (`Friend` in Visual Basic). This property is `false` for methods that are `protected internal` in C# (`Protected Friend` in Visual Basic); use the property to identify such methods. ## Examples - The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsAssembly/source.vb" id="Snippet1"::: @@ -1561,7 +1561,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, The visibility of a method or constructor is exactly described by if the only visibility modifier is `protected`. This property is `false` for methods that are `protected internal` in C# (`Protected Friend` in Visual Basic); use the property to identify such methods. ## Examples - The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsAssembly/source.vb" id="Snippet1"::: @@ -1630,7 +1630,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, The visibility of a method or constructor is exactly described by if the visibility modifier is `private protected` in C# or `Private Protected` in Visual Basic. ## Examples - The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsAssembly/source.vb" id="Snippet1"::: @@ -1703,7 +1703,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, The visibility of a method or constructor is exactly described by if the visibility modifier is `protected internal` in C# (`Protected Friend` in Visual Basic). ## Examples - The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsAssembly/source.vb" id="Snippet1"::: @@ -1853,7 +1853,7 @@ The following table summarizes the invariant conditions for terms specific to ge |Term|Invariant condition| |---|---| -|generic method definition| The property is `true`.
Defines a generic method. A constructed method is created by calling the method on a object that represents a generic method definition, and specifying an array of type arguments.
The method can be called only on generic method definitions.
Any generic method definition is a generic method, but the converse is not true.| +|generic method definition| The property is `true`.
Defines a generic method. A constructed method is created by calling the method on a object that represents a generic method definition, and specifying an array of type arguments.
The method can be called only on generic method definitions.
Any generic method definition is a generic method, but the converse is not true.| |generic method|The `IsGenericMethod` property is `true`.
Can be a generic method definition, an open constructed method, or a closed constructed method.| |open constructed method|The property is `true`.
It is not possible to invoke an open constructed method.| |closed constructed method|The property is `false`.
When examined recursively, the method has no unassigned generic parameters. The containing type has no generic type parameters, and none of the type arguments have generic type parameters.
The method can be invoked.| @@ -1919,7 +1919,7 @@ The following table summarizes the invariant conditions for terms specific to ge - The property is `true`. -- For each object in the array returned by the method: +- For each object in the array returned by the method: - The property is `true`. @@ -1990,7 +1990,7 @@ The following table summarizes the invariant conditions for terms specific to ge returns `false` on a member declared with the Visual Basic `Shadows` modifier, and `true` on a member declared with the C# `new` modifier. + When a member in a derived class is declared with the C# `new` modifier or the Visual Basic `Shadows` modifier, it can hide a member of the same name in the base class. C# hides base class members by signature. That is, if the base class member has multiple overloads, the only one that is hidden is the one that has the identical signature. By contrast, Visual Basic hides all the base class overloads. Thus, returns `false` on a member declared with the Visual Basic `Shadows` modifier, and `true` on a member declared with the C# `new` modifier. > [!WARNING] > This property does not determine whether a method has the attribute. A method that is declared with either the `new` or the `Shadows` modifier will have the attribute, but only methods declared with `new` (that is, only C# methods) will have the property set to `true`. To determine whether a method has the attribute, use code similar to the following: `if ((myMethodInfo.Attributes & MethodAttributes.VtableLayoutMask) == MethodAttributes.NewSlot)` in C# or `If (myMethodInfo.Attributes And MethodAttributes.VtableLayoutMask) = MethodAttributes.NewSlot` in Visual Basic. Note, however, that although all methods declared with `new` or `Shadows` have the attribute, not all methods that have the attribute are declared with `new` or `Shadows`. @@ -2181,7 +2181,7 @@ The following table summarizes the invariant conditions for terms specific to ge , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2192,7 +2192,7 @@ The following table summarizes the invariant conditions for terms specific to ge Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -2249,7 +2249,7 @@ The following table summarizes the invariant conditions for terms specific to ge , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2260,7 +2260,7 @@ The following table summarizes the invariant conditions for terms specific to ge Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -2317,12 +2317,12 @@ The following table summarizes the invariant conditions for terms specific to ge and properties return `false`. + If this property returns `true`, the and properties return `false`. - The , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. + The , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -2392,7 +2392,7 @@ The following table summarizes the invariant conditions for terms specific to ge ## Examples - This example shows a use of to filter internal or private members out of a list. + This example shows a use of to filter internal or private members out of a list. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsSpecialName/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsSpecialName/source.vb" id="Snippet1"::: @@ -2519,7 +2519,7 @@ The following table summarizes the invariant conditions for terms specific to ge ## Remarks A virtual member may reference instance data in a class and must be referenced through an instance of the class. - To determine if a method is overridable, it is not sufficient to check that `IsVirtual` is `true`. For a method to be overridable, `IsVirtual` must be `true` and must be `false`. For example, a method might be non-virtual, but it implements an interface method. The common language runtime requires that all methods that implement interface members must be marked as `virtual`; therefore, the compiler marks the method `virtual final`. So there are cases where a method is marked as `virtual` but is still not overridable. + To determine if a method is overridable, it is not sufficient to check that `IsVirtual` is `true`. For a method to be overridable, `IsVirtual` must be `true` and must be `false`. For example, a method might be non-virtual, but it implements an interface method. The common language runtime requires that all methods that implement interface members must be marked as `virtual`; therefore, the compiler marks the method `virtual final`. So there are cases where a method is marked as `virtual` but is still not overridable. To establish with certainty whether a method is overridable, use code such as this: @@ -2533,7 +2533,7 @@ If MethodInfo.IsVirtual AndAlso Not MethodInfo.IsFinal Then If `IsVirtual` is `false` or `IsFinal` is `true`, then the method cannot be overridden. - You can determine whether the current method overrides a method in a base class by calling the method. The following example implements an `IsOverride` method that does this. + You can determine whether the current method overrides a method in a base class by calling the method. The following example implements an `IsOverride` method that does this. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsVirtual/IsOverride1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsVirtual/IsOverride1.vb" id="Snippet2"::: @@ -2655,7 +2655,7 @@ If MethodInfo.IsVirtual AndAlso Not MethodInfo.IsFinal Then method for more information. + See the method for more information. ]]> diff --git a/xml/System.Reflection/MethodBody.xml b/xml/System.Reflection/MethodBody.xml index 090aca7d5d1..9cf6a542a64 100644 --- a/xml/System.Reflection/MethodBody.xml +++ b/xml/System.Reflection/MethodBody.xml @@ -64,17 +64,17 @@ ## Remarks The class provides access to information about the local variables and exception-handling clauses in a method body, and to the Microsoft intermediate language (MSIL) that makes up the method body. - You can use the token-resolution methods of the module class, such as , , and , to resolve the tokens in the method body to objects, objects, and objects that provide detailed information about the types, methods, and fields accessed by the MSIL in the method body. + You can use the token-resolution methods of the module class, such as , , and , to resolve the tokens in the method body to objects, objects, and objects that provide detailed information about the types, methods, and fields accessed by the MSIL in the method body. > [!NOTE] > Parsing method bodies requires a thorough understanding of metadata and MSIL instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". - To obtain a object for a given method, first obtain a object for the method, then call the object's method. + To obtain a object for a given method, first obtain a object for the method, then call the object's method. ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The example uses the property to obtain a list of objects and then displays their types and index order. The property is used to obtain a list of exception-handling clauses. @@ -180,7 +180,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and MSIL instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample` and displays information about its exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects. + The following code example defines a test method named `MethodBodyExample` and displays information about its exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects. This code example is part of a larger example provided for the class. @@ -249,7 +249,7 @@ , , and , to resolve the tokens in the method body to objects, objects, and objects that provide detailed information about the types, methods, and fields accessed by the MSIL in the method body. + You can use the token-resolution methods of the module class, such as , , and , to resolve the tokens in the method body to objects, objects, and objects that provide detailed information about the types, methods, and fields accessed by the MSIL in the method body. > [!NOTE] > Parsing method bodies requires a thorough understanding of metadata and MSIL instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". @@ -313,7 +313,7 @@ ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The and properties are displayed. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The and properties are displayed. This code example is part of a larger example provided for the class. @@ -430,7 +430,7 @@ ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information. The method is used to obtain a object for the test method. The property is used to obtain a list of objects. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information. The method is used to obtain a object for the test method. The property is used to obtain a list of objects. This code example is part of a larger example provided for the class. @@ -496,7 +496,7 @@ For more information, see the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics" and "Partition III: CIL Instruction Set". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The and properties are displayed. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The and properties are displayed. This code example is part of a larger example provided for the class. diff --git a/xml/System.Reflection/MethodInfo.xml b/xml/System.Reflection/MethodInfo.xml index 652d497bbc9..9481db14f90 100644 --- a/xml/System.Reflection/MethodInfo.xml +++ b/xml/System.Reflection/MethodInfo.xml @@ -99,19 +99,19 @@ ## Remarks The class represents a method of a type. You can use a object to obtain information about the method that the object represents and to invoke the method. For example: -- You can determine the method's visibility by retrieving the values of the , , , and properties. +- You can determine the method's visibility by retrieving the values of the , , , and properties. -- You can discover what attributes are applied to the method by retrieving the value of the property or calling the method. +- You can discover what attributes are applied to the method by retrieving the value of the property or calling the method. -- You can determine whether the method is a generic method, an open constructed generic method, or a closed constructed generic method, by retrieving the values of the and properties. +- You can determine whether the method is a generic method, an open constructed generic method, or a closed constructed generic method, by retrieving the values of the and properties. -- You can get information about the method's parameters and return type from the method and the , , and properties. +- You can get information about the method's parameters and return type from the method and the , , and properties. -- You can execute a method on a class instance by calling the method. +- You can execute a method on a class instance by calling the method. -- You can instantiate a object that represents a constructed generic method from one that represents a generic method definition by calling the method. +- You can instantiate a object that represents a constructed generic method from one that represents a generic method definition by calling the method. - You can instantiate a instances by calling the or method, or by calling the method of a object that represents a generic method definition. + You can instantiate a instances by calling the or method, or by calling the method of a object that represents a generic method definition. For a list of the invariant conditions for terms specific to generic methods, see the property. For a list of the invariant conditions for other terms used in generic reflection, see the property. @@ -554,37 +554,37 @@ For a list of the invariant conditions for other terms used in generic reflectio method returns the first definition of the specified method in the class hierarchy. You can determine the type on which the first definition of the method is found by retrieving the value of the property on the returned object. + The method returns the first definition of the specified method in the class hierarchy. You can determine the type on which the first definition of the method is found by retrieving the value of the property on the returned object. - The method behaves as follows: + The method behaves as follows: -- If the current object represents an interface implementation, the method returns the current object. +- If the current object represents an interface implementation, the method returns the current object. -- If the current object represents a method that overrides a virtual definition in a base class, the method returns a object that represents the virtual definition. +- If the current object represents a method that overrides a virtual definition in a base class, the method returns a object that represents the virtual definition. -- If the current object represents a method that is specified with the `new` keyword in C# or the `Shadows` keyword in Visual Basic (as in `newslot`, as described in [Common Type System](/dotnet/standard/base-types/common-type-system)), the method returns the current object. +- If the current object represents a method that is specified with the `new` keyword in C# or the `Shadows` keyword in Visual Basic (as in `newslot`, as described in [Common Type System](/dotnet/standard/base-types/common-type-system)), the method returns the current object. -- If the current object represents an inherited method (that is, the current method does not provide its own implementation), the method returns a object that represents the lowest method in the class hierarchy. For example, if `Base.ToString` overrides `Object.ToString`, and `Derived.ToString` overrides `Base.ToString`, calling the method on a object that represents `Derived.ToString` returns a object that represents `Object.ToString`. +- If the current object represents an inherited method (that is, the current method does not provide its own implementation), the method returns a object that represents the lowest method in the class hierarchy. For example, if `Base.ToString` overrides `Object.ToString`, and `Derived.ToString` overrides `Base.ToString`, calling the method on a object that represents `Derived.ToString` returns a object that represents `Object.ToString`. -- If the current object represents a method that is not present in any base class, the method returns the current object. +- If the current object represents a method that is not present in any base class, the method returns the current object. - You can determine whether the current method overrides a method in a base class by calling the method. The following example implements an `IsOverride` method that does this. + You can determine whether the current method overrides a method in a base class by calling the method. The following example implements an `IsOverride` method that does this. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsVirtual/IsOverride1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsVirtual/IsOverride1.vb" id="Snippet2"::: To call the `GetBaseDefinition` method: -1. Get a object that represents the type (the class or structure) that contains the property. If you are working with an object (an instance of a type), you can call its method. Otherwise, you can use the C# operator or the Visual Basic [GetType](/dotnet/visual-basic/language-reference/operators/gettype-operator) operator, as the example illustrates. +1. Get a object that represents the type (the class or structure) that contains the property. If you are working with an object (an instance of a type), you can call its method. Otherwise, you can use the C# operator or the Visual Basic [GetType](/dotnet/visual-basic/language-reference/operators/gettype-operator) operator, as the example illustrates. -2. Get a object that represents the method in which you're interested. You can do this by getting an array of all methods from the method and then iterating the elements in the array, or you can retrieve the object that represents the method directly by calling the method and specifying the method name. +2. Get a object that represents the method in which you're interested. You can do this by getting an array of all methods from the method and then iterating the elements in the array, or you can retrieve the object that represents the method directly by calling the method and specifying the method name. -3. Call the method to get the value of the object that represents the base method definition. +3. Call the method to get the value of the object that represents the base method definition. ## Examples - The following example demonstrates the behavior of the method. + The following example demonstrates the behavior of the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsVirtual/getbasedefinition1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsVirtual/getbasedefinition1.vb" id="Snippet1"::: @@ -651,7 +651,7 @@ For a list of the invariant conditions for other terms used in generic reflectio ## Remarks The elements of the returned array are in the order in which they appear in the list of type parameters for the generic method. -- If the current method is a closed constructed method (that is, the property returns `false`), the array returned by the method contains the types that have been assigned to the generic type parameters of the generic method definition. +- If the current method is a closed constructed method (that is, the property returns `false`), the array returned by the method contains the types that have been assigned to the generic type parameters of the generic method definition. - If the current method is a generic method definition, the array contains the type parameters. @@ -662,7 +662,7 @@ For a list of the invariant conditions for other terms used in generic reflectio ## Examples The following code example shows how to get the type arguments of a generic method and display them. - This example is part of a larger example provided for the method. + This example is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System/Type/DeclaringMethod/source.cs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/DeclaringMethod/source.vb" id="Snippet8"::: @@ -733,11 +733,11 @@ For a list of the invariant conditions for other terms used in generic reflectio (T t)` (expressed in C# syntax; `Function M(Of T)(ByVal tVal As T) As T` in Visual Basic) you can construct and invoke the method `int M(int t)` (`Function M(Of Integer)(ByVal tVal As Integer) As Integer` in Visual Basic). Given a object representing this constructed method, the method returns the generic method definition. + A generic method definition is a template from which methods can be constructed. For example, from the generic method definition `T M(T t)` (expressed in C# syntax; `Function M(Of T)(ByVal tVal As T) As T` in Visual Basic) you can construct and invoke the method `int M(int t)` (`Function M(Of Integer)(ByVal tVal As Integer) As Integer` in Visual Basic). Given a object representing this constructed method, the method returns the generic method definition. - If two constructed methods are created from the same generic method definition, the method returns the same object for both methods. + If two constructed methods are created from the same generic method definition, the method returns the same object for both methods. - If you call on a that already represents a generic method definition, it returns the current . + If you call on a that already represents a generic method definition, it returns the current . If a generic method definition includes generic parameters of the declaring type, there will be a generic method definition specific to each constructed type. For example, consider the following code: @@ -756,7 +756,7 @@ Class C(Of T) End Class ``` - In the constructed type `C` (`C(Of Integer)` in Visual Basic), the generic method `M` returns `B`. In the open type `C`, `M` returns `B`. In both cases, the property returns `true` for the that represents `M`, so can be called on both objects. In the case of the constructed type, the result of calling is a that can be invoked. In the case of the open type, the returned by cannot be invoked. + In the constructed type `C` (`C(Of Integer)` in Visual Basic), the generic method `M` returns `B`. In the open type `C`, `M` returns `B`. In both cases, the property returns `true` for the that represents `M`, so can be called on both objects. In the case of the constructed type, the result of calling is a that can be invoked. In the case of the open type, the returned by cannot be invoked. For a list of the invariant conditions for terms specific to generic methods, see the property. For a list of the invariant conditions for other terms used in generic reflection, see the property. @@ -765,7 +765,7 @@ End Class ## Examples The following code example shows a class with a generic method and the code required to obtain a for the method, bind the method to type arguments, and get the original generic type definition back from the bound method. - This example is part of a larger example provided for the method. + This example is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System/Type/DeclaringMethod/source.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/DeclaringMethod/source.vb" id="Snippet2"::: @@ -1027,7 +1027,7 @@ Use the `IsGenericMethodDefinition` property to determine whether type arguments The method body of M contains a call to method N, specifying the type parameter of M and the type . The `IsGenericMethodDefinition` property returns false for method `N`. > [!NOTE] -> Although the open constructed method `N` is not encountered when reflecting over class C, it must be generated using in order to emit C as a dynamic class. +> Although the open constructed method `N` is not encountered when reflecting over class C, it must be generated using in order to emit C as a dynamic class. If a generic method definition includes generic parameters of the declaring type, there will be a generic method definition specific to each constructed type. For example, consider the following code: @@ -1063,7 +1063,7 @@ For a list of the invariant conditions for terms specific to generic methods, se The following code example uses the `IsGenericMethodDefinition` property to display a message indicating whether a represents a generic method definition. -This example is part of a larger example provided for the method. +This example is part of a larger example provided for the method. ```vb Console.WriteLine(vbTab _ @@ -1157,9 +1157,9 @@ Console::WriteLine("\tIs this a generic method definition? {0}", method allows you to write code that assigns specific types to the type parameters of a generic method definition, thus creating a object that represents a particular constructed method. If the property of this object returns `true`, you can use it to invoke the method or to create a delegate to invoke the method. + The method allows you to write code that assigns specific types to the type parameters of a generic method definition, thus creating a object that represents a particular constructed method. If the property of this object returns `true`, you can use it to invoke the method or to create a delegate to invoke the method. - Methods constructed with the method can be open, that is, some of their type arguments can be type parameters of enclosing generic types. You might use such open constructed methods when you generate dynamic assemblies. For example, consider the following code. + Methods constructed with the method can be open, that is, some of their type arguments can be type parameters of enclosing generic types. You might use such open constructed methods when you generate dynamic assemblies. For example, consider the following code. ```csharp class C @@ -1273,7 +1273,7 @@ End Class . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a method. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a method. To get the `MemberType` property, first get the class `Type`. From the `Type`, get the `MethodInfo`. From the `MethodInfo`, get the `MemberType`. diff --git a/xml/System.Reflection/Module.xml b/xml/System.Reflection/Module.xml index 0e763ff51a9..abef453ab50 100644 --- a/xml/System.Reflection/Module.xml +++ b/xml/System.Reflection/Module.xml @@ -606,7 +606,7 @@ . + To get the name without the path, use . If the assembly for this module was loaded from a byte array then the `FullyQualifiedName` for the module will be: \. @@ -811,7 +811,7 @@ and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods such as and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and example code, see the class. ]]> @@ -1024,7 +1024,7 @@ method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. ]]> @@ -1091,7 +1091,7 @@ method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. ]]> @@ -1824,7 +1824,7 @@ > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). - A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . + A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . @@ -1936,7 +1936,7 @@ > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). - A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . + A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . @@ -2047,7 +2047,7 @@ > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). - A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . + A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . @@ -2558,7 +2558,7 @@ If the assembly for this module was loaded from a byte array then the `FullyQualifiedName` for the module will be: \. - To get the name and the path, use . + To get the name and the path, use . @@ -2740,12 +2740,12 @@ method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a field that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. + To resolve a metadata token that identifies a field whose parent `TypeSpec` has a signature containing element type `ELEMENT_TYPE_VAR` or `ELEMENT_TYPE_MVAR`, use the method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a field that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -2838,12 +2838,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -2923,12 +2923,12 @@ method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a member that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. + To resolve a metadata token for a `MethodSpec` or `TypeSpec` whose signature contains element type `ELEMENT_TYPE_VAR` or `ELEMENT_TYPE_MVAR`, use the method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a member that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -3025,12 +3025,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -3114,7 +3114,7 @@ method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a method that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. + To resolve a metadata token for a `MethodSpec` whose signature contains element type `ELEMENT_TYPE_VAR` or `ELEMENT_TYPE_MVAR`, use the method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a method that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -3122,7 +3122,7 @@ ## Examples - The following example shows how to use the two overloads of the method to resolve metadata tokens from call sites in generic and non-generic contexts. + The following example shows how to use the two overloads of the method to resolve metadata tokens from call sites in generic and non-generic contexts. The code example defines two generic types, `G1` and `G2` (`G1(Of Tg1)` and `G2(Of Tg2)` in Visual Basic), each of which has a generic method. `G1` also has a non-generic method that uses the type parameter `Tg1` for its parameter. The generic method `GM2` in type `G2` contains several method calls: @@ -3138,9 +3138,9 @@ - Case 5: The generic method `GM1` is called, specifying and for the type arguments of the generic type and the generic method, respectively. The context for this method has no enclosing generic type or generic method. - For each case, the example first constructs a that represents the called method, and then resolves the token using the method overload, using the and methods to get the values for the `genericTypeArguments` and `genericMethodArguments` parameters. This technique works in all cases, because the methods return for non-generic contexts. The example compares the resolved with the constructed . + For each case, the example first constructs a that represents the called method, and then resolves the token using the method overload, using the and methods to get the values for the `genericTypeArguments` and `genericMethodArguments` parameters. This technique works in all cases, because the methods return for non-generic contexts. The example compares the resolved with the constructed . - The example then attempts to use the method overload to resolve the token. This works in cases 3, 4, and 5, because the method calls do not depend on the generic context. In cases 1 and 2, an exception is thrown because there is insufficient information to resolve the token. + The example then attempts to use the method overload to resolve the token. This works in cases 3, 4, and 5, because the method calls do not depend on the generic context. In cases 1 and 2, an exception is thrown because there is insufficient information to resolve the token. The metadata token values are hard-coded as an enumeration. If you change this code example, the token values are likely to change. To determine the new token values, compile the code and use Ildasm.exe with the **/TOKENS** option to examine the assembly. The tokens can be found at the points of call. Insert the new values into the enumeration, and recompile the example. @@ -3238,7 +3238,7 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericMethodArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericMethodArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -3246,7 +3246,7 @@ ## Examples - The following example shows how to use the two overloads of the method to resolve metadata tokens from call sites in generic and non-generic contexts. + The following example shows how to use the two overloads of the method to resolve metadata tokens from call sites in generic and non-generic contexts. The code example defines two generic types, `G1` and `G2`, each of which has a generic method. `G1` also has a non-generic method that uses the type parameter `Tg1` for its parameter. The generic method `GM2` in type `G2` contains several method calls: @@ -3262,9 +3262,9 @@ - Case 5: The generic method `GM1` is called, specifying and for the type arguments of the generic type and the generic method, respectively. The context for this method has no enclosing generic type or generic method. - For each case, the example first constructs a that represents the called method, and then resolves the token using the method overload, using the and methods to get the values for the `genericTypeArguments` and `genericMethodArguments` parameters. This technique works in all cases, because the methods return for non-generic contexts. The example compares the resolved with the constructed . + For each case, the example first constructs a that represents the called method, and then resolves the token using the method overload, using the and methods to get the values for the `genericTypeArguments` and `genericMethodArguments` parameters. This technique works in all cases, because the methods return for non-generic contexts. The example compares the resolved with the constructed . - The example then attempts to use the method overload to resolve the token. This works in cases 3, 4, and 5, because the method calls do not depend on the generic context. In cases 1 and 2, an exception is thrown because there is insufficient information to resolve the token. + The example then attempts to use the method overload to resolve the token. This works in cases 3, 4, and 5, because the method calls do not depend on the generic context. In cases 1 and 2, an exception is thrown because there is insufficient information to resolve the token. The metadata token values are hard-coded as an enumeration. If you change this code example, the token values are likely to change. To determine the new token values, compile the code and use Ildasm.exe with the **/TOKENS** option to examine the assembly. The tokens can be found at the points of call. Insert the new values into the enumeration, and recompile the example. @@ -3492,7 +3492,7 @@ method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a type that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. + To resolve a metadata token for a `TypeSpec` whose signature contains `ELEMENT_TYPE_VAR` or `ELEMENT_TYPE_MVAR`, use the method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a type that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -3588,12 +3588,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> diff --git a/xml/System.Reflection/ObfuscationAttribute.xml b/xml/System.Reflection/ObfuscationAttribute.xml index 43d8866ffb5..5c670ed3507 100644 --- a/xml/System.Reflection/ObfuscationAttribute.xml +++ b/xml/System.Reflection/ObfuscationAttribute.xml @@ -252,7 +252,7 @@ ## Examples - The following code example shows a type that is marked to be excluded from obfuscation. It is not necessary to specify the property, because it defaults to `true`, but specifying it explicitly makes your intent clear. The is set to `false`, so that the exclusion from obfuscation does not apply to the members of the class. That is, the class name is visible but the members are obfuscated. + The following code example shows a type that is marked to be excluded from obfuscation. It is not necessary to specify the property, because it defaults to `true`, but specifying it explicitly makes your intent clear. The is set to `false`, so that the exclusion from obfuscation does not apply to the members of the class. That is, the class name is visible but the members are obfuscated. The `MethodA` method is marked with the value `"default"` for the property. It is necessary to specify `false` for the property in order to avoid excluding `MethodA` from obfuscation, because the default for the property is `true`. The property is `false` so that the obfuscation tool will not strip the attribute after obfuscation. diff --git a/xml/System.Reflection/ParameterInfo.xml b/xml/System.Reflection/ParameterInfo.xml index da19f064c24..1050bae6bb4 100644 --- a/xml/System.Reflection/ParameterInfo.xml +++ b/xml/System.Reflection/ParameterInfo.xml @@ -120,7 +120,7 @@ ## Remarks Use an instance of `ParameterInfo` to obtain information about the parameter's data type, default value, and so on. - returns an array of `ParameterInfo` objects representing the parameters of a method, in order. + returns an array of `ParameterInfo` objects representing the parameters of a method, in order. @@ -228,7 +228,7 @@ This method utilizes the method. -To get the array, first get the method or the constructor and then call . +To get the array, first get the method or the constructor and then call . ## Examples @@ -289,7 +289,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to parameter attributes is through . ]]> @@ -349,7 +349,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to parameter types is through . ]]> @@ -463,7 +463,7 @@ The following example defines a method with three parameters. It uses the method. - To get the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . ]]> @@ -523,7 +523,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to the default value of the parameter is through . ]]> @@ -592,14 +592,14 @@ The following example defines a method with three parameters. It uses the method. + This method ignores the `inherit` parameter. To search the inheritance chain for attributes on parameters, use the appropriate overloads of the method. ## Examples The following example shows how custom attributes that have been applied to the parameters of methods can be retrieved at run time. The example defines a custom attribute named `MyAttribute` that can be applied to parameters. The example then defines a class named `MyClass` with a method named `MyMethod`, and applies `MyAttribute` to a parameter of the method. - When the example is run, it uses the method to retrieve the custom attributes that have been applied to all parameters of all methods in `MyClass`, and displays them at the console. + When the example is run, it uses the method to retrieve the custom attributes that have been applied to all parameters of all methods in `MyClass`, and displays them at the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/GetCustomAttributes/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/GetCustomAttributes/source.vb" id="Snippet1"::: @@ -664,7 +664,7 @@ The following example defines a method with three parameters. It uses the method. + This method ignores the `inherit` parameter. To search the inheritance chain for attributes on parameters, use the appropriate overloads of the method. ]]> @@ -719,7 +719,7 @@ The following example defines a method with three parameters. It uses the and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods such as and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and example code, see the class. ]]> @@ -760,9 +760,9 @@ The following example defines a method with three parameters. It uses the , , and , which are used to obtain custom modifiers from a function pointer. + A modified type supports , , and , which are used to obtain custom modifiers from a function pointer. - To obtain the normal, unmodified type from a modified type, use . + To obtain the normal, unmodified type from a modified type, use . This method is provided for designers of managed compilers. For more information on custom modifiers, see classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -821,7 +821,7 @@ The following example defines a method with three parameters. It uses the and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace, and the metadata specification in the ECMA Partition II documentation. For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace, and the metadata specification in the ECMA Partition II documentation. For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -892,7 +892,7 @@ The following example defines a method with three parameters. It uses the method. + This method implements the method. ]]> @@ -946,7 +946,7 @@ The following example defines a method with three parameters. It uses the and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace, and the metadata specification in Partition II of [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace, and the metadata specification in Partition II of [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -1055,14 +1055,14 @@ The following example defines a method with three parameters. It uses the method. + This method ignores the `inherit` parameter. To search the inheritance chain for attributes on parameters, use the appropriate overloads of the method. ## Examples The following example defines two custom attributes, `MyAttribute` and `MyDerivedAttribute`. `MyDerivedAttribute` is derived from `MyAttribute`. The example then applies these attributes to the parameters of a method of an example class. - When the example is run, it uses the method to test all parameters of all methods in the example class. It then displays the parameters that have `MyAttribute` or `MyDerivedAttribute`. + When the example is run, it uses the method to test all parameters of all methods in the example class. It then displays the parameters that have `MyAttribute` or `MyDerivedAttribute`. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/IsDefined/parameterinfo_getcustomattribute_isdefined.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/IsDefined/parameterinfo_getcustomattribute_isdefined.vb" id="Snippet1"::: @@ -1129,7 +1129,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . @@ -1142,9 +1142,9 @@ The following example defines a method with three parameters. It uses the , the second with , and the third with . -- Calls to complete the type. +- Calls to complete the type. - After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. + After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.vb" id="Snippet1"::: @@ -1204,7 +1204,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . ]]> @@ -1264,7 +1264,7 @@ The following example defines a method with three parameters. It uses the array, first get the method and then call . + To get the array, first get the method and then call . @@ -1277,9 +1277,9 @@ The following example defines a method with three parameters. It uses the , the second with , and the third with . -- Calls to complete the type. +- Calls to complete the type. - After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. + After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.vb" id="Snippet1"::: @@ -1342,7 +1342,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . @@ -1355,9 +1355,9 @@ The following example defines a method with three parameters. It uses the , the second with , and the third with . -- Calls to complete the type. +- Calls to complete the type. - After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. + After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/IsOut/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/IsOut/source.vb" id="Snippet1"::: @@ -1420,7 +1420,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . ]]> @@ -1521,7 +1521,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to the parameter name is through the . ]]> @@ -1641,7 +1641,7 @@ The following example defines a method with three parameters. It uses the field, and depends on an optional metadata flag that might not be available in all compilers. - To get the array, first get the method or the constructor and then call the method. + To get the array, first get the method or the constructor and then call the method. > [!WARNING] > If this represents a return value (that is, if it was obtained by using the property), this property will be `null`. @@ -1712,7 +1712,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to the parameter name is through the . ]]> @@ -1769,7 +1769,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . @@ -1836,7 +1836,7 @@ The following example defines a method with three parameters. It uses the method. - To get the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . ]]>
@@ -1890,7 +1890,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to the name of the parameter is through . ]]>
@@ -1953,7 +1953,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call the method. + To get the array, first get the method or the constructor and then call the method. ]]>
diff --git a/xml/System.Reflection/ParameterModifier.xml b/xml/System.Reflection/ParameterModifier.xml index 8a6916a7298..2c6bab41adb 100644 --- a/xml/System.Reflection/ParameterModifier.xml +++ b/xml/System.Reflection/ParameterModifier.xml @@ -79,7 +79,7 @@ structure is used with the method overload when passing parameters by reference to a COM component that is accessed late bound. The parameters that are to be passed by reference are specified by a single structure, which must be passed in an array containing a single element. The single structure in this array must be initialized with the number of parameters in the member that is to be invoked. To indicate which of these parameters are passed by reference, set the value of the property (the indexer in C#) to `true` for the index number corresponding to the zero-based position of the parameter. + The structure is used with the method overload when passing parameters by reference to a COM component that is accessed late bound. The parameters that are to be passed by reference are specified by a single structure, which must be passed in an array containing a single element. The single structure in this array must be initialized with the number of parameters in the member that is to be invoked. To indicate which of these parameters are passed by reference, set the value of the property (the indexer in C#) to `true` for the index number corresponding to the zero-based position of the parameter. diff --git a/xml/System.Reflection/PortableExecutableKinds.xml b/xml/System.Reflection/PortableExecutableKinds.xml index a9b70ac1df3..e4c6c3f3b86 100644 --- a/xml/System.Reflection/PortableExecutableKinds.xml +++ b/xml/System.Reflection/PortableExecutableKinds.xml @@ -59,14 +59,14 @@ Identifies the nature of the code in an executable file. - method. - + method. + > [!NOTE] -> This enumeration corresponds to the `CorPEKind` enumeration in the unmanaged reflection API, which is accessed by the unmanaged `GetPEKind` function. - +> This enumeration corresponds to the `CorPEKind` enumeration in the unmanaged reflection API, which is accessed by the unmanaged `GetPEKind` function. + ]]> diff --git a/xml/System.Reflection/PropertyInfo.xml b/xml/System.Reflection/PropertyInfo.xml index 630bd2e92f4..1a5b1943361 100644 --- a/xml/System.Reflection/PropertyInfo.xml +++ b/xml/System.Reflection/PropertyInfo.xml @@ -100,7 +100,7 @@ Properties are logically the same as fields. A property is a named aspect of an object's state whose value is typically accessible through `get` and `set` accessors. Properties may be read-only, in which case a set routine is not supported. > [!NOTE] -> To determine whether a property is `static`, you must obtain the for the `get` or `set` accessor, by calling the or the method, and examine its property. +> To determine whether a property is `static`, you must obtain the for the `get` or `set` accessor, by calling the or the method, and examine its property. Several methods in this class assume that the `get` accessor and `set` accessor methods of a property have certain formats. The signatures of the `get` and `set` methods must match the following convention: @@ -110,7 +110,7 @@ If this format is not followed, the behavior of the `GetValue` and `SetValue` methods is undefined. - Calling on `PropertyInfo` when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. + Calling on `PropertyInfo` when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. @@ -227,17 +227,17 @@ The property returns the attributes associated with the property represented by this object. The attributes are primarily modifiers applied by a compiler when creating a property; they indicate whether a property is the default property, a `SpecialName` property, and so on. Note that, for almost all properties found in types in the .NET Framework class library, the value of the property is . > [!TIP] -> In most cases, you probably want to retrieve the custom attributes associated with a property. To do this, retrieve the value of the property, or call one of the overloads of the method. +> In most cases, you probably want to retrieve the custom attributes associated with a property. To do this, retrieve the value of the property, or call one of the overloads of the method. To get the property: 1. Get a object that represents the type to which the property belongs. -2. Get the object by calling an overload of the method. +2. Get the object by calling an overload of the method. 3. Retrieve the property's attributes from the property. - You can define the attributes of a property for a type created dynamically using reflection emit by calling an overload of the method and supplying a value for the `attributes` argument. + You can define the attributes of a property for a type created dynamically using reflection emit by calling an overload of the method and supplying a value for the `attributes` argument. ]]> @@ -367,13 +367,13 @@ returns `true` if the property has a `set` accessor, even if the accessor is `private`, `internal` (or `Friend` in Visual Basic), or `protected`. If the property does not have a `set` accessor, the method returns `false`. + returns `true` if the property has a `set` accessor, even if the accessor is `private`, `internal` (or `Friend` in Visual Basic), or `protected`. If the property does not have a `set` accessor, the method returns `false`. To get the value of the property: 1. Get the object of the type that includes the property. -2. Call the to get the object that represents the property. +2. Call the to get the object that represents the property. 3. Retrieve the value of the property. @@ -507,14 +507,14 @@ method: + To call the method: 1.Get a object that represents the class. 2.From the object, get the object. -3.From the object, call the method. +3.From the object, call the method. ## Examples - The following example retrieves the public accessors of the `ClassWithProperty.Caption` property and displays information about them. It also calls the method of the setter to set the property value and of the getter to retrieve the property value. + The following example retrieves the public accessors of the `ClassWithProperty.Caption` property and displays information about them. It also calls the method of the setter to set the property value and of the getter to retrieve the property value. :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/GetAccessors/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/PropertyInfo/GetAccessors/source1.vb" id="Snippet1"::: @@ -578,14 +578,14 @@ ## Remarks -To call the method: +To call the method: 1. Get a object that represents the class. 2. From the object, get the object. -3. From the object, call the method. +3. From the object, call the method. ## Examples - The following example retrieves the accessors of the `ClassWithProperty.Caption` property and displays information about them. It also calls the method of the setter to set the property value and of the getter to retrieve the property value. + The following example retrieves the accessors of the `ClassWithProperty.Caption` property and displays information about them. It also calls the method of the setter to set the property value and of the getter to retrieve the property value. :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/GetAccessors/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/PropertyInfo/GetAccessors/source.vb" id="Snippet1"::: @@ -647,7 +647,7 @@ To call the method: This method is provided for designers of managed compilers and code analyzers. > [!NOTE] -> Do not use this method in the reflection-only context, because it might cause code to execute. Use the method instead. +> Do not use this method in the reflection-only context, because it might cause code to execute. Use the method instead. In unmanaged metadata, the Constant table is used to store constant values for fields, parameters, and properties. Constant information does not directly influence runtime behavior. Compilers inspect this information, at compile time, when importing metadata. If used, the value of a constant is embedded in the Microsoft intermediate language (MSIL) stream the compiler emits. There are no MSIL instructions that can be used to access the Constant table at run time. @@ -1005,9 +1005,9 @@ To call the method: , , and , which are used to obtain custom modifiers from a function pointer. + A modified type supports , , and , which are used to obtain custom modifiers from a function pointer. - To obtain the normal, unmodified type from a modified type, use . + To obtain the normal, unmodified type from a modified type, use . This method is provided for designers of managed compilers. For more information on custom modifiers, see classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -1066,7 +1066,7 @@ To call the method: and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -1182,7 +1182,7 @@ To call the method: and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -1445,14 +1445,14 @@ To call the method: overload to retrieve the value of a non-indexed property; if you try to retrieve the value of an indexed property, the method throws a exception. You can determine whether a property is indexed or not by calling the method. If the length of the returned array is zero, the property is not indexed. + You call the overload to retrieve the value of a non-indexed property; if you try to retrieve the value of an indexed property, the method throws a exception. You can determine whether a property is indexed or not by calling the method. If the length of the returned array is zero, the property is not indexed. - This is a convenience method that provides an implementation for the abstract method with the parameter set to , the set to `null`, the object array of index values set to `null`, and the set to `null`. + This is a convenience method that provides an implementation for the abstract method with the parameter set to , the set to `null`, the object array of index values set to `null`, and the set to `null`. ## Examples - The following example defines a `Planet` class that has two properties: `Name`, the name of the planet; and `Distance`, the planet's distance from Earth. The example instantiates a `Planet` object that represents the planet Jupiter and passes it to a `GetPropertyValues` method that displays information about the properties and uses the method to get the value of each `Planet` property. + The following example defines a `Planet` class that has two properties: `Name`, the name of the planet; and `Distance`, the planet's distance from Earth. The example instantiates a `Planet` object that represents the planet Jupiter and passes it to a `GetPropertyValues` method that displays information about the properties and uses the method to get the value of each `Planet` property. :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/GetValue/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/PropertyInfo/GetValue/getvalue1.vb" id="Snippet1"::: @@ -1526,7 +1526,7 @@ To call the method: method. If the resulting array has 0 (zero) elements, the property is not indexed. + To determine whether a property is indexed, use the method. If the resulting array has 0 (zero) elements, the property is not indexed. This is a convenience method that provides an implementation for the abstract `GetValue` method with a `BindingFlags` parameter of `Default`, the `Binder` set to `null`, and the `CultureInfo` set to `null`. @@ -1629,7 +1629,7 @@ Note: In method. If the resulting array has 0 (zero) elements, the property is not indexed. + To determine whether a property is indexed, use the method. If the resulting array has 0 (zero) elements, the property is not indexed. Because static properties belong to the type, not individual objects, get static properties by passing `null` as the object argument. For example, use the following code to get the static `CurrentCulture` property of `CultureInfo` : @@ -1772,7 +1772,7 @@ Console.WriteLine("CurrCult: " + . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a property. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a property. `MemberType` is a derived class of `MemberInfo` and specifies the type of member this is. Member types are constructors, properties, fields, and methods. Since this is a `PropertyInfo` property, the returned type is a property. @@ -1958,9 +1958,9 @@ Console.WriteLine("CurrCult: " + ## Remarks To determine the type of a particular property, do the following: -1. Get a object that represents the type (the class or structure) that contains the property. If you are working with an object (an instance of a type), you can call its method. Otherwise, you can use the C# operator or the Visual Basic [GetType](/dotnet/visual-basic/language-reference/operators/gettype-operator) operator, as the example illustrates. +1. Get a object that represents the type (the class or structure) that contains the property. If you are working with an object (an instance of a type), you can call its method. Otherwise, you can use the C# operator or the Visual Basic [GetType](/dotnet/visual-basic/language-reference/operators/gettype-operator) operator, as the example illustrates. -2. Get a object that represents the property in which you're interested. You can do this by getting an array of all properties from the method and then iterating the elements in the array, or you can retrieve the object that represents the property directly by calling the method and specifying the property name. +2. Get a object that represents the property in which you're interested. You can do this by getting an array of all properties from the method and then iterating the elements in the array, or you can retrieve the object that represents the property directly by calling the method and specifying the property name. 3. Retrieve the value of the property from the object. @@ -2024,7 +2024,7 @@ Console.WriteLine("CurrCult: " + property is equivalent to calling the method with a value of `true` for the `nonPublic` argument. + Retrieving the value of the property is equivalent to calling the method with a value of `true` for the `nonPublic` argument. ]]> @@ -2106,19 +2106,19 @@ Console.WriteLine("CurrCult: " + overload sets the value of a non-indexed property. To determine whether a property is indexed, call the method. If the resulting array has 0 (zero) elements, the property is not indexed. To set the value of an indexed property, call the overload. + The overload sets the value of a non-indexed property. To determine whether a property is indexed, call the method. If the resulting array has 0 (zero) elements, the property is not indexed. To set the value of an indexed property, call the overload. If the property type of this object is a value type and `value` is `null`, the property will be set to the default value for that type. - This is a convenience method that calls the runtime implementation of the abstract method, specifying for the `BindingFlags` parameter, `null` for `Binder`, `null` for `Object[]`, and `null` for `CultureInfo`. + This is a convenience method that calls the runtime implementation of the abstract method, specifying for the `BindingFlags` parameter, `null` for `Binder`, `null` for `Object[]`, and `null` for `CultureInfo`. - To use the method, first get a object that represents the class. From the , get the object. From the object, call the method. + To use the method, first get a object that represents the class. From the , get the object. From the object, call the method. > [!NOTE] > This method can be used to access non-public members if the caller has been granted with the flag and if the grant set of the non-public members is restricted to the caller's grant set, or a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later. ## Examples - The following example declares a class named `Example` with one `static` (`Shared` in Visual Basic) and one instance property. The example uses the method to change the original property values and displays the original and final values. + The following example declares a class named `Example` with one `static` (`Shared` in Visual Basic) and one instance property. The example uses the method to change the original property values and displays the original and final values. :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/SetValue/example2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/PropertyInfo/SetValue/example2.vb" id="Snippet2"::: @@ -2211,24 +2211,24 @@ Note: In method to change the default values of the properties and displays the original and final values. + The following example declares a class named `Example` with three properties: a `static` property (`Shared` in Visual Basic), an instance property, and an indexed instance property. The example uses the method to change the default values of the properties and displays the original and final values. The name that is used to search for an indexed instance property with reflection is different depending on the language and on attributes applied to the property. @@ -2325,7 +2325,7 @@ Note: In property retrieves an array of type `Exception` that is parallel to the array. This array will contain null values whenever reflection cannot load a class. + The property retrieves an array of type `Exception` that is parallel to the array. This array will contain null values whenever reflection cannot load a class. ]]> diff --git a/xml/System.Reflection/TargetException.xml b/xml/System.Reflection/TargetException.xml index 6160d3ab042..3eb51355033 100644 --- a/xml/System.Reflection/TargetException.xml +++ b/xml/System.Reflection/TargetException.xml @@ -153,8 +153,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("").| +||`null`| +||The empty string ("").| ]]> @@ -212,8 +212,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The message string.| +||`null`| +||The message string.| ]]> @@ -336,8 +336,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Reflection/TargetInvocationException.xml b/xml/System.Reflection/TargetInvocationException.xml index 89bf79469a5..4546f04cad2 100644 --- a/xml/System.Reflection/TargetInvocationException.xml +++ b/xml/System.Reflection/TargetInvocationException.xml @@ -87,7 +87,7 @@ . + For more information, see . `TargetInvocationException` uses the HRESULT COR_E_TARGETINVOCATION, which has the value 0x80131604. @@ -167,8 +167,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> @@ -234,8 +234,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Reflection/TargetParameterCountException.xml b/xml/System.Reflection/TargetParameterCountException.xml index 170590448ae..26e12ad59fe 100644 --- a/xml/System.Reflection/TargetParameterCountException.xml +++ b/xml/System.Reflection/TargetParameterCountException.xml @@ -155,8 +155,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("").| +||`null`| +||The empty string ("").| ]]> @@ -216,8 +216,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The message string.| +||`null`| +||The message string.| ]]> @@ -281,8 +281,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]>
diff --git a/xml/System.Reflection/TypeAttributes.xml b/xml/System.Reflection/TypeAttributes.xml index 31e7a1f0656..6af7e85dbab 100644 --- a/xml/System.Reflection/TypeAttributes.xml +++ b/xml/System.Reflection/TypeAttributes.xml @@ -78,7 +78,7 @@ value retrieved from a property such as . The following table lists the masks and the individual members that they include: + Some of the members of the `TypeAttributes` enumeration are masks that represent a set of mutually exclusive attributes. For example, the `VisibilityMask` member includes the `NotPublic`, `Public`, `NestedPublic`, `NestedPrivate`, `NestedFamily`, `NestedAssembly`, `NestedFamANDAssem`, and `NestedFamORAssem` members. Because each attribute set includes a member whose underlying value is zero, you should first `And` the value of the mask with the specific value retrieved from a property such as . The following table lists the masks and the individual members that they include: |Mask|Includes| |----------|--------------| diff --git a/xml/System.Reflection/TypeDelegator.xml b/xml/System.Reflection/TypeDelegator.xml index 8eb6c0ab9b6..9e1aa2586bc 100644 --- a/xml/System.Reflection/TypeDelegator.xml +++ b/xml/System.Reflection/TypeDelegator.xml @@ -75,15 +75,15 @@ derives from and implements most of the properties and methods of . For each member it implements, automatically delegates to the corresponding member of an internal object, which is supplied as an argument to the constructor. This internal object is exposed to deriving classes by the `protected` field. > [!NOTE] -> Some members of have implementations even though the members themselves are simply inherited from . In these cases, the implementation is provided by an overridden `protected` method that has a name that ends in "Impl". For example, the implementation for all overloads of the method is supplied by the overridden method. The implementation for inherited properties such as and is provided by the overridden method. +> Some members of have implementations even though the members themselves are simply inherited from . In these cases, the implementation is provided by an overridden `protected` method that has a name that ends in "Impl". For example, the implementation for all overloads of the method is supplied by the overridden method. The implementation for inherited properties such as and is provided by the overridden method. - Deriving classes can provide a public constructor that takes a object as its parameter and simply passes that object to the constructor, or can set the internal object in some other way. + Deriving classes can provide a public constructor that takes a object as its parameter and simply passes that object to the constructor, or can set the internal object in some other way. - If a deriving class uses a member that is not implemented by , it must override that member and provide an implementation. The simplest implementation is to call the corresponding member on the internal object exposed by the field, but you can provide any implementation your application requires. It is not necessary to override these members if they are not used by your application or by library functions your application calls (for example, by the constructor). + If a deriving class uses a member that is not implemented by , it must override that member and provide an implementation. The simplest implementation is to call the corresponding member on the internal object exposed by the field, but you can provide any implementation your application requires. It is not necessary to override these members if they are not used by your application or by library functions your application calls (for example, by the constructor). - The following virtual methods (`Overridable` methods in Visual Basic) of are not implemented by : , , , , , , , , , , , , . + The following virtual methods (`Overridable` methods in Visual Basic) of are not implemented by : , , , , , , , , , , , , . - The following virtual properties (`Overridable` properties in Visual Basic) of are not implemented by : , , , , , , , , , . + The following virtual properties (`Overridable` properties in Visual Basic) of are not implemented by : , , , , , , , , , . ]]> @@ -1063,7 +1063,7 @@ method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. Use a `bindingAttr` of .NonPublic to return all public and nonpublic fields. @@ -2096,7 +2096,7 @@ This method can be used to find a constructed generic member given a member from The binder will find all the matching methods. These methods are found based upon the type of binding requested (`BindingFlags.MethodInvoke`, `BindingFlags.GetProperties`, and so on). The set of methods is filtered by the name, number of arguments, and a set of search modifiers defined in the binder. - After the method is selected, it will be invoked. Accessibility is checked at that point. The search may control which set of methods are searched based upon the accessibility attribute associated with the method. The method is responsible for selecting the method to be invoked. The default binder selects the most specific match. + After the method is selected, it will be invoked. Accessibility is checked at that point. The search may control which set of methods are searched based upon the accessibility attribute associated with the method. The method is responsible for selecting the method to be invoked. The default binder selects the most specific match. > [!NOTE] > Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked using reflection whenever the code is fully trusted. @@ -2966,7 +2966,7 @@ t.InvokeMember ("MyArray", BindingFlags.SetField, null, this, new . + A string containing the name of the current `TypeDelegator`. Only the simple name, not the fully qualified name, is returned. To get the name and the path, use . ]]> diff --git a/xml/System.Reflection/TypeFilter.xml b/xml/System.Reflection/TypeFilter.xml index 1dfb3b547c1..35075646de6 100644 --- a/xml/System.Reflection/TypeFilter.xml +++ b/xml/System.Reflection/TypeFilter.xml @@ -92,7 +92,7 @@ objects. The method uses this delegate to filter the list of interfaces that it returns. Every derived class of and has a constructor and a `DynamicInvoke` method. + The `TypeFilter` delegate is used to filter a list of classes. Specifically, you use it to filter the classes represented in an array of objects. The method uses this delegate to filter the list of interfaces that it returns. Every derived class of and has a constructor and a `DynamicInvoke` method. ## Examples This example shows how to define a method matching the delegate prototype allowing you to use reflection to filter or return a subset of matching entries. diff --git a/xml/System.Reflection/TypeInfo.xml b/xml/System.Reflection/TypeInfo.xml index 3c20bbd4014..14f66597ac8 100644 --- a/xml/System.Reflection/TypeInfo.xml +++ b/xml/System.Reflection/TypeInfo.xml @@ -91,11 +91,11 @@ ## Remarks Starting with .NET Framework 4.5, the class is included in the .NET for Windows 8.x Store apps subset for use in creating Windows Store apps. is available in the full .NET Framework as well. For more information about reflection for Windows Store apps, see [System.Reflection namespaces](/dotnet/api/?term=system.reflection) and [Reflection in the .NET Framework for Windows Store Apps](/dotnet/framework/reflection-and-codedom/reflection-for-windows-store-apps). - contains many of the members available in the class, and many of the reflection properties in the .NET for Windows 8.x Store apps return collections of objects. To get a object from a object, use the extension method. + contains many of the members available in the class, and many of the reflection properties in the .NET for Windows 8.x Store apps return collections of objects. To get a object from a object, use the extension method. A object represents the type definition itself, whereas a object represents a reference to the type definition. Getting a object forces the assembly that contains that type to load. In comparison, you can manipulate objects without necessarily requiring the runtime to load the assembly they reference. - In the .NET for Windows 8.x Store apps, you use the reflection properties of that return collections instead of methods that return arrays. For example, use the property to get all declared members, or the property to get all declared properties. Reflection contexts can implement lazy traversal of these collections for large assemblies or types. To get specific members, use methods such as and , and pass the name of the method or property you would like to retrieve. + In the .NET for Windows 8.x Store apps, you use the reflection properties of that return collections instead of methods that return arrays. For example, use the property to get all declared members, or the property to get all declared properties. Reflection contexts can implement lazy traversal of these collections for large assemblies or types. To get specific members, use methods such as and , and pass the name of the method or property you would like to retrieve. To filter the results of properties, use LINQ queries. For reflection objects that originate with the runtime (for example, as the result of `typeof(Object)`), you can traverse the inheritance tree by using the methods in the class. Consumers of objects from customized reflection contexts cannot use these methods and must traverse the inheritance tree themselves. diff --git a/xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml b/xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml index 2c8184571d6..70221841ed3 100644 --- a/xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml +++ b/xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml @@ -43,9 +43,9 @@ ## Remarks Typically, resources separate code from content within an application. Creating and consuming these resources makes it easier to develop localizable applications. In the .NET Framework, resources are usually consumed by using the class, which contains methods that provide access to culture-specific resources at run time. For more information about creating and consuming resources, see [Resources in Desktop Apps](/dotnet/framework/resources/). - Strongly typed resource support is a compile-time feature that encapsulates access to resources by creating classes that contain a set of static, read-only (`get`) properties. This provides an alternative way to consume resources instead of calling the and methods. + Strongly typed resource support is a compile-time feature that encapsulates access to resources by creating classes that contain a set of static, read-only (`get`) properties. This provides an alternative way to consume resources instead of calling the and methods. - The basic functionality for strongly typed resource support is provided by the class (as well as the `/str` command-line option in the [Resgen.exe (Resource File Generator)](/dotnet/framework/tools/resgen-exe-resource-file-generator)). The output of the method is a class that contains strongly typed properties that match the resources that are referenced in the input parameter. This class provides read-only access to the resources that are available in the file processed. + The basic functionality for strongly typed resource support is provided by the class (as well as the `/str` command-line option in the [Resgen.exe (Resource File Generator)](/dotnet/framework/tools/resgen-exe-resource-file-generator)). The output of the method is a class that contains strongly typed properties that match the resources that are referenced in the input parameter. This class provides read-only access to the resources that are available in the file processed. @@ -140,7 +140,7 @@ method to generate a class that provides a strongly typed, read-only wrapper to access the resources that are contained in the `resourceList` parameter. + Use the method to generate a class that provides a strongly typed, read-only wrapper to access the resources that are contained in the `resourceList` parameter. The class ignores any resource name that begins with the characters "$" or ">>". The resource names "Culture" and "ResourceManager" are invalid identifiers. @@ -218,7 +218,7 @@ method to generate a class that provides strongly typed, read-only access to the resources that are contained in the `resxFile` parameter. + Use the method to generate a class that provides strongly typed, read-only access to the resources that are contained in the `resxFile` parameter. The class ignores any resource name that begins with the characters "$" or ">>". The resource names "Culture" and "ResourceManager" are invalid identifiers. @@ -385,7 +385,7 @@ System.Resources.ResourceManager rm = new System.Resources.ResourceManager(" method to generate a class that provides strongly typed, read-only access to the resources that are contained in the `resxFile` parameter. + Use the method to generate a class that provides strongly typed, read-only access to the resources that are contained in the `resxFile` parameter. The class ignores any resource name that begins with the characters "$" or ">>". The resource names "Culture" and "ResourceManager" are invalid identifiers. @@ -439,14 +439,14 @@ System.Resources.ResourceManager rm = new System.Resources.ResourceManager(" method attempts to generate a valid string based on the `key` and `provider` parameters. If a valid string can be generated, that string is returned; otherwise, `null` is returned. + If the `key` parameter is a valid string of characters, that string is returned. If the `key` parameter is an invalid string or a string that contains invalid characters, the method attempts to generate a valid string based on the `key` and `provider` parameters. If a valid string can be generated, that string is returned; otherwise, `null` is returned. - If the `key` parameter is an empty string (""), a string that consists of a single underscore character (_) is returned. If the `key` parameter is not an empty string, the method compares each character in the string to a set of invalid tokens based on the language specified by the `provider` parameter. Any invalid character in the string is replaced with an underscore character. The characters that will be replaced with an underscore are as follows: + If the `key` parameter is an empty string (""), a string that consists of a single underscore character (_) is returned. If the `key` parameter is not an empty string, the method compares each character in the string to a set of invalid tokens based on the language specified by the `provider` parameter. Any invalid character in the string is replaced with an underscore character. The characters that will be replaced with an underscore are as follows: ' ' (space), U+00A0 (non-breaking space), '.' (period), ',' (comma), ';' (semicolon), '|', '~', '@', '#', '%', '^', '&', '*', '+', '-', '/', '\\', '\<', '>', '?', '[', ']', '(', ')', '{', '}', '"' (quote), ''' (apostrophe), ':', and '!'. > [!NOTE] -> Strongly typed resources do not allow the use of language keywords (such as `if`, `for`, and so on) as resource key names. However, the design pattern allows the use of language keywords by prefixing the keyword with the underscore character. The method calls the method to enforce this design. For example, if you use a resource name that is the same as a language keyword, such as `for`, the name appears as `_for` in the generated strongly typed resource class. +> Strongly typed resources do not allow the use of language keywords (such as `if`, `for`, and so on) as resource key names. However, the design pattern allows the use of language keywords by prefixing the keyword with the underscore character. The method calls the method to enforce this design. For example, if you use a resource name that is the same as a language keyword, such as `for`, the name appears as `_for` in the generated strongly typed resource class. ]]> diff --git a/xml/System.Resources/IResourceReader.xml b/xml/System.Resources/IResourceReader.xml index a301471141b..fcd076867a8 100644 --- a/xml/System.Resources/IResourceReader.xml +++ b/xml/System.Resources/IResourceReader.xml @@ -67,11 +67,11 @@ Provides the base functionality for reading data from resource files. - ) or if you are using a non-standard format or file type for storing resources. Otherwise, use the default class, which reads resource information from binary .resources files, or the class, which reads resource information from XML resource (.resx) files. - + ) or if you are using a non-standard format or file type for storing resources. Otherwise, use the default class, which reads resource information from binary .resources files, or the class, which reads resource information from XML resource (.resx) files. + ]]> @@ -121,11 +121,11 @@ Closes the resource reader after releasing any resources associated with it. - @@ -174,11 +174,11 @@ Returns a dictionary enumerator of the resources for this reader. A dictionary enumerator for the resources for this reader. - inherits the interface, it must also provide an implementation of the method, which returns an object that can be used to enumerate a collection. Typically, is implemented as an explicit interface implementation. - + inherits the interface, it must also provide an implementation of the method, which returns an object that can be used to enumerate a collection. Typically, is implemented as an explicit interface implementation. + ]]> diff --git a/xml/System.Resources/IResourceWriter.xml b/xml/System.Resources/IResourceWriter.xml index acd0d1477d9..e35ee3b9e8e 100644 --- a/xml/System.Resources/IResourceWriter.xml +++ b/xml/System.Resources/IResourceWriter.xml @@ -54,11 +54,11 @@ Provides the base functionality for writing resources to an output file or stream. - class, which writes resources to a binary .resources file, or the class, which writes resources to an XML resource (.resx) file. - + class, which writes resources to a binary .resources file, or the class, which writes resources to an XML resource (.resx) file. + ]]> @@ -128,11 +128,11 @@ Value of a resource as an 8-bit unsigned integer array. Adds an 8-bit unsigned integer array as a named resource to the list of resources to be written. - method is called. - + method is called. + ]]> The parameter is . @@ -191,14 +191,14 @@ The value of the resource. Adds a named resource of type to the list of resources to be written. - method is called. - + method is called. + > [!NOTE] -> `value` might have to be serializable, so you might have to provide a type converter, depending on which resource writer is used. - +> `value` might have to be serializable, so you might have to provide a type converter, depending on which resource writer is used. + ]]> The parameter is . @@ -257,11 +257,11 @@ The value of the resource. Adds a named resource of type to the list of resources to be written. - method is called. - + method is called. + ]]> The parameter is . @@ -307,11 +307,11 @@ Closes the underlying resource file or stream, ensuring all the data has been written to the file. - will call the method to output the resources to the underlying file or stream before closing it. - + will call the method to output the resources to the underlying file or stream before closing it. + ]]> @@ -356,11 +356,11 @@ Writes all the resources added by the method to the output file or stream. - does not close the output file or output stream. Instead, consider calling the method. is useful when you want to create a resource file, but you don't want to close the output stream. can be called only once. After you call , all methods other than will throw an exception. - + does not close the output file or output stream. Instead, consider calling the method. is useful when you want to create a resource file, but you don't want to close the output stream. can be called only once. After you call , all methods other than will throw an exception. + ]]> diff --git a/xml/System.Resources/MissingManifestResourceException.xml b/xml/System.Resources/MissingManifestResourceException.xml index 4892df0c690..14d64078616 100644 --- a/xml/System.Resources/MissingManifestResourceException.xml +++ b/xml/System.Resources/MissingManifestResourceException.xml @@ -146,8 +146,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||The localized error message for .| +||`null`.| +||The localized error message for .| ]]> @@ -205,8 +205,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||The `message` string.| +||`null`.| +||The `message` string.| ]]> @@ -332,8 +332,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Resources/MissingSatelliteAssemblyException.xml b/xml/System.Resources/MissingSatelliteAssemblyException.xml index 678b25278b8..0265474163e 100644 --- a/xml/System.Resources/MissingSatelliteAssemblyException.xml +++ b/xml/System.Resources/MissingSatelliteAssemblyException.xml @@ -73,13 +73,13 @@ is thrown if the resource manager tries to retrieve but cannot find a resource for the default culture. However, the .NET Framework will load the resources for an app's default culture from a satellite assembly if the attribute specifies a value of for the location parameter. When this is the case, the exception is thrown when the resource manager tries to retrieve a resource of the default culture and the satellite assembly for the culture specified in the attribute is missing. Note that the exception is thrown by a resource retrieval method such as or , and not when the object is instantiated. + The default culture is the culture whose resources are loaded if the appropriate culture-specific resources cannot be found. By default, resources for the default culture are located in the main assembly, and a is thrown if the resource manager tries to retrieve but cannot find a resource for the default culture. However, the .NET Framework will load the resources for an app's default culture from a satellite assembly if the attribute specifies a value of for the location parameter. When this is the case, the exception is thrown when the resource manager tries to retrieve a resource of the default culture and the satellite assembly for the culture specified in the attribute is missing. Note that the exception is thrown by a resource retrieval method such as or , and not when the object is instantiated. uses the HRESULT COR_E_MISSINGSATELLITEASSEMBLY, which has the value 0x80131536. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. - For a list of initial property values for an instance of the class, see the constructors. + For a list of initial property values for an instance of the class, see the constructors. > [!NOTE] > You should always use the attribute to define your app's default culture so that if a resource for a specific culture is unavailable, your application will display acceptable behavior. @@ -194,8 +194,8 @@ HelloWorld2 |Property|Value| |--------------|-----------| -||`null`.| -||The localized error message for .| +||`null`.| +||The localized error message for .| ]]> @@ -251,8 +251,8 @@ HelloWorld2 |Property|Value| |--------------|-----------| -||`null`.| -||The `message` string.| +||`null`.| +||The `message` string.| ]]>
@@ -379,8 +379,8 @@ HelloWorld2 |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]>
@@ -438,8 +438,8 @@ HelloWorld2 |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]>
diff --git a/xml/System.Resources/NeutralResourcesLanguageAttribute.xml b/xml/System.Resources/NeutralResourcesLanguageAttribute.xml index 2af93b42ee9..cde3450338b 100644 --- a/xml/System.Resources/NeutralResourcesLanguageAttribute.xml +++ b/xml/System.Resources/NeutralResourcesLanguageAttribute.xml @@ -194,7 +194,7 @@ For a detailed list of culture names available on Windows systems, see the **Lan constructor with the enumeration to specify whether the class is to retrieve neutral fallback resources from the main app assembly (the default), or from a satellite assembly specified by the and the properties. + Use the constructor with the enumeration to specify whether the class is to retrieve neutral fallback resources from the main app assembly (the default), or from a satellite assembly specified by the and the properties. For a detailed list of culture names available on Windows systems, see the **Language tag** column in the [list of language/region names supported by Windows](https://learn.microsoft.com/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c). Culture names follow the standard defined by [BCP 47](https://tools.ietf.org/html/bcp47). diff --git a/xml/System.Resources/ResXDataNode.xml b/xml/System.Resources/ResXDataNode.xml index 40cfe54d0dc..23053261f3b 100644 --- a/xml/System.Resources/ResXDataNode.xml +++ b/xml/System.Resources/ResXDataNode.xml @@ -47,12 +47,12 @@ The class supports the representation of rich data types within a resource file. It can support the storage of any object in a resource file, so long as the object supports serialization and type editors. - You can create a object by calling one of its overloaded class constructors. You can then add the resource item or element to a resource file by calling the method. + You can create a object by calling one of its overloaded class constructors. You can then add the resource item or element to a resource file by calling the method. - To retrieve an existing object, you must enumerate the objects in an XML resource file by instantiating a object, setting the property to `true`, and calling the method to get an enumerator. The example provides an illustration. + To retrieve an existing object, you must enumerate the objects in an XML resource file by instantiating a object, setting the property to `true`, and calling the method to get an enumerator. The example provides an illustration. ## Examples - The following example uses the method to obtain an object that is used to enumerate the objects in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary XML resource file. + The following example uses the method to obtain an object that is used to enumerate the objects in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary XML resource file. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXDataNode/Overview/resxresourcereader2.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXDataNode/Overview/resxresourcereader2.vb" id="Snippet1"::: @@ -302,7 +302,7 @@ ## Remarks If a comment has not been assigned to the resource item, the value of the property is . - You access the property of an data node in an existing XML resource file by instantiating a object, setting the property to `true`, and calling the method to retrieve an object that you use to enumerate the items in the XML resource file. The property returns the object. + You access the property of an data node in an existing XML resource file by instantiating a object, setting the property to `true`, and calling the method to retrieve an object that you use to enumerate the items in the XML resource file. The property returns the object. @@ -417,7 +417,7 @@ looks for a by using the specified type resolution service that can convert from a string to the appropriate object. If the resource is a file reference, tries to de-serialize it. + If the stored value currently exists in memory, it is returned directly. If it is stored in the resource file and it is not a file reference, looks for a by using the specified type resolution service that can convert from a string to the appropriate object. If the resource is a file reference, tries to de-serialize it. ]]> @@ -466,7 +466,7 @@ looks in the assemblies identified by names to find the object's corresponding type, and then looks for a that can convert from a string to the appropriate object. If the resource is a file reference, tries to deserialize it. + If the stored value currently exists in memory, it is returned directly. If it is stored in the resource file and it is not a file reference, looks in the assemblies identified by names to find the object's corresponding type, and then looks for a that can convert from a string to the appropriate object. If the resource is a file reference, tries to deserialize it. ]]> diff --git a/xml/System.Resources/ResXFileRef+Converter.xml b/xml/System.Resources/ResXFileRef+Converter.xml index 7890eb4ed2f..dd99c36d2f5 100644 --- a/xml/System.Resources/ResXFileRef+Converter.xml +++ b/xml/System.Resources/ResXFileRef+Converter.xml @@ -31,16 +31,16 @@ Provides a type converter to convert data for a to and from a string. - provides the object the refers to. For example, if the is "xplogo.bmp;System.Drawing.Bitmap, System.Drawing", then calling the method of the converter will return a , not a . - - For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). - + provides the object the refers to. For example, if the is "xplogo.bmp;System.Drawing.Bitmap, System.Drawing", then calling the method of the converter will return a , not a . + + For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). + > [!NOTE] -> Typically, you do not directly create an instance of an . Instead, call the method of . For more information, see the examples in the base class. - +> Typically, you do not directly create an instance of an . Instead, call the method of . For more information, see the examples in the base class. + ]]> diff --git a/xml/System.Resources/ResXFileRef.xml b/xml/System.Resources/ResXFileRef.xml index d0db658a311..154342a8a83 100644 --- a/xml/System.Resources/ResXFileRef.xml +++ b/xml/System.Resources/ResXFileRef.xml @@ -40,29 +40,29 @@ Represents a link to an external resource. - class is used to include references to files in an XML resource (.resx) file. A object represents a link to an external resource in an XML resource (.resx) file. You add the object to a .resx file by calling the method. - - In a data entry in a .resx file, the type is , and the value is the path location on disk. When the resource manager deserializes the object, the performs the I/O to get the file. The following is an example of a .resx file. - -``` - - lookout.bmp;System.Drawing.Bitmap, System.Drawing - - - mailbackground.bmp;System.Drawing.Bitmap, System.Drawing - - - xplogo.png;System.Drawing.Bitmap, System.Drawing - -``` - - To add a object to a .resx file programmatically, you call the constructor to instantiate a object. You then pass this object to the method. - - When you compile a .resx file with [Resgen.exe (Resource File Generator)](/dotnet/framework/tools/resgen-exe-resource-file-generator), the resources specified in the .resx file are embedded in the resulting document resource file. - + class is used to include references to files in an XML resource (.resx) file. A object represents a link to an external resource in an XML resource (.resx) file. You add the object to a .resx file by calling the method. + + In a data entry in a .resx file, the type is , and the value is the path location on disk. When the resource manager deserializes the object, the performs the I/O to get the file. The following is an example of a .resx file. + +``` + + lookout.bmp;System.Drawing.Bitmap, System.Drawing + + + mailbackground.bmp;System.Drawing.Bitmap, System.Drawing + + + xplogo.png;System.Drawing.Bitmap, System.Drawing + +``` + + To add a object to a .resx file programmatically, you call the constructor to instantiate a object. You then pass this object to the method. + + When you compile a .resx file with [Resgen.exe (Resource File Generator)](/dotnet/framework/tools/resgen-exe-resource-file-generator), the resources specified in the .resx file are embedded in the resulting document resource file. + ]]> Working with .resx Files Programmatically @@ -107,11 +107,11 @@ The type of the resource that is referenced. Creates a new instance of the class that references the specified file. - object as a parameter. - + object as a parameter. + ]]> @@ -155,11 +155,11 @@ The encoding used in the referenced file. Initializes a new instance of the class that references the specified file. - object as a parameter. - + object as a parameter. + ]]> diff --git a/xml/System.Resources/ResXResourceReader.xml b/xml/System.Resources/ResXResourceReader.xml index 940349bea19..f9614a7186e 100644 --- a/xml/System.Resources/ResXResourceReader.xml +++ b/xml/System.Resources/ResXResourceReader.xml @@ -52,12 +52,12 @@ The class provides a default implementation of the interface that reads resource information in an XML format. To read resource information from a binary resource format, use the class. - You use the class to enumerate resources in .resx files by traversing the dictionary enumerator () that is returned by the method. You call the methods provided by to advance to the next resource and to read the name and value of each resource in the .resx file. + You use the class to enumerate resources in .resx files by traversing the dictionary enumerator () that is returned by the method. You call the methods provided by to advance to the next resource and to read the name and value of each resource in the .resx file. > [!NOTE] -> The class provides two enumerators. The method returns an object; we recommend that you use this method to enumerate resources. The method is an explicit interface implementation that returns an object; we do not recommend its use. +> The class provides two enumerators. The method returns an object; we recommend that you use this method to enumerate resources. The method is an explicit interface implementation that returns an object; we do not recommend its use. - The following example uses the method to obtain an object that is used to enumerate the resources in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary resource file. + The following example uses the method to obtain an object that is used to enumerate the resources in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary resource file. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader1.vb" id="Snippet1"::: @@ -67,7 +67,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader2.vb" id="Snippet2"::: - If is `true`, the items in the enumeration can be either: + If is `true`, the items in the enumeration can be either: - Named resources along with their data. In this case, the property is `null`. @@ -81,7 +81,7 @@ ## Examples - The following example demonstrates how to use a to iterate through the resources in a .resx file. First, the `rsxr` is created for the file `items.resx`. Next, the method is used to create an to iterate through the resources and display the contents to the console. + The following example demonstrates how to use a to iterate through the resources in a .resx file. First, the `rsxr` is created for the file `items.resx`. Next, the method is used to create an to iterate through the resources and display the contents to the console. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader.vb" id="Snippet1"::: @@ -141,7 +141,7 @@ ## Remarks > [!NOTE] -> The and methods do not close the stream you specify in this constructor. +> The and methods do not close the stream you specify in this constructor. ]]> @@ -555,12 +555,12 @@ enables the resources used by the to be reallocated for other purposes. For more information about , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). + Calling enables the resources used by the to be reallocated for other purposes. For more information about , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). ## Examples - The following example displays the resources of a file to the console, and then uses the method to shut down the reader and to make its resources available for other processes. + The following example displays the resources of a file to the console, and then uses the method to shut down the reader and to make its resources available for other processes. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader.vb" id="Snippet1"::: @@ -604,7 +604,7 @@ method or the method. invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + This method can be called by either the method or the method. invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. @@ -809,12 +809,12 @@ method retrieves the name/value pairs in the XML resource (.resx) stream or string associated with the current object. However, if the property is set to `true` before you call , the resource items are retrieved as objects. In this case, all resource nodes are returned regardless of type. + The method retrieves the name/value pairs in the XML resource (.resx) stream or string associated with the current object. However, if the property is set to `true` before you call , the resource items are retrieved as objects. In this case, all resource nodes are returned regardless of type. ## Examples - The following example uses the method to obtain an object that is used to enumerate the resources in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary resource file. + The following example uses the method to obtain an object that is used to enumerate the resources in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary resource file. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader1.vb" id="Snippet1"::: @@ -854,12 +854,12 @@ method provides an object that can retrieve the metadata from the resource file or stream associated with the current object. However, if the property is set to `true` before you call , no resource nodes are retrieved. + Resources are stored as name/value pairs in a resource file or stream. Design-time properties, which are called metadata, are stored in the resource file or stream along with runtime data resources. The method provides an object that can retrieve the metadata from the resource file or stream associated with the current object. However, if the property is set to `true` before you call , no resource nodes are retrieved. ## Examples - The following example uses the method to iterate through the metadata resources in an XML resource file. This code example is part of a larger example provided for the property. + The following example uses the method to iterate through the metadata resources in an XML resource file. This code example is part of a larger example provided for the property. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/useresxdatanodes.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/useresxdatanodes.vb" id="Snippet4"::: @@ -909,7 +909,7 @@ instance is cast to an interface. To enumerate the resources in a .resx file, we recommend that you call the method, and then call the `MoveNext` method on the returned object. + This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. To enumerate the resources in a .resx file, we recommend that you call the method, and then call the `MoveNext` method on the returned object. ]]> @@ -998,7 +998,7 @@ ## Examples - The following example enumerates and displays resource items in an XML file. Initially, is set to `false` to show both data and metadata items as they occur in the resource file. The second enumeration has the set to `true` so that resource data elements are returned as objects. + The following example enumerates and displays resource items in an XML file. Initially, is set to `false` to show both data and metadata items as they occur in the resource file. The second enumeration has the set to `true` so that resource data elements are returned as objects. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/useresxdatanodes.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/useresxdatanodes.vb" id="Snippet2"::: diff --git a/xml/System.Resources/ResXResourceSet.xml b/xml/System.Resources/ResXResourceSet.xml index 0e18103e837..9a2812f03cb 100644 --- a/xml/System.Resources/ResXResourceSet.xml +++ b/xml/System.Resources/ResXResourceSet.xml @@ -39,7 +39,7 @@ The class enumerates over an , loads every name and value, and stores them in a hash table. You can then enumerate the resources in the object or retrieve individual resources by name. - A object provides a convenient way to read all the resources in a .resx file into memory. You can use the method to retrieve a particular resource when the .resx file has been read into a instance. + A object provides a convenient way to read all the resources in a .resx file into memory. You can use the method to retrieve a particular resource when the .resx file has been read into a instance. ## Examples The following example instantiates a object and illustrates how to enumerate its resources and retrieve individual resources by name. For each resource that it enumerates, the example uses the property in a call to the `GetString` or `GetObject` method, depending on whether the value of the resource is a string or an object. diff --git a/xml/System.Resources/ResXResourceWriter.xml b/xml/System.Resources/ResXResourceWriter.xml index 2224acadd4b..32d8f0af840 100644 --- a/xml/System.Resources/ResXResourceWriter.xml +++ b/xml/System.Resources/ResXResourceWriter.xml @@ -46,9 +46,9 @@ ## Remarks The writes resources in XML format. To write a binary resource file, use . - Resources are specified as name/value pairs using the method. Resource names are case-sensitive when used for lookups; but to more easily support authoring tools and help eliminate bugs, does not allow a.resx file to have names that vary only by case. + Resources are specified as name/value pairs using the method. Resource names are case-sensitive when used for lookups; but to more easily support authoring tools and help eliminate bugs, does not allow a.resx file to have names that vary only by case. - To create a.resx file, create a with a unique file name, call at least once, call to write the resources file to disk, and then call to close the file. Calling will implicitly the file if required. + To create a.resx file, create a with a unique file name, call at least once, call to write the resources file to disk, and then call to close the file. Calling will implicitly the file if required. The resources are not necessarily written in the same order they were added. @@ -112,7 +112,7 @@ ## Remarks > [!NOTE] -> The method closes the stream you specify as a parameter. To write the resource to the stream without closing the stream, you must use the method. +> The method closes the stream you specify as a parameter. To write the resource to the stream without closing the stream, you must use the method. ]]> @@ -365,7 +365,7 @@ is called. + Resources whose values are from an aliased assembly are automatically added to the list of aliases. The resource is not written until is called. ]]> @@ -615,7 +615,7 @@ is called. + The resource is not written until is called. The resource is serialized and stored in a binary format. @@ -670,14 +670,14 @@ is called. The resource that was added must be serializable. + The resource is not written until is called. The resource that was added must be serializable. If the resource being added is a string, it is written as a string; otherwise, the resource is serialized and stored in a binary format. ## Examples - The following example creates a .resx file named `CarResources.resx` that stores six strings, an icon, and two application-defined objects (two `Automobile` objects). To store the icon and the `Automobile` objects, it calls the method. Note that the `Automobile` class, which is defined and instantiated in the example, is tagged with the attribute. + The following example creates a .resx file named `CarResources.resx` that stores six strings, an icon, and two application-defined objects (two `Automobile` objects). To store the icon and the `Automobile` objects, it calls the method. Note that the `Automobile` class, which is defined and instantiated in the example, is tagged with the attribute. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceWriter/Overview/create1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceWriter/Overview/create1.vb" id="Snippet1"::: @@ -739,12 +739,12 @@ is called. + The resource is not written until is called. ## Examples - The following example creates a .resx file named `CarResources.resx` that stores six strings, an icon, and two application-defined objects (two `Automobile` objects). To store the strings, it calls the method. + The following example creates a .resx file named `CarResources.resx` that stores six strings, an icon, and two application-defined objects (two `Automobile` objects). To store the strings, it calls the method. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceWriter/Overview/create1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceWriter/Overview/create1.vb" id="Snippet1"::: @@ -897,7 +897,7 @@ . + Calling this method is the equivalent of calling . ]]> @@ -975,9 +975,9 @@ method calls the method, if necessary, before releasing managed and unmanaged system resources. + The method calls the method, if necessary, before releasing managed and unmanaged system resources. - Calling allows the system resources used by the to be reallocated for other purposes. For more information about , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). + Calling allows the system resources used by the to be reallocated for other purposes. For more information about , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). ]]> @@ -1018,9 +1018,9 @@ method calls the method, if necessary, before releasing managed and unmanaged system resources. + The method calls the method, if necessary, before releasing managed and unmanaged system resources. - This method is called by the public method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + This method is called by the public method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. @@ -1098,9 +1098,9 @@ method writes the resources to the output file or stream. If you want to write the resources as well as close the output file or stream, call the method. + The method writes the resources to the output file or stream. If you want to write the resources as well as close the output file or stream, call the method. - The method can be called only once. After calling the method, all methods other than will throw an exception. + The method can be called only once. After calling the method, all methods other than will throw an exception. ]]> diff --git a/xml/System.Resources/ResourceManager.xml b/xml/System.Resources/ResourceManager.xml index ea60cf8c9e8..b3b158f7c1c 100644 --- a/xml/System.Resources/ResourceManager.xml +++ b/xml/System.Resources/ResourceManager.xml @@ -324,7 +324,7 @@ The individual culture-specific resource files should be contained in satellite assemblies, and the default culture's resource file should be contained in the main assembly. A satellite assembly is assumed to contain resources for a single culture specified in that assembly's manifest, and is loaded as necessary. > [!NOTE] -> To retrieve resources from .resources files directly instead of retrieving them from assemblies, you must call the method instead to instantiate a object. +> To retrieve resources from .resources files directly instead of retrieving them from assemblies, you must call the method instead to instantiate a object. If the resource file identified by `baseName` cannot be found in `assembly`, the method instantiates a object, but the attempt to retrieve a specific resource throws an exception, typically . For information about diagnosing the cause of the exception, see the "Handling the MissingManifestResourceException Exception" section of the class topic. @@ -392,12 +392,12 @@ > [!IMPORTANT] > The property value of a resource file that is compiled and embedded from the command line does not include a namespace name unless you explicitly include one when compiling the file. On the other hand, the property value of a resource file that is compiled and embedded within the Visual Studio environment typically does include the default namespace name. - The property value is the same as the string passed to the or constructor when instantiating a instance. + The property value is the same as the string passed to the or constructor when instantiating a instance. ## Examples - You can determine the names of embedded .resources files by compiling and running the following utility. This is a console app that accepts the name of a main assembly or satellite assembly as a command-line parameter. It displays the strings that should be provided as the `baseName` parameter of the or constructor so that the resource manager can correctly identify the resource. + You can determine the names of embedded .resources files by compiling and running the following utility. This is a console app that accepts the name of a main assembly or satellite assembly as a command-line parameter. It displays the strings that should be provided as the `baseName` parameter of the or constructor so that the resource manager can correctly identify the resource. :::code language="csharp" source="~/snippets/csharp/System.Resources/MissingManifestResourceException/Overview/resourcenames.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceManager/BaseName/resourcenames.vb" id="Snippet4"::: @@ -512,10 +512,10 @@ ## Remarks This method returns a resource manager that retrieves resources from a .resources file that is not embedded in an assembly. You can use this object to load resources for an ASP.NET page or to test a implementation. For an example that retrieves resources from a standalone .resources file, see the [Retrieving Resources](/dotnet/framework/resources/retrieving-resources-in-desktop-apps) article. - This method lets you specify a implementation. If you do not want a specific implementation, but would like to use a custom resource file format, you should derive from the class, override the and methods, and pass that type to this constructor. + This method lets you specify a implementation. If you do not want a specific implementation, but would like to use a custom resource file format, you should derive from the class, override the and methods, and pass that type to this constructor. > [!CAUTION] -> Using standalone .resources files in an ASP.NET app will break XCOPY deployment, because the resources remain locked until they are explicitly released by the method. If you want to deploy resources with your ASP.NET apps, compile your .resources files into satellite assemblies. +> Using standalone .resources files in an ASP.NET app will break XCOPY deployment, because the resources remain locked until they are explicitly released by the method. If you want to deploy resources with your ASP.NET apps, compile your .resources files into satellite assemblies. ]]> @@ -822,7 +822,7 @@ method is useful only if you write your own class that derives from the class. + The method is useful only if you write your own class that derives from the class. This method uses the property as part of the file name for all cultures other than the invariant culture. This method does not look in an assembly's manifest or touch the disk, and is used only to construct a resource file name (suitable for passing to the constructor) or a manifest resource blob name. @@ -903,12 +903,12 @@ uses resource fallback rules to load an appropriate resource. If `tryParents` is `false` and a culture-specific resource set cannot be found, the method returns `null`. For more information about resource fallback, see "The Resource Fallback Process" section in the [Packaging and Deploying Resources](/dotnet/framework/resources/packaging-and-deploying-resources-in-desktop-apps) article. + The resource set that is returned represents the resources that are localized for the specified culture. If the resources have not been localized for that culture and `tryParents` is `true`, uses resource fallback rules to load an appropriate resource. If `tryParents` is `false` and a culture-specific resource set cannot be found, the method returns `null`. For more information about resource fallback, see "The Resource Fallback Process" section in the [Packaging and Deploying Resources](/dotnet/framework/resources/packaging-and-deploying-resources-in-desktop-apps) article. ## Examples - The following example calls the method to retrieve culture-specific resources for the French (France) culture. It then enumerates all of the resources in the resource set. It contains the source code for an executable named ShowNumbers.exe. The example includes two text files that contain the names of numbers. The first, NumberResources.txt, contains the names of numbers from one to ten in the English language: + The following example calls the method to retrieve culture-specific resources for the French (France) culture. It then enumerates all of the resources in the resource set. It contains the source code for an executable named ShowNumbers.exe. The example includes two text files that contain the names of numbers. The first, NumberResources.txt, contains the names of numbers from one to ten in the English language: ```txt one=one @@ -1117,7 +1117,7 @@ If you change the value of the `createIfNotExists` argument to `false`, the meth method takes the name of a resource that is stored as a object, gets the value of the resource, and returns an object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. + The method takes the name of a resource that is stored as a object, gets the value of the resource, and returns an object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. The returned resource is localized for the UI culture of the current thread, which is defined by the property. If the resource is not localized for that culture, the resource manager uses fallback rules to load an appropriate resource. If no usable set of localized resources is found, the falls back on the default culture's resources. If a resource set for the default culture is not found, the method throws a exception or, if the resource set is expected to reside in a satellite assembly, a exception. If the resource manager can load an appropriate resource set but cannot find a resource named `name`, the method returns `null`. @@ -1126,7 +1126,7 @@ If you change the value of the `createIfNotExists` argument to `false`, the meth ## Examples - The following example uses the method to retrieve a bitmap that is used in an app's opening splash window. The following source code from a file named CreateResources.cs (for C#) or CreateResources.vb (for Visual Basic) generates a .resx file named AppResources.resx that contains the serialized image. In this case, the image is loaded from a file named SplashScreen.jpg; you can modify the file name to substitute your own image. + The following example uses the method to retrieve a bitmap that is used in an app's opening splash window. The following source code from a file named CreateResources.cs (for C#) or CreateResources.vb (for Visual Basic) generates a .resx file named AppResources.resx that contains the serialized image. In this case, the image is loaded from a file named SplashScreen.jpg; you can modify the file name to substitute your own image. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceManager/Overview/createresources.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceManager/GetStream/createresources.vb" id="Snippet4"::: @@ -1225,7 +1225,7 @@ csc GetStream.cs /resource:AppResources.resources method takes the name of a resource that is stored as a object, gets the value of the resource, and returns an object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. + The method takes the name of a resource that is stored as a object, gets the value of the resource, and returns an object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. The returned resource is localized for the culture that is specified by `culture`, or for the culture that is specified by the property if `culture` is `null`. If the resource is not localized for that culture, the resource manager uses fallback rules to load an appropriate resource. If no usable set of localized resources is found, the falls back on the default culture's resources. If a resource set for the default culture is not found, the method throws a exception or, if the resource set is expected to reside in a satellite assembly, a exception. If the resource manager can load an appropriate resource set but cannot find a resource named `name`, the method returns `null`. @@ -1478,12 +1478,12 @@ csc GetStream.cs /resource:AppResources.resources property is `false`, a resource with the name "Resource" is not equivalent to the resource with the name "resource". If is `true`, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that when is `true`, the and methods perform case-insensitive string comparisons by using the invariant culture. The advantage is that results of case-insensitive string comparisons performed by these methods are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. + If the value of the property is `false`, a resource with the name "Resource" is not equivalent to the resource with the name "resource". If is `true`, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that when is `true`, the and methods perform case-insensitive string comparisons by using the invariant culture. The advantage is that results of case-insensitive string comparisons performed by these methods are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. - For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). However, because the comparison is conducted by using the casing rules of the invariant culture if is `true`, this comparison succeeds. + For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). However, because the comparison is conducted by using the casing rules of the invariant culture if is `true`, this comparison succeeds. > [!NOTE] -> For performance reasons, it is best to always specify the correct case for your resource names. Setting to `true` can cause a significant increase in working set and a significant decline in performance. +> For performance reasons, it is best to always specify the correct case for your resource names. Setting to `true` can cause a significant increase in working set and a significant decline in performance. ]]> @@ -1727,12 +1727,12 @@ csc GetStream.cs /resource:AppResources.resources This method will shrink the working set in a running app. Any future resource lookups on this object will be as expensive as the first lookup, because the resource manager will have to search and load resources again. This can be useful in some complex threading scenarios, where creating a new object is the appropriate behavior. > [!NOTE] -> Starting with the .NET Framework version 2.0, the method is not thread safe with respect to , , and operations. The advantage of this change is a performance improvement for multiple threads that access resources. However, if you call the method in one thread while simultaneously getting a resource in another thread, the get operation can throw an exception. +> Starting with the .NET Framework version 2.0, the method is not thread safe with respect to , , and operations. The advantage of this change is a performance improvement for multiple threads that access resources. However, if you call the method in one thread while simultaneously getting a resource in another thread, the get operation can throw an exception. You can also use this method in situations where the managed instances for the resources created by the current resource manager have to be released deterministically, without waiting for the resource manager to go completely out of scope and be garbage collected. > [!NOTE] -> Calling this method does not unload satellite assemblies. To unload satellite assemblies, use the method . +> Calling this method does not unload satellite assemblies. To unload satellite assemblies, use the method . ]]> diff --git a/xml/System.Resources/ResourceReader.xml b/xml/System.Resources/ResourceReader.xml index d4d3af43edf..298a06315d6 100644 --- a/xml/System.Resources/ResourceReader.xml +++ b/xml/System.Resources/ResourceReader.xml @@ -174,7 +174,7 @@ constructor instantiates a object that retrieves resources either from a standalone .resources file or from a .resources file that is embedded in an assembly. To read from a standalone .resources file, instantiate a object and pass it to the constructor. To read from an embedded .resources file, call the method with the case-sensitive name of the .resources file, and pass the returned object to the constructor. + The constructor instantiates a object that retrieves resources either from a standalone .resources file or from a .resources file that is embedded in an assembly. To read from a standalone .resources file, instantiate a object and pass it to the constructor. To read from an embedded .resources file, call the method with the case-sensitive name of the .resources file, and pass the returned object to the constructor. [!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)] @@ -277,7 +277,7 @@ If the Visual Basic example is named `Example.vb`, you can compile it by using t constructor instantiates a object that retrieves resources from a standalone .resources file. To retrieve resources from an embedded .resources file, use the constructor. + The constructor instantiates a object that retrieves resources from a standalone .resources file. To retrieve resources from an embedded .resources file, use the constructor. [!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)] @@ -368,12 +368,12 @@ Label11="Mobile Phone:" can be safely called multiple times. + can be safely called multiple times. ## Examples - The following example moves through a file's resources and displays all the key/value pairs it finds. The code then uses the method to shut down the and to release all resources used by it. + The following example moves through a file's resources and displays all the key/value pairs it finds. The code then uses the method to shut down the and to release all resources used by it. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceReader/Close/getenumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceReader/Close/getenumerator.vb" id="Snippet1"::: @@ -434,9 +434,9 @@ Label11="Mobile Phone:" , call to release all resources used by this instance. You should eliminate further references to this instance so that the garbage collector can reclaim the memory of the instance instead of keeping it alive for finalization. + When you are finished using this instance of , call to release all resources used by this instance. You should eliminate further references to this instance so that the garbage collector can reclaim the memory of the instance instead of keeping it alive for finalization. - calls the private Dispose(Boolean) method, which contains the code to release managed and unmanaged resources. For more information, see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + calls the private Dispose(Boolean) method, which contains the code to release managed and unmanaged resources. For more information, see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). ]]> @@ -500,7 +500,7 @@ Label11="Mobile Phone:" method and then repeatedly calling the method on the returned object until the method returns `false`. The resource name is available from the property; its value from the property. The example illustrates how to enumerate resources in this way. + Typically, you enumerate resources by calling the method and then repeatedly calling the method on the returned object until the method returns `false`. The resource name is available from the property; its value from the property. The example illustrates how to enumerate resources in this way. The implementation of the property by the class can throw the following exceptions: @@ -516,10 +516,10 @@ Label11="Mobile Phone:" The type to which the data belongs cannot be found. - You can handle the exception by calling the method to retrieve information about the data type and the byte array assigned to the named resource. For more information, see the "Retrieving Resources by Name with GetResourceData" section in the class topic. + You can handle the exception by calling the method to retrieve information about the data type and the byte array assigned to the named resource. For more information, see the "Retrieving Resources by Name with GetResourceData" section in the class topic. > [!IMPORTANT] -> The class includes two methods that return enumerators. The method returns an interface object and is the recommended method to call when enumerating resources. +> The class includes two methods that return enumerators. The method returns an interface object and is the recommended method to call when enumerating resources. ## Examples The example in this section uses the following .txt file named `PatientForm.txt` to define the resources used by an application. @@ -610,7 +610,7 @@ Label11="Mobile Phone:" method retrieves the value of a named resource as a byte array. It is typically used when the property throws an exception when it tries to retrieve the value of a resource. + The method retrieves the value of a named resource as a byte array. It is typically used when the property throws an exception when it tries to retrieve the value of a resource. `resourceType` is a string that represents the data type of the resource. It can be any of the following values: @@ -618,9 +618,9 @@ Label11="Mobile Phone:" |ResourceTypeCode value|Description| |----------------------------|-----------------| - |`ResourceTypeCode.ByteArray`|The data is a byte array. This data type commonly results from the call to the method.| - |`ResourceTypeCode.Null`|The data is a null reference. This data type commonly results from the call to the method with an object whose value is `null`.| - |`ResourceTypeCode.Stream`|The data is stored in a stream. This data type commonly results from the call to the or method.| + |`ResourceTypeCode.ByteArray`|The data is a byte array. This data type commonly results from the call to the method.| + |`ResourceTypeCode.Null`|The data is a null reference. This data type commonly results from the call to the method with an object whose value is `null`.| + |`ResourceTypeCode.Stream`|The data is stored in a stream. This data type commonly results from the call to the or method.| Assuming that `resourceData` has not been corrupted, it can usually be converted from a byte array back to its original value by calling a or method. @@ -628,7 +628,7 @@ Label11="Mobile Phone:" `Extensions.Person, Utility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null` -- The string used to describe the data type in the method call. +- The string used to describe the data type in the method call. ]]> @@ -696,7 +696,7 @@ Label11="Mobile Phone:" is an explicit interface implementation. It can be used only when the instance is cast to an interface. The recommended approach to enumerating the resources in a .resources file is to call the method of the object returned by the method. + is an explicit interface implementation. It can be used only when the instance is cast to an interface. The recommended approach to enumerating the resources in a .resources file is to call the method of the object returned by the method. ]]> diff --git a/xml/System.Resources/ResourceSet.xml b/xml/System.Resources/ResourceSet.xml index a5e24e4b058..5d20a86b668 100644 --- a/xml/System.Resources/ResourceSet.xml +++ b/xml/System.Resources/ResourceSet.xml @@ -87,10 +87,10 @@ The class enumerates over an , loading every name and value, and storing them in a . A custom can be used. - You can instantiate a object that represents the resources of a specific culture by calling the method. + You can instantiate a object that represents the resources of a specific culture by calling the method. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. ]]> @@ -366,15 +366,15 @@ ## Remarks All calls to methods on the after a call to this method might fail. - can be safely called multiple times. + can be safely called multiple times. > [!NOTE] -> The current implementation of calls (`true`). +> The current implementation of calls (`true`). ## Examples - The following code example uses the method to release all resources used by the calling instance. + The following code example uses the method to release all resources used by the calling instance. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceSet/.ctor/getenumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceSet/.ctor/getenumerator.vb" id="Snippet1"::: @@ -442,10 +442,10 @@ when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. > [!NOTE] -> The current method is the implementation of . This implementation calls (`true`). +> The current method is the implementation of . This implementation calls (`true`). ]]> @@ -661,13 +661,13 @@ ## Remarks Enumerators only allow reading the data in the collection. Enumerators cannot be used to modify the underlying collection. - Initially, the enumerator is positioned before the first element in the collection. also brings the enumerator back to this position. At this position, calling throws an exception. Therefore, you must call to advance the enumerator to the first element of the collection before reading the value of . + Initially, the enumerator is positioned before the first element in the collection. also brings the enumerator back to this position. At this position, calling throws an exception. Therefore, you must call to advance the enumerator to the first element of the collection before reading the value of . - returns the same object until either or is called. sets to the next element. + returns the same object until either or is called. sets to the next element. - After the end of the collection is passed, the enumerator is positioned after the last element in the collection, and calling returns `false`. If the last call to returned `false`, calling throws an exception. To set to the first element of the collection again, you can call followed by . + After the end of the collection is passed, the enumerator is positioned after the last element in the collection, and calling returns `false`. If the last call to returned `false`, calling throws an exception. To set to the first element of the collection again, you can call followed by . - An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying or deleting elements, the enumerator is irrecoverably invalidated and the next call to or throws an . If the collection is modified between and , will return the element that it is set to, even if the enumerator is already invalidated. + An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying or deleting elements, the enumerator is irrecoverably invalidated and the next call to or throws an . If the collection is modified between and , will return the element that it is set to, even if the enumerator is already invalidated. You can use the property to access the value stored in the current element. Use the property to access the key of the current element. Use the property to access the value of the current element. @@ -676,7 +676,7 @@ ## Examples - The following example demonstrates how to create a `rs` for the file `items.resources`. Next, the method is used to create an for `rs`. The iterates through `rs` and displays the contents to the console. + The following example demonstrates how to create a `rs` for the file `items.resources`. Next, the method is used to create an for `rs`. The iterates through `rs` and displays the contents to the console. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceSet/.ctor/getenumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceSet/.ctor/getenumerator.vb" id="Snippet1"::: @@ -753,7 +753,7 @@ . + The name of the resource object is case sensitive. For a case-insensitive search, use . ]]> @@ -820,7 +820,7 @@ . The advantage is that results of case-insensitive string comparisons performed by this method are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. + If the value of the `ignoreCase` parameter is `true`, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that this method always performs case-insensitive string comparisons using . The advantage is that results of case-insensitive string comparisons performed by this method are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). Using the `GetObject` method with `ignoreCase` set to `true`, this comparison succeeds. @@ -958,7 +958,7 @@ . The advantage is that results of case-insensitive string comparisons performed by this method are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. + If the value of the `ignoreCase` parameter is `true`, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that this method always performs case-insensitive string comparisons using . The advantage is that results of case-insensitive string comparisons performed by this method are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). Using the `GetString` method with `ignoreCase` set to `true`, this comparison succeeds. diff --git a/xml/System.Resources/ResourceWriter.xml b/xml/System.Resources/ResourceWriter.xml index 8d6f3673d14..f37b019f312 100644 --- a/xml/System.Resources/ResourceWriter.xml +++ b/xml/System.Resources/ResourceWriter.xml @@ -79,12 +79,12 @@ ## Remarks provides a default implementation of the interface. It enables you to programmatically create a binary resource (.resources) file. - Resources are specified as name and value pairs using the method. Resource names are case-sensitive when used for lookups, but to more easily support authoring tools and help eliminate bugs, will not allow a .resources file to have names that vary only by case. The class enables you to create string, object, and binary resources. Binary resources can be written to the resource file as a byte array or a stream. + Resources are specified as name and value pairs using the method. Resource names are case-sensitive when used for lookups, but to more easily support authoring tools and help eliminate bugs, will not allow a .resources file to have names that vary only by case. The class enables you to create string, object, and binary resources. Binary resources can be written to the resource file as a byte array or a stream. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. - To create a resources file, create a with a unique file name, call at least once, call to write the resources file to disk, and then call to close the file. Calling will implicitly call if you do not explicitly call . + To create a resources file, create a with a unique file name, call at least once, call to write the resources file to disk, and then call to close the file. Calling will implicitly call if you do not explicitly call . The resources will not necessarily be written in the same order they were added. @@ -303,14 +303,14 @@ is called. + The resource is not written until is called. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add a graphics image that has been read as an array of bytes to a object. + The following example uses the method to add a graphics image that has been read as an array of bytes to a object. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResource/addresource_byt1.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/AddResource/addresource_byt1.vb" id="Snippet4"::: @@ -380,12 +380,12 @@ ## Remarks You can specify any stream that supports the property for `value`. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add a graphics image that has been saved to a object to a object. + The following example uses the method to add a graphics image that has been saved to a object to a object. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResource/addresource_str1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/AddResource/addresource_str1.vb" id="Snippet2"::: @@ -465,14 +465,14 @@ ## Remarks `value` must be serializable. - The resource is not written until the method is called. + The resource is not written until the method is called. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add object data to a binary resources file. + The following example uses the method to add object data to a binary resources file. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResource/addresource_obj1.cs" id="Snippet1"::: @@ -551,14 +551,14 @@ is called. + The resource is not written until is called. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add string resources to a object. + The following example uses the method to add string resources to a object. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/.ctor/resourcewritercstr1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/.ctor/resourcewritercstr1.vb" id="Snippet1"::: @@ -632,12 +632,12 @@ ## Remarks You can specify any stream that supports the property for `value`. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add a graphics image that has been saved to a object to a object. + The following example uses the method to add a graphics image that has been saved to a object to a object. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResource/addresource_str2.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/AddResource/addresource_str2.vb" id="Snippet3"::: @@ -705,7 +705,7 @@ method to add a resource in binary form (that is, as an array of bytes) to the list of resources to be written. You must specify the name of the resource, the type name of the data contained in the resource, and the binary representation of the data itself. After you have added each resource you require, use the method to write the list of resources to the resources file or stream that was specified in the constructor. + Use the method to add a resource in binary form (that is, as an array of bytes) to the list of resources to be written. You must specify the name of the resource, the type name of the data contained in the resource, and the binary representation of the data itself. After you have added each resource you require, use the method to write the list of resources to the resources file or stream that was specified in the constructor. `typeName` is a string that represents the data type of the resource. It can be any of the following values: @@ -721,12 +721,12 @@ `Extensions.Person, Utility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null` - A parallel method for reading resource data written with the method is . + A parallel method for reading resource data written with the method is . ## Examples - The following example uses the method to write two integer values to a .resources file, and then uses a object to retrieve them. + The following example uses the method to write two integer values to a .resources file, and then uses a object to retrieve them. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResourceData/addresourcedata.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/AddResourceData/addresourcedata.vb" id="Snippet1"::: @@ -789,12 +789,12 @@ is called implicitly by , if required. + is called implicitly by , if required. ## Examples - The following example uses the method to write all resource objects in a class to the output stream. The code then shuts down the writer. + The following example uses the method to write all resource objects in a class to the output stream. The code then shuts down the writer. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/.ctor/resourcewritercstr1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/.ctor/resourcewritercstr1.vb" id="Snippet1"::: @@ -853,12 +853,12 @@ . + The implementation of this method is the same as . ## Examples - The following code example uses the method to write all resource objects in a class to the output stream. The code then shuts down the writer and make the writer's resources available for other processes. + The following code example uses the method to write all resource objects in a class to the output stream. The code then shuts down the writer and make the writer's resources available for other processes. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/Dispose/resourcewriterdispose.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/Dispose/resourcewriterdispose.vb" id="Snippet1"::: @@ -927,16 +927,16 @@ method is called implicitly by the method if it is not called by your application code. + The method is called implicitly by the method if it is not called by your application code. - can only be called once, after all calls to and have been made. If an exception occurs while writing the resources, the output stream will be closed to prevent writing invalid information. + can only be called once, after all calls to and have been made. If an exception occurs while writing the resources, the output stream will be closed to prevent writing invalid information. - does not close the output stream in normal cases. Unless you are combining extra data with your .resources file or need access to the stream afterwards, you should call after calling , or simply call . + does not close the output stream in normal cases. Unless you are combining extra data with your .resources file or need access to the stream afterwards, you should call after calling , or simply call . ## Examples - The following code example uses the method to write all resource objects in a class to the output stream + The following code example uses the method to write all resource objects in a class to the output stream :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/Generate/resourcewritergenerate.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/Generate/resourcewritergenerate.vb" id="Snippet1"::: diff --git a/xml/System.Resources/UltimateResourceFallbackLocation.xml b/xml/System.Resources/UltimateResourceFallbackLocation.xml index be96d2c9559..1726feb534b 100644 --- a/xml/System.Resources/UltimateResourceFallbackLocation.xml +++ b/xml/System.Resources/UltimateResourceFallbackLocation.xml @@ -65,13 +65,13 @@ Specifies whether a object looks for the resources of the app's default culture in the main assembly or in a satellite assembly. - enumeration is used with the constructor to specify whether a object retrieves the resources of the app's default culture from the main app assembly (the default), or from a satellite assembly. In a localized application, the resources of the default culture are used if no culture-specific resources are found after using the resource fallback process. For more information, see the "Resource Fallback Process" section in [Packaging and Deploying Resources](/dotnet/framework/resources/packaging-and-deploying-resources-in-desktop-apps). - - If you specify a value of MainAssembly or no value to the attribute and resource manager cannot load a resource set that belongs to the default culture, it throws a exception. If you specify a value of Satellite to the and resource manager cannot load a resource set that belongs to the default culture, it throws a exception. - + enumeration is used with the constructor to specify whether a object retrieves the resources of the app's default culture from the main app assembly (the default), or from a satellite assembly. In a localized application, the resources of the default culture are used if no culture-specific resources are found after using the resource fallback process. For more information, see the "Resource Fallback Process" section in [Packaging and Deploying Resources](/dotnet/framework/resources/packaging-and-deploying-resources-in-desktop-apps). + + If you specify a value of MainAssembly or no value to the attribute and resource manager cannot load a resource set that belongs to the default culture, it throws a exception. If you specify a value of Satellite to the and resource manager cannot load a resource set that belongs to the default culture, it throws a exception. + ]]> diff --git a/xml/System.Runtime.Caching.Hosting/IApplicationIdentifier.xml b/xml/System.Runtime.Caching.Hosting/IApplicationIdentifier.xml index 9b2dd3841cb..b30a2f0cccb 100644 --- a/xml/System.Runtime.Caching.Hosting/IApplicationIdentifier.xml +++ b/xml/System.Runtime.Caching.Hosting/IApplicationIdentifier.xml @@ -58,9 +58,9 @@ method is typically implemented by a .NET Framework host environment in order to construct an application identifier for an implementation. A implementation uses this information to identify the application domain that is currently running. + The method is typically implemented by a .NET Framework host environment in order to construct an application identifier for an implementation. A implementation uses this information to identify the application domain that is currently running. - For example, in ASP.NET, the cache uses an application identifier to construct identifiers for cache performance counters. The cache calls the method that is implemented by the host environment and the host returns the identifier. This provides names for performance counter instances that can be distinguished between application domains when multiple application domains are running. + For example, in ASP.NET, the cache uses an application identifier to construct identifiers for cache performance counters. The cache calls the method that is implemented by the host environment and the host returns the identifier. This provides names for performance counter instances that can be distinguished between application domains when multiple application domains are running. ]]> diff --git a/xml/System.Runtime.Caching.Hosting/IFileChangeNotificationSystem.xml b/xml/System.Runtime.Caching.Hosting/IFileChangeNotificationSystem.xml index 0e2d454f1ea..ea1a5da9ae5 100644 --- a/xml/System.Runtime.Caching.Hosting/IFileChangeNotificationSystem.xml +++ b/xml/System.Runtime.Caching.Hosting/IFileChangeNotificationSystem.xml @@ -72,7 +72,7 @@ interface in order to register file paths for monitoring with the host environment. The method is called by implementers of the interface in order to register a file or directory for change monitoring. + This method is used by custom cache objects and custom change monitors that implement the host environment's interface in order to register file paths for monitoring with the host environment. The method is called by implementers of the interface in order to register a file or directory for change monitoring. ]]> @@ -106,7 +106,7 @@ method must be called by custom caches and custom change monitors that are being disposed by the host environment in order to stop monitoring file paths and directories. + The method must be called by custom caches and custom change monitors that are being disposed by the host environment in order to stop monitoring file paths and directories. ]]> diff --git a/xml/System.Runtime.Caching.Hosting/IMemoryCacheManager.xml b/xml/System.Runtime.Caching.Hosting/IMemoryCacheManager.xml index 7a6c8aa0bb5..94a59747d69 100644 --- a/xml/System.Runtime.Caching.Hosting/IMemoryCacheManager.xml +++ b/xml/System.Runtime.Caching.Hosting/IMemoryCacheManager.xml @@ -60,7 +60,7 @@ method to release the reference. When a cache is being disposed, it should call the method to make sure that no reference to the cache is held on the host. + If a cache has previously registered itself with the host environment, the cache can call the method to release the reference. When a cache is being disposed, it should call the method to make sure that no reference to the cache is held on the host. ]]> @@ -94,7 +94,7 @@ method to periodically report the size of the cache's memory footprint to the host environment. + A well-behaved cache implementation should use the method to periodically report the size of the cache's memory footprint to the host environment. The cache implementation that reports the size also passes a reference to itself as a parameter. This enables the host environment to perform the following tasks: diff --git a/xml/System.Runtime.Caching/CacheEntryChangeMonitor.xml b/xml/System.Runtime.Caching/CacheEntryChangeMonitor.xml index 9369c451bbd..40309cab921 100644 --- a/xml/System.Runtime.Caching/CacheEntryChangeMonitor.xml +++ b/xml/System.Runtime.Caching/CacheEntryChangeMonitor.xml @@ -28,7 +28,7 @@ class provides abstract, read-only properties that can be implemented for monitoring cache entries. This class is used when a cache implementation has to monitor changes to entries in its own cache. For caches that are cache implementations, an instance of the type is returned by the method. + The class provides abstract, read-only properties that can be implemented for monitoring cache entries. This class is used when a cache implementation has to monitor changes to entries in its own cache. For caches that are cache implementations, an instance of the type is returned by the method. ]]> diff --git a/xml/System.Runtime.Caching/CacheEntryRemovedArguments.xml b/xml/System.Runtime.Caching/CacheEntryRemovedArguments.xml index 79fdbd84a24..a421be2b9cf 100644 --- a/xml/System.Runtime.Caching/CacheEntryRemovedArguments.xml +++ b/xml/System.Runtime.Caching/CacheEntryRemovedArguments.xml @@ -25,13 +25,13 @@ Provides information about a cache entry that was removed from the cache. - class represent the cache entry itself, the instance that the entry was removed from, and the reason for the removal. The constructor of the class uses these arguments to create a new instance of the class. - - A object is typically created in a callback method to pass information about a removed cache entry back to an application when a cache entry is removed from the cache. - + class represent the cache entry itself, the instance that the entry was removed from, and the reason for the removal. The constructor of the class uses these arguments to create a new instance of the class. + + A object is typically created in a callback method to pass information about a removed cache entry back to an application when a cache entry is removed from the cache. + ]]> @@ -63,20 +63,20 @@ An instance of the cached entry that was removed. Initializes a new instance of the class. - class when they want to be notified after a cache entry has been removed from the cache. - - When a cache implementation is about to remove one or more cache entries from the cache, the cache implementation calls the delegate that was registered in the application. When a cache implementation calls the delegate, it typically calls the constructor to pass to the callback a new instance that contains information about the cache entry that is being removed. The callback notifies the application that registered the callback about the cache entry that is being removed. After the constructor returns, the instance contains the details about the removal of the cache entry. - + class when they want to be notified after a cache entry has been removed from the cache. + + When a cache implementation is about to remove one or more cache entries from the cache, the cache implementation calls the delegate that was registered in the application. When a cache implementation calls the delegate, it typically calls the constructor to pass to the callback a new instance that contains information about the cache entry that is being removed. The callback notifies the application that registered the callback about the cache entry that is being removed. After the constructor returns, the instance contains the details about the removal of the cache entry. + ]]> - is . - - -or- - + is . + + -or- + is . @@ -134,11 +134,11 @@ Gets a value that indicates why a cache entry was removed. One of the enumeration values that indicates why the entry was removed. - enumeration indicates one of a predefined set of reasons for the removal, such as that the entry was explicitly removed or that it expired. - + enumeration indicates one of a predefined set of reasons for the removal, such as that the entry was explicitly removed or that it expired. + ]]> diff --git a/xml/System.Runtime.Caching/CacheItem.xml b/xml/System.Runtime.Caching/CacheItem.xml index df64a59857b..48b3981a30d 100644 --- a/xml/System.Runtime.Caching/CacheItem.xml +++ b/xml/System.Runtime.Caching/CacheItem.xml @@ -82,7 +82,7 @@ method overload is called, the property values for and are set to `null`. + When the method overload is called, the property values for and are set to `null`. ]]> @@ -113,7 +113,7 @@ method overload is called, the property value for is set to `null`. + When the method overload is called, the property value for is set to `null`. ]]> diff --git a/xml/System.Runtime.Caching/ChangeMonitor.xml b/xml/System.Runtime.Caching/ChangeMonitor.xml index 2ed862a761a..de3e8d6142a 100644 --- a/xml/System.Runtime.Caching/ChangeMonitor.xml +++ b/xml/System.Runtime.Caching/ChangeMonitor.xml @@ -140,7 +140,7 @@ Note: This automatic call to the dispose method during the event firing only occ method is used to release the instance and related resources. The public method is invoked to coordinate the disposal process with key life-cycle events of derived change-monitor classes (such as initialization), and to release the instance so that the instance can be garbage collected. The method is implemented by derived change-monitor classes to dispose of their managed and unmanaged resources. + The method is used to release the instance and related resources. The public method is invoked to coordinate the disposal process with key life-cycle events of derived change-monitor classes (such as initialization), and to release the instance so that the instance can be garbage collected. The method is implemented by derived change-monitor classes to dispose of their managed and unmanaged resources. ]]> @@ -172,35 +172,35 @@ Note: This automatic call to the dispose method during the event firing only occ method invokes the method of derived classes only one time, the first time it is called. Subsequent calls to the method have no effect. After the method has been called, the property is set to `true`. + The method invokes the method of derived classes only one time, the first time it is called. Subsequent calls to the method have no effect. After the method has been called, the property is set to `true`. - The overload must be called to dispose of a instance. The following are the rules for calling the dispose method: + The overload must be called to dispose of a instance. The following are the rules for calling the dispose method: - Before an item is inserted into the cache, it is the caller's responsibility to dispose of a instance. -- Once cache item and the instances that are associated with it are passed to a cache, the cache implementer that must make sure that is called, even if the insert fails. +- Once cache item and the instances that are associated with it are passed to a cache, the cache implementer that must make sure that is called, even if the insert fails. -- After an item and its associated instances are passed to a cache, the caller must not dispose the dependency because when the method is called, the call is treated as if the dependency has changed. As a result, the method is automatically invoked. +- After an item and its associated instances are passed to a cache, the caller must not dispose the dependency because when the method is called, the call is treated as if the dependency has changed. As a result, the method is automatically invoked. -- Taking these rules into consideration, the method must be called in one of the following ways: +- Taking these rules into consideration, the method must be called in one of the following ways: - - Users must call the method overload if they decide not to insert the derived change-monitor instance into a cache. + - Users must call the method overload if they decide not to insert the derived change-monitor instance into a cache. - - The cache implementation is responsible for calling the overload if the implementation tries to insert the change-monitor instance into an object cache but the insertion fails. When the insertion attempt causes an exception, the cache implementation must dispose any associated dependencies. + - The cache implementation is responsible for calling the overload if the implementation tries to insert the change-monitor instance into an object cache but the insertion fails. When the insertion attempt causes an exception, the cache implementation must dispose any associated dependencies. - If the cache entry is removed, the cache implementation must also dispose the dependency. - The internal implementation of the method automatically calls the method after it calls a callback that is registered through the method. + The internal implementation of the method automatically calls the method after it calls a callback that is registered through the method. > [!NOTE] > This automatic dispose during the event firing only occurs if the initialization of the instance previously completed. - When a derived change monitor's constructor calls the method, if the state of the change monitor has already changed (that is, the state that is monitored has already changed when the constructor was still active) then method will automatically dispose the change monitor. + When a derived change monitor's constructor calls the method, if the state of the change monitor has already changed (that is, the state that is monitored has already changed when the constructor was still active) then method will automatically dispose the change monitor. > [!NOTE] -> Users should not call the method. However, you cannot prevent users from calling the method. Therefore, if they do, the method is invoked. In that case, the cache entry is notified as if the dependency has changed. +> Users should not call the method. However, you cannot prevent users from calling the method. Therefore, if they do, the method is invoked. In that case, the cache entry is notified as if the dependency has changed. - To prevent derived classes from overriding method, the method is not an explicit interface implementation. + To prevent derived classes from overriding method, the method is not an explicit interface implementation. ]]> @@ -235,7 +235,7 @@ Note: This automatic call to the dispose method during the event firing only occ method will invoke the implemented method only one time. + When the value of `disposing` value is `true`, all managed and unmanaged resources are disposed and any references to this object are released so that the derived change-monitor instance can be garbage collected. It is guaranteed that the base method will invoke the implemented method only one time. ]]> @@ -272,7 +272,7 @@ Note: This automatic call to the dispose method during the event firing only occ ## Remarks You can check the value of this property in a derived class to see whether a dependency has changed. - The value is set to `true` when a dependency change occurs (that is, when the method is called). After the method is called by the derived class, the value of the property will be `true`, regardless of whether a instance has been notified by a call to the method. + The value is set to `true` when a dependency change occurs (that is, when the method is called). After the method is called by the derived class, the value of the property will be `true`, regardless of whether a instance has been notified by a call to the method. > [!NOTE] > Callers can check the property to see whether a dependency has changed. However, in a multi-threaded environment, a simpler and more maintainable approach is to insert data into a cache implementation without checking the property. Cache implementations must check the property for you and must not perform an insert or set operation if one or more associated dependencies have already changed. @@ -306,9 +306,9 @@ Note: This automatic call to the dispose method during the event firing only occ method. + If a dependency changes before initialization is complete in a derived class, the constructor of the derived class must invoke the method. - When the method is invoked, the property is automatically set to `true` by the change monitor. As a result, when the change monitor's constructor calls the method, the base class will automatically call the method. If initialization is complete, the method automatically disposes the derived change-monitor instance. + When the method is invoked, the property is automatically set to `true` by the change monitor. As a result, when the change monitor's constructor calls the method, the base class will automatically call the method. If initialization is complete, the method automatically disposes the derived change-monitor instance. ]]> @@ -341,7 +341,7 @@ Note: This automatic call to the dispose method during the event firing only occ method calls the method in a derived class to dispose of the instance. + The property is set to `true` after the base method calls the method in a derived class to dispose of the instance. ]]> @@ -380,9 +380,9 @@ Note: This automatic call to the dispose method during the event firing only occ > [!NOTE] > The base cache extensibility API has no requirement for explicit dependency on the type of state. - The implementation of the method automatically determines whether the state of the monitor has already changed at the time method is called. If the property is `true`, then the method automatically calls the event handler, that was registered, through the method. This occurs because it is possible that from the time a cache implementation creates a change monitor, to the time a cache implementation gets the monitor and wires itself up to it, the underlying monitored state has changed. If the state has already changed then the object that is passed to the method is `null`. + The implementation of the method automatically determines whether the state of the monitor has already changed at the time method is called. If the property is `true`, then the method automatically calls the event handler, that was registered, through the method. This occurs because it is possible that from the time a cache implementation creates a change monitor, to the time a cache implementation gets the monitor and wires itself up to it, the underlying monitored state has changed. If the state has already changed then the object that is passed to the method is `null`. - The method can be invoked only one time, and will throw an exception on subsequent calls. + The method can be invoked only one time, and will throw an exception on subsequent calls. ]]> @@ -423,9 +423,9 @@ Note: This automatic call to the dispose method during the event firing only occ method is called when dependency changes occur. The method is also invoked when a change-monitor instance is disposed but the disposal occurs only if the callback has not already been invoked. + Typically, the method is called when dependency changes occur. The method is also invoked when a change-monitor instance is disposed but the disposal occurs only if the callback has not already been invoked. - If the method is called before the method is called, the state data from the call to the method is saved by the cache implementation. Also, the callback to the method is invoked immediately when the method is invoked. + If the method is called before the method is called, the state data from the call to the method is saved by the cache implementation. Also, the callback to the method is invoked immediately when the method is invoked. ]]> diff --git a/xml/System.Runtime.Caching/HostFileChangeMonitor.xml b/xml/System.Runtime.Caching/HostFileChangeMonitor.xml index 26332e9575d..f151723e13f 100644 --- a/xml/System.Runtime.Caching/HostFileChangeMonitor.xml +++ b/xml/System.Runtime.Caching/HostFileChangeMonitor.xml @@ -98,7 +98,7 @@ constructor must provide a non-null value for the `filePaths` parameter. At a minimum, the constructor validates the collection of paths that is passed into it and then initializes monitoring for those paths. + Calls to the constructor must provide a non-null value for the `filePaths` parameter. At a minimum, the constructor validates the collection of paths that is passed into it and then initializes monitoring for those paths. > [!NOTE] > The constructor performs only string validation of the path name. It does not canonicalize paths or validate that the paths exist. diff --git a/xml/System.Runtime.Caching/MemoryCache.xml b/xml/System.Runtime.Caching/MemoryCache.xml index 4020b2cdf2f..e41cfdaf8eb 100644 --- a/xml/System.Runtime.Caching/MemoryCache.xml +++ b/xml/System.Runtime.Caching/MemoryCache.xml @@ -42,7 +42,7 @@ The class does not allow `null` as a value in the cache. Any attempt to add or change a cache entry with a value of `null` will fail. - The type does not implement *cache regions*. Therefore, when you call methods that implement base methods that contain a parameter for regions, do not pass a value for the parameter. The methods that use the region parameter all supply a default `null` value. For example, the method overload has a `regionName` parameter whose default value is `null`. + The type does not implement *cache regions*. Therefore, when you call methods that implement base methods that contain a parameter for regions, do not pass a value for the parameter. The methods that use the region parameter all supply a default `null` value. For example, the method overload has a `regionName` parameter whose default value is `null`. @@ -136,11 +136,11 @@ private void btnGet_Click(object sender, EventArgs e) ## Remarks When the class is initialized, it checks for configuration entries that might have been overridden by using the optional `config` parameter in the constructor. You can pass the following parameters in the `config` parameter. All values can be passed as integers. -- +- -- +- -- +- When this constructor is invoked, configuration settings are first retrieved from application configuration files. If no configuration entries exist in the application configuration file, only the settings provided in `config` are applied. If the configuration entries in the application configuration exist, and if information is also passed in `config`, the information in the `config` overrides the information that is read from the configuration file. @@ -222,7 +222,7 @@ private void btnGet_Click(object sender, EventArgs e) ## Remarks > [!WARNING] -> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. +> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. ]]> @@ -239,7 +239,7 @@ private void btnGet_Click(object sender, EventArgs e) method overloads are used to insert a cache entry into the cache. If a cache entry with a matching key does not exist, these methods insert a new entry. If a cache entry with a matching key already exists, they return the existing entry. + The method overloads are used to insert a cache entry into the cache. If a cache entry with a matching key does not exist, these methods insert a new entry. If a cache entry with a matching key already exists, they return the existing entry. ]]> @@ -277,7 +277,7 @@ private void btnGet_Click(object sender, EventArgs e) The `item` parameter supplies the key and the value that is used by the method. If the cache has a cache entry with the same key as the key of the `item` parameter, the method returns the existing entry as a instance. If there is no existing cache entry, the method creates a new one by using the key and value supplied by the `item` parameter, and with the eviction details specified by `policy`. > [!WARNING] -> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. +> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. ]]> @@ -326,10 +326,10 @@ private void btnGet_Click(object sender, EventArgs e) method overload returns `null`. If a matching cache entry exists, the existing entry is returned. + If the cache does not have a cache entry whose key matches the `key` parameter, a new cache entry is created, and the method overload returns `null`. If a matching cache entry exists, the existing entry is returned. > [!WARNING] -> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. +> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. ]]> @@ -383,7 +383,7 @@ private void btnGet_Click(object sender, EventArgs e) ## Remarks > [!WARNING] -> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. +> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. ]]> @@ -500,11 +500,11 @@ You can specify the settings for the method creates a instance. This specialized change monitor is used to monitor the cache entries that are specified in the `keys` collection and to trigger events when the entries change. + The method creates a instance. This specialized change monitor is used to monitor the cache entries that are specified in the `keys` collection and to trigger events when the entries change. A monitored entry is considered to have changed for any of the following reasons: -- The key does not exist at the time of the call to the method. In that case, the resulting instance is immediately set to a changed state. This means that when code subsequently binds a change-notification callback, the callback is triggered immediately. +- The key does not exist at the time of the call to the method. In that case, the resulting instance is immediately set to a changed state. This means that when code subsequently binds a change-notification callback, the callback is triggered immediately. - The associated cache entry was removed from the cache. This can occur if the entry is explicitly removed, if it expires, or if it is evicted to recover memory @@ -616,11 +616,11 @@ You can specify the settings for the instance is bound to the event. However, during application-domain shutdown, if a memory-based cache has not been explicitly disposed, the cache instance will automatically call the method. + Each instance is bound to the event. However, during application-domain shutdown, if a memory-based cache has not been explicitly disposed, the cache instance will automatically call the method. The disposed cache instance is shut down using the following steps: -1. The state of the cache is set to indicate that the cache is disposed. Any attempt to call public caching methods that change the state of the cache, such as methods that add, remove, or retrieve cache entries, might cause unexpected behavior. For example, if you call the method after the cache is disposed, a no-op error occurs. If you attempt to retrieve items from the cache, the method will always return `null`. +1. The state of the cache is set to indicate that the cache is disposed. Any attempt to call public caching methods that change the state of the cache, such as methods that add, remove, or retrieve cache entries, might cause unexpected behavior. For example, if you call the method after the cache is disposed, a no-op error occurs. If you attempt to retrieve items from the cache, the method will always return `null`. 2. Performance counter information is no longer raised from the current cache instance. @@ -701,7 +701,7 @@ You can specify the settings for the method returns it as a instance. The and properties of the instance will be set. However, the property will be `null`, because regions are not implemented in the class. + If the cache entry specified by `key` exists in the cache, the method returns it as a instance. The and properties of the instance will be set. However, the property will be `null`, because regions are not implemented in the class. ]]> @@ -762,7 +762,7 @@ You can specify the settings for the method can be used to iterate over entries in the cache. + The enumerator that is returned by the method can be used to iterate over entries in the cache. > [!IMPORTANT] > Retrieving an enumerator for a instance is a resource-intensive and blocking operation. Therefore, the enumerator should not be used in production applications. @@ -909,7 +909,7 @@ You can specify the settings for the property returns the name of the current instance of the class. In an application that uses multiple cache instances, you can use the property to help distinguish instances. For more information, see the method. The default memory-based cache returns the default name. + The property returns the name of the current instance of the class. In an application that uses multiple cache instances, you can use the property to help distinguish instances. For more information, see the method. The default memory-based cache returns the default name. ]]> @@ -970,7 +970,7 @@ You can specify the settings for the property can be specified in the application configuration file. Alternatively they can be passed when the class is initialized. For more information about how to configure this property, see [<namedCaches> Element (Cache Settings)](/dotnet/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings). For more information about how to configure the property when the class is being initialized, see the method. + The settings for the property can be specified in the application configuration file. Alternatively they can be passed when the class is initialized. For more information about how to configure this property, see [<namedCaches> Element (Cache Settings)](/dotnet/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings). For more information about how to configure the property when the class is being initialized, see the method. ]]> @@ -1098,7 +1098,7 @@ You can specify the settings for the method overloads, the method always puts a cache value in the cache, regardless whether an entry already exists that has the same key. If the specified entry does not exist in the cache, a new cache entry is inserted. If the specified entry already exists, its value is updated. + Like other method overloads, the method always puts a cache value in the cache, regardless whether an entry already exists that has the same key. If the specified entry does not exist in the cache, a new cache entry is inserted. If the specified entry already exists, its value is updated. ]]> @@ -1159,7 +1159,7 @@ You can specify the settings for the method overloads, the method always puts a cache value in the cache, regardless whether an entry already exists with the same key. If the specified entry does not exist, a new cache entry is inserted. If the specified entry exists, it is updated. + Like other method overloads, the method always puts a cache value in the cache, regardless whether an entry already exists with the same key. If the specified entry does not exist, a new cache entry is inserted. If the specified entry exists, it is updated. The `absoluteExpiration` parameter indicates when the entry should be removed from the cache. @@ -1222,7 +1222,7 @@ You can specify the settings for the method overloads, the method always puts a cache value in the cache, regardless whether a matching entry already exists. If the specified entry does not exist in the cache, a new cache entry is inserted. If the specified entry exists, it is updated. + Like other method overloads, the method always puts a cache value in the cache, regardless whether a matching entry already exists. If the specified entry does not exist in the cache, a new cache entry is inserted. If the specified entry exists, it is updated. Removing an entry triggers any associated change monitors. If the removed item was associated with a object or object, the reason for removal that is passed to the callbacks is contained in the property. diff --git a/xml/System.Runtime.Caching/ObjectCache.xml b/xml/System.Runtime.Caching/ObjectCache.xml index 0ce92e840a0..849fc7fcbd3 100644 --- a/xml/System.Runtime.Caching/ObjectCache.xml +++ b/xml/System.Runtime.Caching/ObjectCache.xml @@ -89,9 +89,9 @@ Note: is not a singleton, bu method overloads try to insert a cache entry into the cache, without overwriting or removing an existing cache entry that has the same key. The cache entry can be a typed object or a generic object. + The method overloads try to insert a cache entry into the cache, without overwriting or removing an existing cache entry that has the same key. The cache entry can be a typed object or a generic object. - The method overloads and the method overloads have one significant difference. When these methods insert a cache entry, if a matching entry is found in the cache, the method overloads return the existing cache entry, but the method overloads do not. Having these different method overloads enables callers to optimize their code based on whether they need the existing cache entry. In distributed caches, returning an existing value by using the method might be more expensive than returning a Boolean value by using method. + The method overloads and the method overloads have one significant difference. When these methods insert a cache entry, if a matching entry is found in the cache, the method overloads return the existing cache entry, but the method overloads do not. Having these different method overloads enables callers to optimize their code based on whether they need the existing cache entry. In distributed caches, returning an existing value by using the method might be more expensive than returning a Boolean value by using method. ]]> @@ -127,7 +127,7 @@ Note: is not a singleton, bu method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. + The method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. ]]> @@ -166,7 +166,7 @@ Note: is not a singleton, bu method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. + The method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. ]]> @@ -205,7 +205,7 @@ Note: is not a singleton, bu method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. + The method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. ]]> @@ -222,9 +222,9 @@ Note: is not a singleton, bu method overloads insert an entry into the cache. If a cache entry with a matching key already exists, they return the existing entry. The cache entry can be a object or a generic object. + The method overloads insert an entry into the cache. If a cache entry with a matching key already exists, they return the existing entry. The cache entry can be a object or a generic object. - There is one difference between the overloads and the overloads. When these overloaded methods try to insert a cache entry, if an existing entry is found that has a key that matches an existing inserted cache entry, the overloads return the existing cache entry. The overloads do not. + There is one difference between the overloads and the overloads. When these overloaded methods try to insert a cache entry, if an existing entry is found that has a key that matches an existing inserted cache entry, the overloads return the existing cache entry. The overloads do not. ]]> @@ -290,7 +290,7 @@ Note: is not a singleton, bu method overload returns an object value, not a object. + This method overload returns an object value, not a object. ]]> @@ -328,7 +328,7 @@ Note: is not a singleton, bu method returns an object value, not a object. + The method returns an object value, not a object. ]]> @@ -390,7 +390,7 @@ Note: is not a singleton, bu class overrides the base method, the cache implementation must create a object. This specialized change monitor notifies callers when there are changes to the cache entries that are specified in the `keys` parameter. For example, if a monitored item in the `keys` parameter is updated or removed from the cache, the change monitor created by this method triggers an event. + When a derived class overrides the base method, the cache implementation must create a object. This specialized change monitor notifies callers when there are changes to the cache entries that are specified in the `keys` parameter. For example, if a monitored item in the `keys` parameter is updated or removed from the cache, the change monitor created by this method triggers an event. If a cache implementation supports named cache regions, a string value can be specified as the `regionName` parameter. Otherwise, the parameter defaults to `null`. @@ -478,9 +478,9 @@ Note: is not a singleton, bu class. In that case, the method overload will not necessarily return all the information about cached data. However, the method overload enables custom caches to return more than just the cache value. + This method overload exists because some cache implementations might extend the class. In that case, the method overload will not necessarily return all the information about cached data. However, the method overload enables custom caches to return more than just the cache value. - The method is like the method, except that the method returns return the cache entry as a instance. + The method is like the method, except that the method returns return the cache entry as a instance. ]]> @@ -543,7 +543,7 @@ Note: is not a singleton, bu > [!NOTE] > Returning an enumerator is typically a more expensive operation than returning the entire cache entry. - This method is called by the explicit interface implementations that the class has for the and methods. + This method is called by the explicit interface implementations that the class has for the and methods. ]]> @@ -586,7 +586,7 @@ Note: is not a singleton, bu method overload is a performance optimization for distributed caches that support fetching multiple cache entries from the cache during a single network call. + The method overload is a performance optimization for distributed caches that support fetching multiple cache entries from the cache during a single network call. Although a caller can pass one or more keys to the method, there is no guarantee that all keys represent entries in the cache. Therefore, the returned dictionary might contain fewer items than the number of keys that were passed to the method. @@ -636,9 +636,9 @@ Note: is not a singleton, bu method overload is like the method overload, but lets you pass the named region by using optional parameter syntax that is supported by managed languages such as C#. + The method overload is like the method overload, but lets you pass the named region by using optional parameter syntax that is supported by managed languages such as C#. - This method is a virtual method because the class provides a default implementation that passes the `params` array to the method overload. + This method is a virtual method because the class provides a default implementation that passes the `params` array to the method overload. ]]> @@ -755,9 +755,9 @@ Note: is not a singleton, bu method. Internally, a cache implementation could set the absolute expiration of the specified value to the method. However this behavior is ultimately up to the cache implementation. + The behavior of the set accessor of this property is like the method. Internally, a cache implementation could set the absolute expiration of the specified value to the method. However this behavior is ultimately up to the cache implementation. - The behavior of get accessor is like calling the method and using `null` for the region name. + The behavior of get accessor is like calling the method and using `null` for the region name. ]]> @@ -870,7 +870,7 @@ Note: is not a singleton, bu overload methods is an insert-or-update operation. A cache entry is either inserted as a new entry if the specified entry does not exist, or the cache entry is updated with a new value if it already exists. + The typical behavior of the overload methods is an insert-or-update operation. A cache entry is either inserted as a new entry if the specified entry does not exist, or the cache entry is updated with a new value if it already exists. ]]> @@ -1049,7 +1049,7 @@ Note: is not a singleton, bu Developers can use this method to iterate through a generic collection of cache entries. - This is the default implementation that internally calls the method. + This is the default implementation that internally calls the method. ]]> diff --git a/xml/System.Runtime.Caching/SqlChangeMonitor.xml b/xml/System.Runtime.Caching/SqlChangeMonitor.xml index e03f4d83af9..608b168c430 100644 --- a/xml/System.Runtime.Caching/SqlChangeMonitor.xml +++ b/xml/System.Runtime.Caching/SqlChangeMonitor.xml @@ -16,11 +16,11 @@ Provides change monitoring for SQL Server databases. This class cannot be inherited. - class wraps the ADO.NET class and adds change monitoring for SQL Server-based dependencies. Therefore, the class serves as a bridge between the ADO.NET object and the namespace. - + class wraps the ADO.NET class and adds change monitoring for SQL Server-based dependencies. Therefore, the class serves as a bridge between the ADO.NET object and the namespace. + ]]> @@ -44,13 +44,13 @@ An object that represents an ADO.NET object. Initializes a new instance of the class. - method binds the event of the object in `dependency` to the method handler. This enables the change monitor to receive notification of changes in SQL Server databases. - - When you invoke the constructor, you must pass a object as a parameter. When you create a object, you must pass a parameter to the constructor. The constructor for class lets you specify optional information for configuring the instance. - + method binds the event of the object in `dependency` to the method handler. This enables the change monitor to receive notification of changes in SQL Server databases. + + When you invoke the constructor, you must pass a object as a parameter. When you create a object, you must pass a parameter to the constructor. The constructor for class lets you specify optional information for configuring the instance. + ]]> @@ -106,11 +106,11 @@ Gets an identifier for a instance. An identifier for the change monitor. - class generates a GUID for this property. - + class generates a GUID for this property. + ]]> diff --git a/xml/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml b/xml/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml index 5b794b05284..0788717d5bb 100644 --- a/xml/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml +++ b/xml/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml @@ -74,7 +74,7 @@ ## Examples As the following example shows, you can determine whether a method is marked with [Async](/dotnet/visual-basic/language-reference/modifiers/async) or [async](/dotnet/csharp/language-reference/keywords/async) modifier. In the example, `IsAsyncMethod` performs the following steps: -- Obtains a object for the method name by using . +- Obtains a object for the method name by using . - Obtains a object for the attribute by using [GetType Operator](/dotnet/visual-basic/language-reference/operators/gettype-operator) or [typeof](/dotnet/csharp/language-reference/keywords/typeof). diff --git a/xml/System.Runtime.CompilerServices/CallConvCdecl.xml b/xml/System.Runtime.CompilerServices/CallConvCdecl.xml index 93c71bb3944..3154c78e1ae 100644 --- a/xml/System.Runtime.CompilerServices/CallConvCdecl.xml +++ b/xml/System.Runtime.CompilerServices/CallConvCdecl.xml @@ -77,7 +77,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/CallConvFastcall.xml b/xml/System.Runtime.CompilerServices/CallConvFastcall.xml index 397083a232e..7f966527e74 100644 --- a/xml/System.Runtime.CompilerServices/CallConvFastcall.xml +++ b/xml/System.Runtime.CompilerServices/CallConvFastcall.xml @@ -75,7 +75,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class like , , , and . +- Using methods in the class like , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/CallConvStdcall.xml b/xml/System.Runtime.CompilerServices/CallConvStdcall.xml index ef3f0d93291..c41f5443b41 100644 --- a/xml/System.Runtime.CompilerServices/CallConvStdcall.xml +++ b/xml/System.Runtime.CompilerServices/CallConvStdcall.xml @@ -75,7 +75,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/CallConvThiscall.xml b/xml/System.Runtime.CompilerServices/CallConvThiscall.xml index e0dd490b0fc..45f03c276b8 100644 --- a/xml/System.Runtime.CompilerServices/CallConvThiscall.xml +++ b/xml/System.Runtime.CompilerServices/CallConvThiscall.xml @@ -75,7 +75,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2+CreateValueCallback.xml b/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2+CreateValueCallback.xml index 3e08c135ff4..3d53d04d2b7 100644 --- a/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2+CreateValueCallback.xml +++ b/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2+CreateValueCallback.xml @@ -71,21 +71,21 @@ Represents a method that creates a non-default value to add as part of a key/value pair to a object. An instance of a reference type that represents the value to attach to the specified key. - delegate encapsulates a callback method that is invoked by the method when the key passed to the method is not found in the object. The method passes the callback method the key that represents a managed object to which a property value is to be dynamically attached. The method is responsible for returning the property value to its caller, which, in turn, adds the key/value pair to the table. - - The method is used to return an instance of a reference type that can be attached to the specified key. It enables that instance to be initialized using non-default values. If the key is not found in the table, the method adds a key/value pair in which the value is initialized using default values. - - - -## Examples - The following example defines a `MainClass` class and a `MainInfo` class. `MainInfo` provides information about the `MainClass` instance. It also defines a static (`Shared` in Visual Basic) `CreateAttachedValue` method that can be assigned to the delegate and passed to the method. The example calls the method to add a `MainClass` object and its corresponding `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and a call to the method to retrieve the value that belongs to an existing key. - + delegate encapsulates a callback method that is invoked by the method when the key passed to the method is not found in the object. The method passes the callback method the key that represents a managed object to which a property value is to be dynamically attached. The method is responsible for returning the property value to its caller, which, in turn, adds the key/value pair to the table. + + The method is used to return an instance of a reference type that can be attached to the specified key. It enables that instance to be initialized using non-default values. If the key is not found in the table, the method adds a key/value pair in which the value is initialized using default values. + + + +## Examples + The following example defines a `MainClass` class and a `MainInfo` class. `MainInfo` provides information about the `MainClass` instance. It also defines a static (`Shared` in Visual Basic) `CreateAttachedValue` method that can be assigned to the delegate and passed to the method. The example calls the method to add a `MainClass` object and its corresponding `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and a call to the method to retrieve the value that belongs to an existing key. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml b/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml index 389c82ce934..c6d4e30ecfa 100644 --- a/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml +++ b/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml @@ -110,27 +110,27 @@ class enables language compilers to attach arbitrary properties to managed objects at run time. A object is a dictionary that binds a managed object, which is represented by a key, to its attached property, which is represented by a value. The object's keys are the individual instances of the `TKey` class to which the property is attached, and its values are the property values that are assigned to the corresponding objects. + The class enables language compilers to attach arbitrary properties to managed objects at run time. A object is a dictionary that binds a managed object, which is represented by a key, to its attached property, which is represented by a value. The object's keys are the individual instances of the `TKey` class to which the property is attached, and its values are the property values that are assigned to the corresponding objects. - Keys must be unique; in other words, the class supports one attached value per managed object. Two keys are equal if passing them to the method returns `true`. + Keys must be unique; in other words, the class supports one attached value per managed object. Two keys are equal if passing them to the method returns `true`. > [!NOTE] -> You cannot control equality comparisons by overriding to explicitly set the hash code for a key. The class does not use the method to compute hash codes, and therefore does not invoke overrides. +> You cannot control equality comparisons by overriding to explicitly set the hash code for a key. The class does not use the method to compute hash codes, and therefore does not invoke overrides. - Although the class holds a collection of key/value pairs, it is best thought of as a table rather than a dictionary object. The class differs from a dictionary in several ways: + Although the class holds a collection of key/value pairs, it is best thought of as a table rather than a dictionary object. The class differs from a dictionary in several ways: - It does not persist keys. That is, a key is not kept alive only because it is a member of the collection. - It does not include all the methods (such as `GetEnumerator` or `Contains`) that a dictionary typically has. -- It does not implement the interface. +- It does not implement the interface. - The class differs from other collection objects in its management of the object lifetime of keys stored in the collection. Ordinarily, when an object is stored in a collection, its lifetime lasts until it is removed (and there are no additional references to the object) or until the collection object itself is destroyed. However, in the class, adding a key/value pair to the table does not ensure that the key will persist, even if it can be reached directly from a value stored in the table (for example, if the table contains one key, A, with a value V1, and a second key, B, with a value P2 that contains a reference to A). Instead, automatically removes the key/value entry as soon as no other references to a key exist outside the table. The example provides an illustration. + The class differs from other collection objects in its management of the object lifetime of keys stored in the collection. Ordinarily, when an object is stored in a collection, its lifetime lasts until it is removed (and there are no additional references to the object) or until the collection object itself is destroyed. However, in the class, adding a key/value pair to the table does not ensure that the key will persist, even if it can be reached directly from a value stored in the table (for example, if the table contains one key, A, with a value V1, and a second key, B, with a value P2 that contains a reference to A). Instead, automatically removes the key/value entry as soon as no other references to a key exist outside the table. The example provides an illustration. ## Examples - The following example illustrates that a key stored in the table does not persist after references to it outside the table are destroyed. The example defines two classes: `ManagedClass`, which represents the key in the table, and `ClassData`, which represents the key's value. The example instantiates three objects of each type. It also instantiates a object that represents the second `ManagedClass`, and then destroys the second `ManagedClass` instance. The attempt to retrieve the second `ManagedClass` object from the property indicates that no references to the object remain. + The following example illustrates that a key stored in the table does not persist after references to it outside the table are destroyed. The example defines two classes: `ManagedClass`, which represents the key in the table, and `ClassData`, which represents the key's value. The example instantiates three objects of each type. It also instantiates a object that represents the second `ManagedClass`, and then destroys the second `ManagedClass` instance. The attempt to retrieve the second `ManagedClass` object from the property indicates that no references to the object remain. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue/Overview/example1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue/Overview/example1.vb" id="Snippet1"::: @@ -188,9 +188,9 @@ constructor instantiates an empty table; that is, the table contains no key/value pairs. You can add key/value pairs by calling the , , or method. + The constructor instantiates an empty table; that is, the table contains no key/value pairs. You can add key/value pairs by calling the , , or method. - Every key in a object must be unique. Keys are not unique if they refer to the same object (that is, if passing them as arguments to the method returns `true`). + Every key in a object must be unique. Keys are not unique if they refer to the same object (that is, if passing them as arguments to the method returns `true`). ]]> @@ -253,14 +253,14 @@ object must be unique. Keys are not unique if they refer to the same object (that is, if passing them as arguments to the method returns `true`). + Every key in a object must be unique. Keys are not unique if they refer to the same object (that is, if passing them as arguments to the method returns `true`). If the key is garbage-collected during the addition operation, the existing key/value pair is removed and the new key/value pair is added without an exception being thrown. ## Examples - The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example then calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. + The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example then calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: @@ -403,7 +403,7 @@ when the current object is ready to be finalized. + The garbage collector calls when the current object is ready to be finalized. ]]> @@ -611,14 +611,14 @@ ## Remarks If `key` does not exist in the table, the method adds it, along with the object that is instantiated by calling the parameterless constructor of the class defined by the `TValue` generic type parameter. If the `TValue` class has no parameterless constructor, a is thrown. - This is the recommended method of retrieving an existing value or adding a new value to the table if the class of the table's value defines a parameterless constructor. If it does not define a parameterless constructor, you can instead call the method, which relies on a callback-provided method to instantiate the object representing the table's value + This is the recommended method of retrieving an existing value or adding a new value to the table if the class of the table's value defines a parameterless constructor. If it does not define a parameterless constructor, you can instead call the method, which relies on a callback-provided method to instantiate the object representing the table's value - To retrieve the value of an existing key without adding the key/value pair if the key is not found in the table, call the method. + To retrieve the value of an existing key without adding the key/value pair if the key is not found in the table, call the method. ## Examples - The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. + The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: @@ -696,16 +696,16 @@ Note: In the .NET for invokes the method that is defined by the `createValueCallback` parameter and passes it the key. A new value is bound to the key in the table and returned as a result. + If `key` does not exist in the table, invokes the method that is defined by the `createValueCallback` parameter and passes it the key. A new value is bound to the key in the table and returned as a result. - Use this method only when the class that represents the table's value does not define a parameterless constructor. If it does define a parameterless constructor, use the method instead. To retrieve the value of an existing key without adding the key/value pair if the key is not found in the table, call the method. + Use this method only when the class that represents the table's value does not define a parameterless constructor. If it does define a parameterless constructor, use the method instead. To retrieve the value of an existing key without adding the key/value pair if the key is not found in the table, call the method. If multiple threads try to create the same key, `createValueCallback` may be invoked multiple times with the same key. Only one of these calls will succeed, and its returned value will be added to the table. Which thread succeeds in creating the value is indeterminate. This rule permits the table to invoke `createValueCallback` outside the internal table lock to prevent deadlocks. ## Examples - The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. It also defines a static (`Shared` in Visual Basic) `CreateAttachedValue` method that can be assigned to the delegate and passed to the method. The example calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. + The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. It also defines a static (`Shared` in Visual Basic) `CreateAttachedValue` method that can be assigned to the delegate and passed to the method. The example calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: @@ -930,7 +930,7 @@ retrieved. Additionally, it may not return all entries that were present when th ## Remarks -This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. +This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The returned enumerator does not extend the lifetime of any object pairs in the table, other than the current one. It does not return entries that have already been collected or that were added after the enumerator was retrieved. Additionally, it may not return all entries that were present when the enumerator was retrieved, for example, entries that were collected or removed after the enumerator was retrieved but before they were enumerated. @@ -1053,7 +1053,7 @@ retrieved. Additionally, it may not return all entries that were present when th ## Examples - The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example calls the , , and methods to add key/value pairs to a table. In each case, the example calls the method to confirm that the key/value pair has been added to the table. + The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example calls the , , and methods to add key/value pairs to a table. In each case, the example calls the method to confirm that the key/value pair has been added to the table. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.CompilerServices/ContractHelper.xml b/xml/System.Runtime.CompilerServices/ContractHelper.xml index dd75a39b25d..85a9776949d 100644 --- a/xml/System.Runtime.CompilerServices/ContractHelper.xml +++ b/xml/System.Runtime.CompilerServices/ContractHelper.xml @@ -112,11 +112,11 @@ Used by the binary rewriter to activate the default failure behavior. A null reference ( in Visual Basic) if the event was handled and should not trigger a failure; otherwise, returns the localized failure message. - method does not perform the failure behavior (an assert or throw) itself. If the failure is handled by the listeners, the method returns `null`. If the failure is not handled by the listeners, a localized failure message is returned. - + method does not perform the failure behavior (an assert or throw) itself. If the failure is handled by the listeners, the method returns `null`. If the failure is not handled by the listeners, a localized failure message is returned. + ]]> @@ -183,11 +183,11 @@ The inner exception that caused the current exception. Triggers the default failure behavior. - , which causes the **Assert** dialog box to be displayed. You can change that behavior to throw an exception instead of displaying the dialog box. - + , which causes the **Assert** dialog box to be displayed. You can change that behavior to throw an exception instead of displaying the dialog box. + ]]> diff --git a/xml/System.Runtime.CompilerServices/DisablePrivateReflectionAttribute.xml b/xml/System.Runtime.CompilerServices/DisablePrivateReflectionAttribute.xml index c9a30e74207..38317ee672b 100644 --- a/xml/System.Runtime.CompilerServices/DisablePrivateReflectionAttribute.xml +++ b/xml/System.Runtime.CompilerServices/DisablePrivateReflectionAttribute.xml @@ -56,15 +56,15 @@ Indicates that any private members contained in an assembly's types are not available to reflection. - [!NOTE] > The .NET Framework, .NET Core, and .NET runtimes do not consistently enforce this attribute. Developers should not rely on this attribute to restrict access to an assembly's non-public members. - Ordinarily, reflection methods, such a or , can be used to get information about private members at runtime. When applies to an assembly, the attribute makes information about private members in that assembly's types unavailable to runtime reflection. - + Ordinarily, reflection methods, such a or , can be used to get information about private members at runtime. When applies to an assembly, the attribute makes information about private members in that assembly's types unavailable to runtime reflection. + ]]> diff --git a/xml/System.Runtime.CompilerServices/InlineArrayAttribute.xml b/xml/System.Runtime.CompilerServices/InlineArrayAttribute.xml index 34b9b8fe1e4..067ec97c8a7 100644 --- a/xml/System.Runtime.CompilerServices/InlineArrayAttribute.xml +++ b/xml/System.Runtime.CompilerServices/InlineArrayAttribute.xml @@ -36,7 +36,7 @@ This attribute can be used to annotate a `struct` type with a single field. The runtime replicates that field in the actual type layout as many times as is specified. > [!IMPORTANT] -> In .NET 9 and later versions, the default implementations of `Equals()` and `GetHashCode()` for types marked with this attribute throw . You must override both and if they will be used. +> In .NET 9 and later versions, the default implementations of `Equals()` and `GetHashCode()` for types marked with this attribute throw . You must override both and if they will be used. ]]> diff --git a/xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml b/xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml index a732a507a6a..5b9f5e016a1 100644 --- a/xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml +++ b/xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml @@ -135,7 +135,7 @@ The following example provides the source code for the `Friend2` assembly. Note constructor defines a friend assembly, which is an assembly that has access to the internal and private protected types and members of the current assembly. + The constructor defines a friend assembly, which is an assembly that has access to the internal and private protected types and members of the current assembly. Both the current assembly and the friend assembly must be unsigned, or both must be signed with a strong name. (For more information about strong-named assemblies, see [Create and use strong-named assemblies](/dotnet/standard/assembly/create-use-strong-named).) If both are unsigned, the `assemblyName` argument consists of the name of the friend assembly, specified without a directory path or file extension. If both are signed, `assemblyName` consists of the name of the friend assembly without its directory path or file name extension, along with its full public key (but not its public key token). The other components of a strong name, such as those that provide culture, version, or processor architecture information, cannot be specified in the `assemblyName` argument. diff --git a/xml/System.Runtime.CompilerServices/IsBoxed.xml b/xml/System.Runtime.CompilerServices/IsBoxed.xml index a7305580ee3..fe85e41a92a 100644 --- a/xml/System.Runtime.CompilerServices/IsBoxed.xml +++ b/xml/System.Runtime.CompilerServices/IsBoxed.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsByValue.xml b/xml/System.Runtime.CompilerServices/IsByValue.xml index cb495d26aa2..b5da56090e7 100644 --- a/xml/System.Runtime.CompilerServices/IsByValue.xml +++ b/xml/System.Runtime.CompilerServices/IsByValue.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsConst.xml b/xml/System.Runtime.CompilerServices/IsConst.xml index 001b7180d3a..0297a6f3bc7 100644 --- a/xml/System.Runtime.CompilerServices/IsConst.xml +++ b/xml/System.Runtime.CompilerServices/IsConst.xml @@ -57,7 +57,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsCopyConstructed.xml b/xml/System.Runtime.CompilerServices/IsCopyConstructed.xml index b82d5b48556..0505bddfcb9 100644 --- a/xml/System.Runtime.CompilerServices/IsCopyConstructed.xml +++ b/xml/System.Runtime.CompilerServices/IsCopyConstructed.xml @@ -63,7 +63,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsExplicitlyDereferenced.xml b/xml/System.Runtime.CompilerServices/IsExplicitlyDereferenced.xml index 2962276c293..07b6e39e873 100644 --- a/xml/System.Runtime.CompilerServices/IsExplicitlyDereferenced.xml +++ b/xml/System.Runtime.CompilerServices/IsExplicitlyDereferenced.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsImplicitlyDereferenced.xml b/xml/System.Runtime.CompilerServices/IsImplicitlyDereferenced.xml index 836a1f8c297..ec5c230713c 100644 --- a/xml/System.Runtime.CompilerServices/IsImplicitlyDereferenced.xml +++ b/xml/System.Runtime.CompilerServices/IsImplicitlyDereferenced.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsJitIntrinsic.xml b/xml/System.Runtime.CompilerServices/IsJitIntrinsic.xml index 5d0f6bc1453..184918b0b0d 100644 --- a/xml/System.Runtime.CompilerServices/IsJitIntrinsic.xml +++ b/xml/System.Runtime.CompilerServices/IsJitIntrinsic.xml @@ -53,7 +53,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsLong.xml b/xml/System.Runtime.CompilerServices/IsLong.xml index 2bfba86ff6f..a3d978463e7 100644 --- a/xml/System.Runtime.CompilerServices/IsLong.xml +++ b/xml/System.Runtime.CompilerServices/IsLong.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsPinned.xml b/xml/System.Runtime.CompilerServices/IsPinned.xml index 8b9654524fd..8333332c492 100644 --- a/xml/System.Runtime.CompilerServices/IsPinned.xml +++ b/xml/System.Runtime.CompilerServices/IsPinned.xml @@ -52,7 +52,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsSignUnspecifiedByte.xml b/xml/System.Runtime.CompilerServices/IsSignUnspecifiedByte.xml index 54257e9a41b..5b1e510ab79 100644 --- a/xml/System.Runtime.CompilerServices/IsSignUnspecifiedByte.xml +++ b/xml/System.Runtime.CompilerServices/IsSignUnspecifiedByte.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsUdtReturn.xml b/xml/System.Runtime.CompilerServices/IsUdtReturn.xml index e201b9bb9fc..c05d9480093 100644 --- a/xml/System.Runtime.CompilerServices/IsUdtReturn.xml +++ b/xml/System.Runtime.CompilerServices/IsUdtReturn.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsVolatile.xml b/xml/System.Runtime.CompilerServices/IsVolatile.xml index 50b35d5cadf..5d23aa437c7 100644 --- a/xml/System.Runtime.CompilerServices/IsVolatile.xml +++ b/xml/System.Runtime.CompilerServices/IsVolatile.xml @@ -72,7 +72,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml b/xml/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml index d64ca510cdb..595726c6d4f 100644 --- a/xml/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml +++ b/xml/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml @@ -77,7 +77,7 @@ ## Examples The following example shows how to determine whether a method is an iterator method. In the example, `IsIteratorMethod` performs the following steps: -- Obtains a object for the method name by using . +- Obtains a object for the method name by using . - Obtains a object for the attribute by using [GetType Operator](/dotnet/visual-basic/language-reference/operators/gettype-operator). diff --git a/xml/System.Runtime.CompilerServices/MethodImplAttribute.xml b/xml/System.Runtime.CompilerServices/MethodImplAttribute.xml index 0390ecf2f92..e9f30bd3254 100644 --- a/xml/System.Runtime.CompilerServices/MethodImplAttribute.xml +++ b/xml/System.Runtime.CompilerServices/MethodImplAttribute.xml @@ -71,7 +71,7 @@ ## Remarks You can apply this attribute to methods or constructors. - This attribute lets you customize the configuration of the method or constructor to which it applies by supplying a value to its class constructor. The members of the enumeration correspond to bit fields in the `CorMethodImpl` metadata table. This means that information on the attribute cannot be retrieved at run time by calling the method; instead, it is retrieved by calling either the `MethodInfo.GetMethodImplementationFlags` or the `ConstructorInfo.GetMethodImplementationFlags` method. + This attribute lets you customize the configuration of the method or constructor to which it applies by supplying a value to its class constructor. The members of the enumeration correspond to bit fields in the `CorMethodImpl` metadata table. This means that information on the attribute cannot be retrieved at run time by calling the method; instead, it is retrieved by calling either the `MethodInfo.GetMethodImplementationFlags` or the `ConstructorInfo.GetMethodImplementationFlags` method. @@ -81,7 +81,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/MethodImplAttribute/Overview/methodimplattribute1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/MethodImplAttribute/Overview/methodimplattribute1.vb" id="Snippet1"::: - The following example then calls the `MethodInfo.GetMethodImplementationFlags` method to determine which flags are set for the `GetCalendarName` method. It also demonstrates that this information is not retrieved by the method. + The following example then calls the `MethodInfo.GetMethodImplementationFlags` method to determine which flags are set for the `GetCalendarName` method. It also demonstrates that this information is not retrieved by the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/MethodImplAttribute/Overview/getmethodimplattribute1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/MethodImplAttribute/Overview/getmethodimplattribute1.vb" id="Snippet2"::: diff --git a/xml/System.Runtime.CompilerServices/RuntimeHelpers+CleanupCode.xml b/xml/System.Runtime.CompilerServices/RuntimeHelpers+CleanupCode.xml index 648a4173ed2..497ca8bc3a1 100644 --- a/xml/System.Runtime.CompilerServices/RuntimeHelpers+CleanupCode.xml +++ b/xml/System.Runtime.CompilerServices/RuntimeHelpers+CleanupCode.xml @@ -61,11 +61,11 @@ to express that an exception was thrown; otherwise, . Represents a method to run when an exception occurs. - delegate with the method. - + delegate with the method. + ]]> diff --git a/xml/System.Runtime.CompilerServices/RuntimeHelpers+TryCode.xml b/xml/System.Runtime.CompilerServices/RuntimeHelpers+TryCode.xml index 7c32758d818..2247d71e8a8 100644 --- a/xml/System.Runtime.CompilerServices/RuntimeHelpers+TryCode.xml +++ b/xml/System.Runtime.CompilerServices/RuntimeHelpers+TryCode.xml @@ -58,11 +58,11 @@ Data to pass to the delegate. Represents a delegate to code that should be run in a try block. - delegate with the method. - + delegate with the method. + ]]> diff --git a/xml/System.Runtime.CompilerServices/RuntimeHelpers.xml b/xml/System.Runtime.CompilerServices/RuntimeHelpers.xml index 7b36f25293b..75ab9258373 100644 --- a/xml/System.Runtime.CompilerServices/RuntimeHelpers.xml +++ b/xml/System.Runtime.CompilerServices/RuntimeHelpers.xml @@ -68,7 +68,7 @@ method. To reliably set a handle to a specified pre-existing handle, you must ensure that the allocation of the native handle and the subsequent recording of that handle within a object is atomic. Any failure between these operations (such as a thread abort or out-of-memory exception) will result in the native handle being leaked. You can use the method to make sure that the handle is not leaked. + The following example shows how to reliably set handles by using the method. To reliably set a handle to a specified pre-existing handle, you must ensure that the allocation of the native handle and the subsequent recording of that handle within a object is atomic. Any failure between these operations (such as a thread abort or out-of-memory exception) will result in the native handle being leaked. You can use the method to make sure that the handle is not leaked. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/Overview/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/Overview/sample.vb" id="Snippet1"::: @@ -301,14 +301,14 @@ This method is intended for compiler use rather than use directly in code. `T` m provides information about an artificially limited stack that preserves enough space for an exception to be raised and recovery action to be taken. The artificial stack limit is chosen by the common language runtime to ensure that enough space remains to throw an exception safely. + provides information about an artificially limited stack that preserves enough space for an exception to be raised and recovery action to be taken. The artificial stack limit is chosen by the common language runtime to ensure that enough space remains to throw an exception safely. This method is useful in situations where stack overflow might occur as a result of unbounded recursion. It is intended for use in compiler services scenarios, although it can also be used safely in other development scenarios. If the stack space is sufficient, the exception is not thrown, and most .NET types and members can still be called. > [!NOTE] -> This method is not part of the constrained execution region (CER) support, and should not be confused with the method. +> This method is not part of the constrained execution region (CER) support, and should not be confused with the method. ]]> @@ -377,7 +377,7 @@ This method is intended for compiler use rather than use directly in code. `T` m ## Examples - The following example demonstrates how to compare two objects by using the method. + The following example demonstrates how to compare two objects by using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/Equals/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/Equals/example.vb" id="Snippet1"::: @@ -586,14 +586,14 @@ This method is intended for compiler use rather than use directly in code. `T` m - If the value being assigned is an immutable value class, the method returns the object itself, instead of a copy of the class. - Compilers of dynamically typed languages can use this method to make sure that boxed value types work identically to unboxed value types. That is, boxed value types get cloned when you pass them around, and they are always passed by value. The compiler can call to assign a value type to an object or to pass a value type as a parameter of a type object. + Compilers of dynamically typed languages can use this method to make sure that boxed value types work identically to unboxed value types. That is, boxed value types get cloned when you pass them around, and they are always passed by value. The compiler can call to assign a value type to an object or to pass a value type as a parameter of a type object. This method is used by compilers. ## Examples - The following example demonstrates how to box a value class by using the method. + The following example demonstrates how to box a value class by using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/GetObjectValue/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/GetObjectValue/example.vb" id="Snippet1"::: @@ -942,16 +942,16 @@ This method is intended for compiler use rather than use directly in code. `T` m ## Remarks Compilers use this method to mark `catch`, `finally`, and `fault` blocks as constrained execution regions (CERs). Code that is marked as a constrained region must only call other code with strong reliability contracts. It should not allocate or make virtual calls to unprepared or unreliable methods unless it is prepared to handle failures. - Note that no intermediate language opcodes, except `NOP`, are allowed between a call to the method and the `try` block. For more information about CERs, see the classes in the namespace. + Note that no intermediate language opcodes, except `NOP`, are allowed between a call to the method and the `try` block. For more information about CERs, see the classes in the namespace. - CERs that are marked using the method do not work perfectly when a is generated from the `try` block. For more information, see the method. + CERs that are marked using the method do not work perfectly when a is generated from the `try` block. For more information, see the method. - The method calls the method. + The method calls the method. ## Examples - The following example shows how to reliably set handles by using the method. To reliably set a handle to a specified pre-existing handle, you must ensure that the allocation of the native handle and the subsequent recording of that handle within a object is atomic. Any failure between these operations (such as a thread abort or out-of-memory exception) will result in the native handle being leaked. You can use the method to make sure that the handle is not leaked. + The following example shows how to reliably set handles by using the method. To reliably set a handle to a specified pre-existing handle, you must ensure that the allocation of the native handle and the subsequent recording of that handle within a object is atomic. Any failure between these operations (such as a thread abort or out-of-memory exception) will result in the native handle being leaked. You can use the method to make sure that the handle is not leaked. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/Overview/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/Overview/sample.vb" id="Snippet1"::: @@ -1020,7 +1020,7 @@ This method is intended for compiler use rather than use directly in code. `T` m method. + Compilers should not call this method directly. Instead, define a CER by calling the method. ]]> @@ -1086,7 +1086,7 @@ This method is intended for compiler use rather than use directly in code. `T` m - Attribute the method by using the attribute. -- Call the method to dynamically prepare the delegate. +- Call the method to dynamically prepare the delegate. For more information, see the article [Keep Your Code Running with the Reliability Features of the .NET Framework](https://go.microsoft.com/fwlink/?LinkId=145491) in the MSDN Magazine. @@ -1212,7 +1212,7 @@ This method is intended for compiler use rather than use directly in code. `T` m method to handle virtual calls that are made inside a constrained execution region (CER). At JIT compilation time, the common language runtime does not usually have enough information about the target of a virtual call. Therefore, the runtime does not initially prepare that segment of the call graph. If the code that is using the CER has enough knowledge to determine the target at any point in time before the CER is actually entered, it can call to perform the same runtime preparation normally done for a CER rooted at the method specified as an argument. + Compilers use the method to handle virtual calls that are made inside a constrained execution region (CER). At JIT compilation time, the common language runtime does not usually have enough information about the target of a virtual call. Therefore, the runtime does not initially prepare that segment of the call graph. If the code that is using the CER has enough knowledge to determine the target at any point in time before the CER is actually entered, it can call to perform the same runtime preparation normally done for a CER rooted at the method specified as an argument. ]]> @@ -1272,9 +1272,9 @@ This method is intended for compiler use rather than use directly in code. `T` m method. The common language runtime cannot prepare constrained execution regions (CERs) rooted in a method that has generic type parameters (either a type parameter on the class containing the method or one on the method itself) when those type parameters are instantiated as reference types. + You can provide generics support for compilers by using the method. The common language runtime cannot prepare constrained execution regions (CERs) rooted in a method that has generic type parameters (either a type parameter on the class containing the method or one on the method itself) when those type parameters are instantiated as reference types. - You can use this overload to pass a specific instantiation (such as an array of types), specifying class type parameters first (if any), followed by method type parameters (if any). The runtime prepares that instantiation of the method. (This is necessary only if the instantiations you use contain at least one reference type parameter.) Thus, you can use a CER-style `try` clause in a generic method (or a nongeneric method on a generic class) and it will work reliably with instantiations of or other value types. To instantiate reference types such as , you must use an explicit method on the CER root method first. + You can use this overload to pass a specific instantiation (such as an array of types), specifying class type parameters first (if any), followed by method type parameters (if any). The runtime prepares that instantiation of the method. (This is necessary only if the instantiations you use contain at least one reference type parameter.) Thus, you can use a CER-style `try` clause in a generic method (or a nongeneric method on a generic class) and it will work reliably with instantiations of or other value types. To instantiate reference types such as , you must use an explicit method on the CER root method first. ]]> @@ -1340,7 +1340,7 @@ This method is intended for compiler use rather than use directly in code. `T` m This method is also used by compilers. - Instead of using the method, you should use a standard CER. That is, if you are planning to use a moderate amount of stack space, call the method immediately before your `try`/`finally` or `try`/`catch` block. If you are calling a recursive method or plan to use a lot of stack space, you must use the method. + Instead of using the method, you should use a standard CER. That is, if you are planning to use a moderate amount of stack space, call the method immediately before your `try`/`finally` or `try`/`catch` block. If you are calling a recursive method or plan to use a lot of stack space, you must use the method. ]]> diff --git a/xml/System.Runtime.CompilerServices/RuntimeWrappedException.xml b/xml/System.Runtime.CompilerServices/RuntimeWrappedException.xml index 53939d306ae..b0900b94e19 100644 --- a/xml/System.Runtime.CompilerServices/RuntimeWrappedException.xml +++ b/xml/System.Runtime.CompilerServices/RuntimeWrappedException.xml @@ -168,7 +168,7 @@ method sets a object with all the exception object data targeted for serialization. During deserialization, the exception is reconstituted from the `SerializationInfo` transmitted over the stream. + The method sets a object with all the exception object data targeted for serialization. During deserialization, the exception is reconstituted from the `SerializationInfo` transmitted over the stream. ]]> diff --git a/xml/System.Runtime.CompilerServices/TupleElementNamesAttribute.xml b/xml/System.Runtime.CompilerServices/TupleElementNamesAttribute.xml index 2cb6e43e81d..bd0e5c04b60 100644 --- a/xml/System.Runtime.CompilerServices/TupleElementNamesAttribute.xml +++ b/xml/System.Runtime.CompilerServices/TupleElementNamesAttribute.xml @@ -154,11 +154,11 @@ A string array that specifies, in a pre-order depth-first traversal of a type's construction, which value tuple occurrences are meant to carry element names. Initializes a new instance of the class. - `,` `)` might be intended to treat the first type argument as a tuple with element names and the second as a tuple without element names. In this case, the appropriate attribute specification should use a `transformNames` value of `{ "name1", "name2", null, null, null}`. - + `,` `)` might be intended to treat the first type argument as a tuple with element names and the second as a tuple without element names. In this case, the appropriate attribute specification should use a `transformNames` value of `{ "name1", "name2", null, null, null}`. + ]]> diff --git a/xml/System.Runtime.CompilerServices/Unsafe.xml b/xml/System.Runtime.CompilerServices/Unsafe.xml index 30dc9707265..777af360b92 100644 --- a/xml/System.Runtime.CompilerServices/Unsafe.xml +++ b/xml/System.Runtime.CompilerServices/Unsafe.xml @@ -62,7 +62,7 @@ This type is typically used by low-level library authors who want to write high- Consider the following example, which reverses the elements within a `Span`. > [!NOTE] -> These examples exist simply for demonstration purposes. In real-world applications, developers should instead use helper functions like , which are better optimized than even these examples. +> These examples exist simply for demonstration purposes. In real-world applications, developers should instead use helper functions like , which are better optimized than even these examples. ```csharp // A safe, verifiable way to reverse a Span. @@ -1033,7 +1033,7 @@ The caller is responsible for ensuring that the resulting managed pointer is pro This API is conceptually similar to C++'s `const_cast<>`. It is the caller's responsibility to ensure that no data is written to the referenced location. The runtime contains internal logic predicated on the assumption that readonly references truly are immutable, and callers who violate this invariant may trigger undefined behavior within the runtime. -`AsRef` is typically used for passing a readonly reference into methods like , which accept mutable managed pointers as arguments. Consider the following example. +`AsRef` is typically used for passing a readonly reference into methods like , which accept mutable managed pointers as arguments. Consider the following example. ```csharp int ComputeSumOfElements(ref int refToFirstElement, nint numElements) @@ -1458,7 +1458,7 @@ static void Copy(ref T destination, void* source) This API corresponds to the `cpblk` opcode. Both the `destination` and `source` pointers are assumed to be pointer-aligned. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.30 ("cpblk - copy data from memory to memory") for more information. > [!CAUTION] -> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. +> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. ]]> @@ -1518,7 +1518,7 @@ This API corresponds to the `cpblk` opcode. Both the `destination` and `source` This API corresponds to the `cpblk` opcode. Both the `destination` and `source` pointers are assumed to be pointer-aligned. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.30 ("cpblk - copy data from memory to memory") for more information. > [!CAUTION] -> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. +> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. ]]> @@ -1586,7 +1586,7 @@ This API corresponds to the `cpblk` opcode. Both the `destination` and `source` This API corresponds to the `unaligned.1 cpblk` opcode sequence. No alignment assumptions are made about the `destination` or `source` pointers. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.30 ("cpblk - copy data from memory to memory") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information. > [!CAUTION] -> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. +> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. ]]> @@ -1644,7 +1644,7 @@ This API corresponds to the `unaligned.1 cpblk` opcode sequence. No alignment as This API corresponds to the `unaligned.1 cpblk` opcode sequence. No alignment assumptions are made about the `destination` or `source` pointers. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.30 ("cpblk - copy data from memory to memory") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information. > [!CAUTION] -> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. +> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. ]]> @@ -1703,7 +1703,7 @@ This API corresponds to the `unaligned.1 cpblk` opcode sequence. No alignment as This API corresponds to the `initblk` opcode. The `startAddress` pointer is assumed to be pointer-aligned. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.36 ("initblk - initialize a block of memory to a value") for more information. > [!CAUTION] -> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. +> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. ]]> @@ -1763,7 +1763,7 @@ This API corresponds to the `initblk` opcode. The `startAddress` pointer is assu This API corresponds to the `initblk` opcode. The `startAddress` pointer is assumed to be pointer-aligned. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.36 ("initblk - initialize a block of memory to a value") for more information. > [!CAUTION] -> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. +> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. ]]> @@ -1822,7 +1822,7 @@ This API corresponds to the `initblk` opcode. The `startAddress` pointer is assu This API corresponds to the `unaligned.1 initblk` opcode sequence. No alignment assumption is made about the `startAddress` pointer. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.36 ("initblk - initialize a block of memory to a value") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information. > [!CAUTION] -> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. +> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. ]]> @@ -1880,7 +1880,7 @@ This API corresponds to the `unaligned.1 initblk` opcode sequence. No alignment This API corresponds to the `unaligned.1 initblk` opcode sequence. No alignment assumption is made about the `startAddress` pointer. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.36 ("initblk - initialize a block of memory to a value") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information. > [!CAUTION] -> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. +> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. ]]> @@ -2602,7 +2602,7 @@ The return value is guaranteed stable if `left` and `right` point to the same ma This API corresponds to the `sizeof` opcode. If `T` is a reference type, the return value is the size of the reference itself (equal to `sizeof(void*)`). See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.4.25 ("sizeof - load the size, in bytes, of a type") for more information. > [!CAUTION] -> This API returns the size of the _managed_ view of the type. For the size of the _unmanaged_ view of the type, such as needed for interop purposes, use . +> This API returns the size of the _managed_ view of the type. For the size of the _unmanaged_ view of the type, such as needed for interop purposes, use . ]]> diff --git a/xml/System.Runtime.ConstrainedExecution/Cer.xml b/xml/System.Runtime.ConstrainedExecution/Cer.xml index 0273fd8e74d..4220a22222b 100644 --- a/xml/System.Runtime.ConstrainedExecution/Cer.xml +++ b/xml/System.Runtime.ConstrainedExecution/Cer.xml @@ -55,31 +55,31 @@ Specifies a method's behavior when called within a constrained execution region. - enumeration specifies the behavior of a method, type, or assembly within a constrained execution region (CER). Use one of the three available values to indicate that the entity will succeed, has no knowledge of a CER, or might (deterministically) be able to report success or failure. - -A CER provides guarantees that the region of code will execute uninterrupted even if an asynchronous exception such as an aborted thread out-of-memory exception, or stack overflow is raised. - + +The enumeration specifies the behavior of a method, type, or assembly within a constrained execution region (CER). Use one of the three available values to indicate that the entity will succeed, has no knowledge of a CER, or might (deterministically) be able to report success or failure. + +A CER provides guarantees that the region of code will execute uninterrupted even if an asynchronous exception such as an aborted thread out-of-memory exception, or stack overflow is raised. + However, the `Cer.None` enumeration value indicates that the method, type, or assembly has no concept of a CER. It does not take advantage of CER guarantees. This implies the following: -- In the face of exceptional conditions the method might fail. - -- The method might or might not report that it failed (it is non-deterministic). - -- The method is not written with CERs in mind (which is the most likely scenario). - -If a method, type, or assembly is not explicitly marked to succeed, it is implicitly marked as `Cer.None`. +- In the face of exceptional conditions the method might fail. + +- The method might or might not report that it failed (it is non-deterministic). + +- The method is not written with CERs in mind (which is the most likely scenario). + +If a method, type, or assembly is not explicitly marked to succeed, it is implicitly marked as `Cer.None`. ## Examples -The following code example demonstrates the use of the enumeration when specifying a constrained execution region for a method. This code example is part of a larger example provided for the constructor. - +The following code example demonstrates the use of the enumeration when specifying a constrained execution region for a method. This code example is part of a larger example provided for the constructor. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.ConstrainedExecution/Cer/Overview/program.cs" id="Snippet3"::: -:::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet3"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet3"::: + ]]> diff --git a/xml/System.Runtime.ConstrainedExecution/Consistency.xml b/xml/System.Runtime.ConstrainedExecution/Consistency.xml index 917f8b64895..76ec1e9e1a9 100644 --- a/xml/System.Runtime.ConstrainedExecution/Consistency.xml +++ b/xml/System.Runtime.ConstrainedExecution/Consistency.xml @@ -55,19 +55,19 @@ Specifies a reliability contract. - enumeration is used as a parameter to the attribute to specify the reliability guarantee on a given method. - - - -## Examples - The following code example demonstrates the use of the enumeration when specifying a constrained execution region for a method. This code example is part of a larger example provided for the constructor. - + enumeration is used as a parameter to the attribute to specify the reliability guarantee on a given method. + + + +## Examples + The following code example demonstrates the use of the enumeration when specifying a constrained execution region for a method. This code example is part of a larger example provided for the constructor. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.ConstrainedExecution/Cer/Overview/program.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet3"::: + ]]> diff --git a/xml/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute.xml b/xml/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute.xml index fdcf2caba06..ff08f89f062 100644 --- a/xml/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute.xml +++ b/xml/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute.xml @@ -66,7 +66,7 @@ ## Examples The following code example demonstrates the use of the attribute to document the level of reliability of an assembly. - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute/ReliabilityContract.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute/Overview/FxCop.Reliability.ReliabilityContract.vb" id="Snippet1"::: @@ -122,7 +122,7 @@ constructor to create a constrained execution region and a `finally` block that is guaranteed to execute. + The following code example demonstrates the use of the constructor to create a constrained execution region and a `finally` block that is guaranteed to execute. :::code language="csharp" source="~/snippets/csharp/System.Runtime.ConstrainedExecution/Cer/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.DurableInstancing/InstanceStore.xml b/xml/System.Runtime.DurableInstancing/InstanceStore.xml index 656dc459b70..c93e5c59315 100644 --- a/xml/System.Runtime.DurableInstancing/InstanceStore.xml +++ b/xml/System.Runtime.DurableInstancing/InstanceStore.xml @@ -16,16 +16,16 @@ Represents an instance store. - class. - - Persistence providers may call InstanceHandle.Free on handles passed to TryCommand, even after the command has finished executing. But persistence providers must not hold strong references to InstanceHandle or InstanceOwner objects, as this can prevent InstanceStore from being garbage collected. - + class. + + Persistence providers may call InstanceHandle.Free on handles passed to TryCommand, even after the command has finished executing. But persistence providers must not hold strong references to InstanceHandle or InstanceOwner objects, as this can prevent InstanceStore from being garbage collected. + > [!WARNING] -> Workflow definitions for persisted workflows cannot be changed. If a workflow definition is changed after it is persisted, the workflow runtime will crash when the workflow is reloaded. - +> Workflow definitions for persisted workflows cannot be changed. If a workflow definition is changed after it is persisted, the workflow runtime will crash when the workflow is reloaded. + ]]> @@ -78,11 +78,11 @@ Asynchronously executes persistence commands such as and . The state of the asynchronous operation. - method to execute a persistence command against an instance handle asynchronously. The host obtains the instance handle by invoking the method. The instance handle may be bound to entities that represent the context and subject of the command, such as an instance, instance owner, or instance lock. Only one command may be issued against an instance handle at a time. - + method to execute a persistence command against an instance handle asynchronously. The host obtains the instance handle by invoking the method. The instance handle may be bound to entities that represent the context and subject of the command, such as an instance, instance owner, or instance lock. Only one command may be issued against an instance handle at a time. + ]]> @@ -118,14 +118,14 @@ A persistence provider implements this method, which determines whether a particular persistence command can be executed. If the command can be executed, executes the command asynchronously. The state of the asynchronous operation. - [!WARNING] -> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. - +> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. + ]]> @@ -298,16 +298,16 @@ Gets or sets the default instance owner. The default instance owner. - [!WARNING] -> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. - +> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. + ]]> @@ -335,11 +335,11 @@ Ends the asynchronous operation. An InstanceView object representing the known state of the instance after the successful completion of the command. - @@ -367,13 +367,13 @@ Ends an asynchronous operation. A persistence provider implementation should return false if it doesn't support the command passed to the BeginTryCommand method. Otherwise it should return true or throw an exception. - [!WARNING] -> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. - +> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. + ]]> @@ -430,16 +430,16 @@ Executes a persistence command synchronously. Examples of persistence commands are: and . An InstanceView object representing the known state of the instance after the successful completion of the command. If Execute was called under a transaction, this state may include uncommitted data. Once the transaction is committed successfully, the data in the InstanceView object can be considered committed. - method to execute a persistence command against an instance handle, which the host obtains by invoking the method. The instance handle may be bound to entities that represent the context and subject of the command, such as an instance, instance owner, or instance lock. Only one command may be issued against an instance handle at a time. - + method to execute a persistence command against an instance handle, which the host obtains by invoking the method. The instance handle may be bound to entities that represent the context and subject of the command, such as an instance, instance owner, or instance lock. Only one command may be issued against an instance handle at a time. + > [!WARNING] -> If this method is executed with a , it will create an and bind it to the instance. This means that no other process will be able to access that workflow; if the process ends, the workflow cannot be recovered or executed. If such a workflow is executed again, a will be thrown. -> -> If is not used, the instance store will create a temporary that will be deleted at the end of the process. However, if the process ends before the workflow's final persistence point, this exception will be thrown, unless the period of time specified in the **HostLockRenewalPeriod** parameter has expired. - +> If this method is executed with a , it will create an and bind it to the instance. This means that no other process will be able to access that workflow; if the process ends, the workflow cannot be recovered or executed. If such a workflow is executed again, a will be thrown. +> +> If is not used, the instance store will create a temporary that will be deleted at the end of the process. However, if the process ends before the workflow's final persistence point, this exception will be thrown, unless the period of time specified in the **HostLockRenewalPeriod** parameter has expired. + ]]> @@ -489,11 +489,11 @@ Gets each InstanceOwner object that is bound to a valid instance handle or has not been garbage collected. The owner of the instance. - @@ -628,11 +628,11 @@ A persistence provider implements this method, which determines whether a particular persistence command can be executed and if the command can be executed executes it asynchronously. A persistence provider implementation should return if it doesn't support the command passed as a parameter; otherwise it should return or throw an exception. - to provide the results of the command. - + to provide the results of the command. + ]]> diff --git a/xml/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml b/xml/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml index e96a71357b6..55364b22347 100644 --- a/xml/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml +++ b/xml/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml @@ -55,11 +55,11 @@ Represents an exception whose state is captured at a certain point in code. - object stores the stack trace information and Watson information that an exception contains at the point where it's captured. The exception can then be thrown at another time and possibly on another thread by calling the method. The exception is thrown as if it had flowed from the point where it was captured to the point where the method is called. +## Remarks + +An object stores the stack trace information and Watson information that an exception contains at the point where it's captured. The exception can then be thrown at another time and possibly on another thread by calling the method. The exception is thrown as if it had flowed from the point where it was captured to the point where the method is called. For an example, see [Capture exceptions to rethrow later](/dotnet/standard/exceptions/best-practices-for-exceptions#capture-exceptions-to-rethrow-later). @@ -116,13 +116,13 @@ For an example, see [Capture exceptions to rethrow later](/dotnet/standard/excep Creates an object that represents the specified exception at the current point in code. An object that represents the specified exception at the current point in code. - object that's returned by this method at another time and possibly on another thread to rethrow the specified exception, as if the exception had flowed from the point where it was captured to the point where it's rethrown. - - If the exception is active when it's captured, the current stack trace information and Watson information that's contained in the exception is stored. If it's inactive, that is, if it has not been thrown, it doesn't have any stack trace or Watson information. - + object that's returned by this method at another time and possibly on another thread to rethrow the specified exception, as if the exception had flowed from the point where it was captured to the point where it's rethrown. + + If the exception is active when it's captured, the current stack trace information and Watson information that's contained in the exception is stored. If it's inactive, that is, if it has not been thrown, it doesn't have any stack trace or Watson information. + ]]> @@ -210,7 +210,7 @@ For an example, see [Capture exceptions to rethrow later](/dotnet/standard/excep ## Remarks This method populates the property from an arbitrary string value. The typical use case is the transmission of objects across processes with high fidelity, allowing preservation of the exception object's stack trace information. .NET does not attempt to parse the provided string value. - + The caller is responsible for canonicalizing line endings if required. can be used to canonicalize line endings. If the caller provides untrusted input to this API, this may result in the exception's stack trace containing embedded null characters, reserved HTML or JSON characters, or other unexpected values. Applications that display an exception's details to the user should always take care to encode the exception information at the point where it's displayed. @@ -263,11 +263,11 @@ If the caller provides untrusted input to this API, this may result in the excep Gets the exception that's represented by the current instance. The exception that's represented by the current instance. - object. It's not intended to be used by application code. Use the method to restore the state of the captured exception and throw it. - + object. It's not intended to be used by application code. Use the method to restore the state of the captured exception and throw it. + ]]> @@ -320,11 +320,11 @@ If the caller provides untrusted input to this API, this may result in the excep Throws the exception that's represented by the current object, after restoring the state that was saved when the exception was captured. - diff --git a/xml/System.Runtime.Hosting/ApplicationActivator.xml b/xml/System.Runtime.Hosting/ApplicationActivator.xml index 47105bb2fc3..d057f663783 100644 --- a/xml/System.Runtime.Hosting/ApplicationActivator.xml +++ b/xml/System.Runtime.Hosting/ApplicationActivator.xml @@ -29,7 +29,7 @@ ## Remarks There is a single designated instance of the class in each to which all activation calls are routed. The for the current can provide its own custom for this purpose. If a custom is not provided, an instance of the default is created. - The following steps describe the behavior of the default method implementation: + The following steps describe the behavior of the default method implementation: 1. Checks if the of the add-in to be activated matches the of the current domain; if not, proceeds to step 2. Otherwise, executes the assembly and returns the result wrapped in an object handle. @@ -37,9 +37,9 @@ 1. Creates a new object using an object containing the activation context for the add-in. - 2. Calls the method to create a new domain using the object. + 2. Calls the method to create a new domain using the object. - 3. The method calls the method to acquire an object for the add-in. If the property returns `true`, the add-in is executed. If not, throws a indicating that execution permission could not be acquired. + 3. The method calls the method to acquire an object for the add-in. If the property returns `true`, the add-in is executed. If not, throws a indicating that execution permission could not be acquired. 4. If the add-in is trusted to run, then a new is created and configured for the of the add-in, and the add-in is loaded and executed. @@ -51,14 +51,14 @@ 1. The custom activator finds a domain that has the same as the add-in that is being activated. -2. If the has never been seen before in the process, the custom activator creates a new for this by calling the method directly, or delegating this activity to the in the base class. +2. If the has never been seen before in the process, the custom activator creates a new for this by calling the method directly, or delegating this activity to the in the base class. -3. If there is an existing domain with the same , then the activator can delegate the method call to the in the target domain. Note that this would be a cross-domain call to an that resides in the target . +3. If there is an existing domain with the same , then the activator can delegate the method call to the in the target domain. Note that this would be a cross-domain call to an that resides in the target . ## Examples - The following code example shows how to obtain an object from the current for a manifest-based application. + The following code example shows how to obtain an object from the current for a manifest-based application. :::code language="csharp" source="~/snippets/csharp/System.Runtime.Hosting/ActivationArguments/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Hosting/ActivationArguments/Overview/program.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.InteropServices.ComTypes/CONNECTDATA.xml b/xml/System.Runtime.InteropServices.ComTypes/CONNECTDATA.xml index 3d53087dab1..eac2ce4d4b1 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/CONNECTDATA.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/CONNECTDATA.xml @@ -58,15 +58,15 @@ Describes a connection that exists to a given connection point. - method. - + method. + For more information, see [CONNECTDATA structure](/windows/win32/api/ocidl/ns-ocidl-connectdata). - - The common language runtime throws an exception when a COM method in native code returns an HRESULT. For more information, see [How to: Map HRESULTs and Exceptions](/dotnet/framework/interop/how-to-map-hresults-and-exceptions). - + + The common language runtime throws an exception when a COM method in native code returns an HRESULT. For more information, see [How to: Map HRESULTs and Exceptions](/dotnet/framework/interop/how-to-map-hresults-and-exceptions). + ]]> diff --git a/xml/System.Runtime.InteropServices.ComTypes/IAdviseSink.xml b/xml/System.Runtime.InteropServices.ComTypes/IAdviseSink.xml index ea6b084d522..68b8285b303 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/IAdviseSink.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/IAdviseSink.xml @@ -63,15 +63,15 @@ Provides a managed definition of the interface. - @@ -120,13 +120,13 @@ Notifies all registered advisory sinks that the object has changed from the running state to the loaded state. This method is called by a server. - notification indicates that an object is making the transition from the running state to the loaded state, so its container can take appropriate measures to ensure orderly shutdown. For example, an object handler must release its pointer to the object. - + notification indicates that an object is making the transition from the running state to the loaded state, so its container can take appropriate measures to ensure orderly shutdown. For example, an object handler must release its pointer to the object. + For more information, see [IAdviseSink::OnClose method](/windows/win32/api/objidl/nf-objidl-iadvisesink-onclose). - + ]]> @@ -181,11 +181,11 @@ A , passed by reference, which defines the storage medium (global memory, disk file, storage object, stream object, Graphics Device Interface (GDI) object, or undefined) and ownership of that medium for the calling data object. Notifies all data objects currently registered advisory sinks that data in the object has changed. - @@ -237,11 +237,11 @@ A pointer to the interface on the new full moniker of the object. Notifies all registered advisory sinks that the object has been renamed. This method is called by a server. - @@ -290,11 +290,11 @@ Notifies all registered advisory sinks that the object has been saved. This method is called by a server. - @@ -348,11 +348,11 @@ The portion of the view that has changed. Currently, only -1 is valid. Notifies an object's registered advisory sinks that its view has changed. This method is called by a server. - diff --git a/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo.xml b/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo.xml index b10c36172f3..4c43b09815f 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo.xml @@ -63,13 +63,13 @@ Provides the managed definition of the Component Automation ITypeInfo interface. - @@ -125,11 +125,11 @@ When this method returns, contains a reference to the member. This parameter is passed uninitialized. Retrieves the addresses of static functions or variables, such as those defined in a DLL. - @@ -194,11 +194,11 @@ When this method returns, contains a reference to the created object. This parameter is passed uninitialized. Creates a new instance of a type that describes a component class (coclass). - @@ -252,11 +252,11 @@ When this method returns, contains a reference to the index of the type description within the containing type library. This parameter is passed uninitialized. Retrieves the type library that contains this type description and its index within that type library. - @@ -316,11 +316,11 @@ If not , and the function is defined by an ordinal, then lpwOrdinal is set to point to the ordinal. Retrieves a description or specification of an entry point for a function in a DLL. - @@ -380,11 +380,11 @@ When this method returns, contains the fully qualified name of the Help file. This parameter is passed uninitialized. Retrieves the documentation string, the complete Help file name and path, and the context ID for the Help topic for a specified type description. - @@ -438,13 +438,13 @@ When this method returns, contains a reference to a structure that describes the specified function. This parameter is passed uninitialized. Retrieves the structure that contains information about a specified function. - method. - + method. + For more information, see [ITypeInfo::GetFuncDesc method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getfuncdesc). - + ]]> @@ -501,11 +501,11 @@ When this method returns, contains a reference to an array in which name mappings are placed. This parameter is passed uninitialized. Maps between member names and member IDs, and parameter names and parameter IDs. - @@ -559,11 +559,11 @@ When this method returns, contains a reference to the enumeration. This parameter is passed uninitialized. Retrieves the value for one implemented interface or base interface in a type description. - @@ -618,11 +618,11 @@ When this method returns, contains a reference to the string used in marshaling the fields of the structure described by the referenced type description, or returns if there is no information to return. This parameter is passed uninitialized. Retrieves marshaling information. - @@ -681,11 +681,11 @@ When this method returns, contains the number of names in the array. This parameter is passed uninitialized. Retrieves the variable with the specified member ID (or the name of the property or method and its parameters) that corresponds to the specified function ID. - @@ -739,11 +739,11 @@ When this method returns, contains the referenced type description. This parameter is passed uninitialized. Retrieves the referenced type descriptions if a type description references other type descriptions. - @@ -797,11 +797,11 @@ When this method returns, contains a reference to a handle for the implemented interface. This parameter is passed uninitialized. Retrieves the type description of the implemented interface types if a type description describes a COM class. - @@ -853,13 +853,13 @@ When this method returns, contains a reference to the structure that contains the attributes of this type description. This parameter is passed uninitialized. Retrieves a structure that contains the attributes of the type description. - method. - + method. + For more information, see [ITypeInfo::GetTypeAttr method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-gettypeattr). - + ]]> @@ -911,11 +911,11 @@ When this method returns, contains a reference to the interface of the containing type library. This parameter is passed uninitialized. Retrieves the interface for the type description, which enables a client compiler to bind to the type description's members. - @@ -969,13 +969,13 @@ When this method returns, contains a reference to the structure that describes the specified variable. This parameter is passed uninitialized. Retrieves a structure that describes the specified variable. - method. - + method. + For more information, see [ITypeInfo::GetVarDesc method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getvardesc). - + ]]> @@ -1039,22 +1039,22 @@ If returns , indicates the index within rgvarg of the argument with the incorrect type. If more than one argument returns an error, indicates only the first argument with an error. This parameter is passed uninitialized. Invokes a method, or accesses a property of an object, that implements the interface described by the type description. - method. - - Valid values for the `wFlags` parameter are: - -|Value|Description| -|-----------|-----------------| -|DISPATCH_METHOD|The member is accessed as a method. If there is ambiguity, both this flag and the `DISPATCH_PROPERTYGET` flag can be set.| -|DISPATCH_PROPERTYGET|The member is retrieved as a property or data member.| -|DISPATCH_PROPERTYPUT|The member is changed as a property or data member.| -|DISPATCH_PROPERTYPUTREF|The member is changed by using a reference assignment, rather than a value assignment. This value is valid only when the property accepts a reference to an object.| - + method. + + Valid values for the `wFlags` parameter are: + +|Value|Description| +|-----------|-----------------| +|DISPATCH_METHOD|The member is accessed as a method. If there is ambiguity, both this flag and the `DISPATCH_PROPERTYGET` flag can be set.| +|DISPATCH_PROPERTYGET|The member is retrieved as a property or data member.| +|DISPATCH_PROPERTYPUT|The member is changed as a property or data member.| +|DISPATCH_PROPERTYPUTREF|The member is changed by using a reference assignment, rather than a value assignment. This value is valid only when the property accepts a reference to an object.| + For more information, see [ITypeInfo::Invoke method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-invoke). - + ]]> @@ -1106,11 +1106,11 @@ A reference to the structure to release. Releases a structure previously returned by the method. - @@ -1162,11 +1162,11 @@ A reference to the structure to release. Releases a structure previously returned by the method. - @@ -1218,11 +1218,11 @@ A reference to the structure to release. Releases a structure previously returned by the method. - diff --git a/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo2.xml b/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo2.xml index 101eb243a05..5f3ad7067a4 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo2.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo2.xml @@ -902,7 +902,7 @@ method. + The values of the `ppFuncDesc` parameter can be accessed through the method. For more information, see [ITypeInfo::GetFuncDesc method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getfuncdesc). @@ -1506,7 +1506,7 @@ method. + The values of the `ppTypeAttr` parameter can be accessed through the method. For more information, see [ITypeInfo::GetTypeAttr method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-gettypeattr). @@ -1786,7 +1786,7 @@ method. + The values of the `ppVarDesc` parameter can be accessed through the method. For more information, see [ITypeInfo::GetVarDesc method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getvardesc). @@ -1910,7 +1910,7 @@ method. + The values of the `pDispParams` parameter can be accessed through the method. Valid values for `wFlags` are: diff --git a/xml/System.Runtime.InteropServices.ComTypes/ITypeLib.xml b/xml/System.Runtime.InteropServices.ComTypes/ITypeLib.xml index 9371e0d95e8..3f16db57ccb 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/ITypeLib.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/ITypeLib.xml @@ -63,13 +63,13 @@ Provides the managed definition of the interface. - @@ -127,20 +127,20 @@ A hash value to speed up the search, computed by the function. If is 0, a value is computed. When this method returns, contains an array of pointers to the type descriptions that contain the name specified in . This parameter is passed uninitialized. An array of the 's of the found items; [i] is the that indexes into the type description specified by [i]. Cannot be . - On entry, indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. - + On entry, indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. + On exit, indicates the number of instances that were found. If the and values of are identical, there might be more type descriptions that contain the name. Finds occurrences of a type description in a type library. - method passes "abc" as the `szNameBuf` parameter, `szNameBuf` becomes "aBc" when the method returns. - + method passes "abc" as the `szNameBuf` parameter, `szNameBuf` becomes "aBc" when the method returns. + For more information, see [ITypeLib::FindName method](/windows/win32/api/oaidl/nf-oaidl-itypelib-findname). - + ]]> @@ -200,11 +200,11 @@ When this method returns, contains a string that represents the fully qualified name of the Help file. This parameter is passed uninitialized. Retrieves the library's documentation string, the complete Help file name and path, and the context identifier for the library Help topic in the Help file. - @@ -256,13 +256,13 @@ When this method returns, contains a structure that contains the library's attributes. This parameter is passed uninitialized. Retrieves the structure that contains the library's attributes. - method. - + method. + For more information, see [ITypeLib::GetLibAttr method](/windows/win32/api/oaidl/nf-oaidl-itypelib-getlibattr). - + ]]> @@ -314,11 +314,11 @@ When this method returns, contains an instance of a instance for this . This parameter is passed uninitialized. Enables a client compiler to bind to a library's types, variables, constants, and global functions. - @@ -372,11 +372,11 @@ When this method returns, contains an describing the type referenced by . This parameter is passed uninitialized. Retrieves the specified type description in the library. - @@ -426,11 +426,11 @@ Returns the number of type descriptions in the type library. The number of type descriptions in the type library. - @@ -484,11 +484,11 @@ When this method returns, contains the requested interface. This parameter is passed uninitialized. Retrieves the type description that corresponds to the specified GUID. - @@ -542,11 +542,11 @@ When this method returns, contains a reference to the enumeration for the type description. This parameter is passed uninitialized. Retrieves the type of a type description. - @@ -602,13 +602,13 @@ if was found in the type library; otherwise, . - method passes "abc" as the `szNameBuf` parameter, `szNameBuf` becomes "aBc" when the method returns. - + method passes "abc" as the `szNameBuf` parameter, `szNameBuf` becomes "aBc" when the method returns. + For more information, see [ITypeLib::IsName method](/windows/win32/api/oaidl/nf-oaidl-itypelib-isname). - + ]]> @@ -660,11 +660,11 @@ The structure to release. Releases the structure originally obtained from the method. - diff --git a/xml/System.Runtime.InteropServices.ComTypes/ITypeLib2.xml b/xml/System.Runtime.InteropServices.ComTypes/ITypeLib2.xml index ec49ee0070b..830a5ffdfbf 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/ITypeLib2.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/ITypeLib2.xml @@ -67,13 +67,13 @@ Provides a managed definition of the interface. - @@ -134,18 +134,18 @@ A hash value to speed up the search, computed by the function. If is 0, a value is computed. When this method returns, contains an array of pointers to the type descriptions that contain the name specified in . This parameter is passed uninitialized. When this method returns, contains an array of the s of the found items; [i] is the that indexes into the type description specified by [i]. This parameter cannot be . This parameter is passed uninitialized. - On entry, a value, passed by reference, that indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. - + On entry, a value, passed by reference, that indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. + On exit, indicates the number of instances that were found. If the and values of are identical, there might be more type descriptions that contain the name. Finds occurrences of a type description in a type library. - @@ -308,11 +308,11 @@ When this method returns, contains a string that specifies the fully qualified name of the Help file. This parameter is passed uninitialized. Retrieves the library's documentation string, the complete Help file name and path, and the context identifier for the library Help topic in the Help file. - @@ -428,13 +428,13 @@ When this method returns, contains a structure that contains the library's attributes. This parameter is passed uninitialized. Retrieves the structure that contains the library's attributes. - method. - + method. + For more information, see [ITypeLib::GetLibAttr method](/windows/win32/api/oaidl/nf-oaidl-itypelib-getlibattr). - + ]]> @@ -488,11 +488,11 @@ When this method returns, contains a pointer to a change in the count of unique names. This parameter is passed uninitialized. Returns statistics about a type library that are required for efficient sizing of hash tables. - @@ -547,11 +547,11 @@ When this method returns, contains an instance for this . This parameter is passed uninitialized. Enables a client compiler to bind to a library's types, variables, constants, and global functions. - @@ -608,11 +608,11 @@ When this method returns, contains an describing the type referenced by . This parameter is passed uninitialized. Retrieves the specified type description in the library. - @@ -665,11 +665,11 @@ Returns the number of type descriptions in the type library. The number of type descriptions in the type library. - @@ -726,11 +726,11 @@ When this method returns, contains the requested interface. This parameter is passed uninitialized. Retrieves the type description that corresponds to the specified GUID. - @@ -787,11 +787,11 @@ When this method returns, contains a reference to the enumeration for the type description. This parameter is passed uninitialized. Retrieves the type of a type description. - @@ -850,11 +850,11 @@ if was found in the type library; otherwise, . - @@ -909,11 +909,11 @@ The structure to release. Releases the structure originally obtained from the method. - diff --git a/xml/System.Runtime.InteropServices.CustomMarshalers/EnumerableToDispatchMarshaler.xml b/xml/System.Runtime.InteropServices.CustomMarshalers/EnumerableToDispatchMarshaler.xml index 4fa33827e55..d8aebe1496f 100644 --- a/xml/System.Runtime.InteropServices.CustomMarshalers/EnumerableToDispatchMarshaler.xml +++ b/xml/System.Runtime.InteropServices.CustomMarshalers/EnumerableToDispatchMarshaler.xml @@ -23,11 +23,11 @@ Marshals the COM interface to the .NET Framework interface, and vice versa. - and marshals to `IDispatch` when a member with a DISPID of -4 exists. When you use the Type Library Importer (Tlbimp.exe) to create a class that implements , the CLR uses this custom marshaler automatically to bridge COM enumerators and .NET enumerators. Calling results in `IDispatch.Invoke` being called with a DISPID of -4, and vice versa. - + and marshals to `IDispatch` when a member with a DISPID of -4 exists. When you use the Type Library Importer (Tlbimp.exe) to create a class that implements , the CLR uses this custom marshaler automatically to bridge COM enumerators and .NET enumerators. Calling results in `IDispatch.Invoke` being called with a DISPID of -4, and vice versa. + ]]> @@ -49,7 +49,7 @@ [!NOTE] > This member is removed in the .NET Framework version 2.0 and subsequent versions. @@ -89,11 +89,11 @@ The managed object to be destroyed. Performs necessary cleanup of the managed data when it is no longer needed. - method. - + method. + ]]> @@ -129,11 +129,11 @@ A pointer to the unmanaged data to be destroyed. Performs necessary cleanup of the unmanaged data when it is no longer needed. - method. - + method. + ]]> @@ -164,11 +164,11 @@ Returns an instance of the custom marshaler. An instance of the custom marshaler. - interface definition. - + interface definition. + ]]> @@ -202,11 +202,11 @@ Returns the size in bytes of the unmanaged data to be marshaled. -1 to indicate the type this marshaler handles is not a value type. - @@ -243,11 +243,11 @@ Marshals an object from managed code to unmanaged code. A pointer to the unmanaged object. - @@ -286,11 +286,11 @@ Marshals an object from unmanaged code to managed code. A managed object. - diff --git a/xml/System.Runtime.InteropServices.CustomMarshalers/EnumeratorToEnumVariantMarshaler.xml b/xml/System.Runtime.InteropServices.CustomMarshalers/EnumeratorToEnumVariantMarshaler.xml index 047753319a1..b48aa2e9ccb 100644 --- a/xml/System.Runtime.InteropServices.CustomMarshalers/EnumeratorToEnumVariantMarshaler.xml +++ b/xml/System.Runtime.InteropServices.CustomMarshalers/EnumeratorToEnumVariantMarshaler.xml @@ -23,11 +23,11 @@ Marshals the COM interface to the .NET Framework interface, and vice versa. - and marshals to `IEnumVARIANT`. The CLR automatically uses this class to bridge COM enumerators and .NET enumerators. The type returned by the method in the imported COM class uses `EnumeratorToEnumVariantMarshaler` to map the calls to the `IEnumVARIANT` interface pointer returned by the COM object's member with a DISPID of -4. - + and marshals to `IEnumVARIANT`. The CLR automatically uses this class to bridge COM enumerators and .NET enumerators. The type returned by the method in the imported COM class uses `EnumeratorToEnumVariantMarshaler` to map the calls to the `IEnumVARIANT` interface pointer returned by the COM object's member with a DISPID of -4. + ]]> @@ -49,7 +49,7 @@ [!NOTE] > This member is removed in the .NET Framework version 2.0 and subsequent versions. @@ -89,11 +89,11 @@ The managed object to be destroyed. Performs necessary cleanup of the managed data when it is no longer needed. - method. - + method. + ]]> @@ -129,11 +129,11 @@ A pointer to the unmanaged data to be destroyed. Performs necessary cleanup of the unmanaged data when it is no longer needed. - method. - + method. + ]]> @@ -164,11 +164,11 @@ Returns an instance of the custom marshaler. An instance of the custom marshaler. - interface definition. - + interface definition. + ]]> @@ -202,11 +202,11 @@ Returns the size in bytes of the unmanaged data to be marshaled. -1 to indicate the type this marshaler handles is not a value type. - @@ -243,11 +243,11 @@ Marshals an object from managed code to unmanaged code. A pointer to the unmanaged object. - @@ -286,11 +286,11 @@ Marshals an object from unmanaged code to managed code. A managed object. - diff --git a/xml/System.Runtime.InteropServices.CustomMarshalers/ExpandoToDispatchExMarshaler.xml b/xml/System.Runtime.InteropServices.CustomMarshalers/ExpandoToDispatchExMarshaler.xml index bddf6a9310b..98fb1613cda 100644 --- a/xml/System.Runtime.InteropServices.CustomMarshalers/ExpandoToDispatchExMarshaler.xml +++ b/xml/System.Runtime.InteropServices.CustomMarshalers/ExpandoToDispatchExMarshaler.xml @@ -23,15 +23,15 @@ Marshals the COM interface to either the .NET Framework interface, or to the interface, and vice versa. - @@ -53,7 +53,7 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef [!NOTE] > This member is removed in the .NET Framework version 2.0 and subsequent versions. @@ -93,11 +93,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef The managed object to be destroyed. Performs necessary cleanup of the managed data when it is no longer needed. - method. - + method. + ]]> @@ -133,11 +133,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef A pointer to the unmanaged data to be destroyed. Performs necessary cleanup of the unmanaged data when it is no longer needed. - method. - + method. + ]]> @@ -168,11 +168,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef Returns an instance of the custom marshaler. An instance of the custom marshaler. - interface definition. - + interface definition. + ]]> @@ -208,11 +208,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef Returns the size in bytes of the unmanaged data to be marshaled. -1 to indicate the type this marshaler handles is not a value type. - @@ -249,11 +249,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef Marshals an object from managed code to unmanaged code. A pointer to the unmanaged object. - @@ -292,11 +292,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef Marshals an object from unmanaged code to managed code. A managed object. - diff --git a/xml/System.Runtime.InteropServices.CustomMarshalers/TypeToTypeInfoMarshaler.xml b/xml/System.Runtime.InteropServices.CustomMarshalers/TypeToTypeInfoMarshaler.xml index 1f680efad9b..3423bb155f7 100644 --- a/xml/System.Runtime.InteropServices.CustomMarshalers/TypeToTypeInfoMarshaler.xml +++ b/xml/System.Runtime.InteropServices.CustomMarshalers/TypeToTypeInfoMarshaler.xml @@ -23,15 +23,15 @@ Marshals the unmanaged interface to the managed class, and marshals the managed class to the unmanaged interface. - instance exposed for an `ITypeInfo` interface is based on the metadata that would appear in an imported assembly. - - The Type Library Importer (Tlbimp.exe) marks `ITypeInfo` parameters with the appropriate with the enumeration member when converting signatures that use `ITypeInfo` parameters to signatures that use parameters. - - The same conversion functionality can be accomplished without the custom marshaler, by calling and . - + instance exposed for an `ITypeInfo` interface is based on the metadata that would appear in an imported assembly. + + The Type Library Importer (Tlbimp.exe) marks `ITypeInfo` parameters with the appropriate with the enumeration member when converting signatures that use `ITypeInfo` parameters to signatures that use parameters. + + The same conversion functionality can be accomplished without the custom marshaler, by calling and . + ]]> @@ -53,7 +53,7 @@ [!NOTE] > This member is removed in the .NET Framework version 2.0 and subsequent versions. @@ -93,11 +93,11 @@ The managed object to be destroyed. Performs necessary cleanup of the managed data when it is no longer needed. - method. - + method. + ]]> @@ -133,11 +133,11 @@ A pointer to the unmanaged data to be destroyed. Performs necessary cleanup of the unmanaged data when it is no longer needed. - method. - + method. + ]]> @@ -168,11 +168,11 @@ Returns an instance of the custom marshaler. An instance of the custom marshaler. - interface definition. - + interface definition. + ]]> @@ -206,11 +206,11 @@ Returns the size in bytes of the unmanaged data to be marshaled. -1 to indicate the type this marshaler handles is not a value type. - @@ -247,11 +247,11 @@ Marshals an object from managed code to unmanaged code. A pointer to the unmanaged object. - @@ -290,11 +290,11 @@ Marshals an object from unmanaged code to managed code. A managed object. - diff --git a/xml/System.Runtime.InteropServices.Marshalling/ReadOnlySpanMarshaller`2.xml b/xml/System.Runtime.InteropServices.Marshalling/ReadOnlySpanMarshaller`2.xml index a98f288578f..86cb1c20af8 100644 --- a/xml/System.Runtime.InteropServices.Marshalling/ReadOnlySpanMarshaller`2.xml +++ b/xml/System.Runtime.InteropServices.Marshalling/ReadOnlySpanMarshaller`2.xml @@ -71,7 +71,7 @@ ## Remarks -A marshalled with this marshaller will match the semantics of . +A marshalled with this marshaller will match the semantics of . In particular, this marshaller will pass a non-`null` value for a zero-length span if the span was constructed with a non-`null` value. ]]> diff --git a/xml/System.Runtime.InteropServices.Marshalling/SpanMarshaller`2.xml b/xml/System.Runtime.InteropServices.Marshalling/SpanMarshaller`2.xml index 68016a9b607..53906a6ed03 100644 --- a/xml/System.Runtime.InteropServices.Marshalling/SpanMarshaller`2.xml +++ b/xml/System.Runtime.InteropServices.Marshalling/SpanMarshaller`2.xml @@ -67,7 +67,7 @@ ## Remarks -A marshalled with this marshaller will match the semantics of . +A marshalled with this marshaller will match the semantics of . In particular, this marshaller will pass a non-`null` value for a zero-length span if the span was constructed with a non-`null` value. ]]> diff --git a/xml/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml b/xml/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml index 2fa49620a6c..db740241627 100644 --- a/xml/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml +++ b/xml/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml @@ -39,7 +39,7 @@ ## Remarks Use this type when you need to manage the addition and removal of events manually. - An instance of this table stores the delegates that represent the event handlers that have been added to an event. To raise the event, invoke the delegate that is returned by the property, if it is not `null`. An instance of this table is required for each event. + An instance of this table stores the delegates that represent the event handlers that have been added to an event. To raise the event, invoke the delegate that is returned by the property, if it is not `null`. An instance of this table is required for each event. ]]> @@ -138,7 +138,7 @@ method to initialize an event registration token table in scenarios where any of several threads can create the table. If this method is called on multiple threads at the same time, the same event registration token table is returned on all threads. + Use the method to initialize an event registration token table in scenarios where any of several threads can create the table. If this method is called on multiple threads at the same time, the same event registration token table is returned on all threads. ]]> diff --git a/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml b/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml index 62b520faefd..1acab8c0b64 100644 --- a/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml +++ b/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml @@ -341,7 +341,7 @@ method to release the [HSTRING](https://go.microsoft.com/fwlink/p/?LinkId=246451) when you are done using it. + Use the method to release the [HSTRING](https://go.microsoft.com/fwlink/p/?LinkId=246451) when you are done using it. ]]> diff --git a/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml b/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml index 3fe3211aa5f..38fb933880a 100644 --- a/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml +++ b/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml @@ -17,14 +17,14 @@ Provides an event for resolving reflection-only type requests for types that are provided by Windows Metadata files, and methods for performing the resolution. - [!NOTE] -> Sub-namespaces don't imply containment. That is, namespace A.B isn't contained in namespace A. - +> Sub-namespaces don't imply containment. That is, namespace A.B isn't contained in namespace A. + ]]> @@ -89,16 +89,16 @@ Occurs when the resolution of a Windows Metadata file fails in the reflection-only context. - event for managed assemblies. - - See the class. - + event for managed assemblies. + + See the class. + > [!IMPORTANT] -> The event handler for this event should not throw exceptions. - +> The event handler for this event should not throw exceptions. + ]]> @@ -145,11 +145,11 @@ Locates the Windows Metadata files for the specified namespace, given the specified locations to search. An enumerable list of strings that represent the Windows Metadata files that define . - method overload and specifying `null` for the `windowsSdkFilePath` parameter. - + method overload and specifying `null` for the `windowsSdkFilePath` parameter. + ]]> The operating system version does not support the Windows Runtime. @@ -190,11 +190,11 @@ Locates the Windows Metadata files for the specified namespace, given the specified locations to search. An enumerable list of strings that represent the Windows Metadata files that define . - The operating system version does not support the Windows Runtime. diff --git a/xml/System.Runtime.InteropServices/ArrayWithOffset.xml b/xml/System.Runtime.InteropServices/ArrayWithOffset.xml index 597addcaa1d..d62ec1078f1 100644 --- a/xml/System.Runtime.InteropServices/ArrayWithOffset.xml +++ b/xml/System.Runtime.InteropServices/ArrayWithOffset.xml @@ -80,11 +80,11 @@ Encapsulates an array and an offset within the specified array. - @@ -472,7 +472,7 @@ if the value of is the same as the value of ; otherwise, . - .]]> + .]]> @@ -527,7 +527,7 @@ if the value of is not the same as the value of ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Runtime.InteropServices/COMException.xml b/xml/System.Runtime.InteropServices/COMException.xml index eb884081099..3e4f6788f85 100644 --- a/xml/System.Runtime.InteropServices/COMException.xml +++ b/xml/System.Runtime.InteropServices/COMException.xml @@ -139,8 +139,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -199,8 +199,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||`message`| +||`null`| +||`message`| ]]> @@ -333,8 +333,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> @@ -399,8 +399,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||`message`| +||`null`| +||`message`| ]]> diff --git a/xml/System.Runtime.InteropServices/CONNECTDATA.xml b/xml/System.Runtime.InteropServices/CONNECTDATA.xml index e52e1006c59..f201141d87f 100644 --- a/xml/System.Runtime.InteropServices/CONNECTDATA.xml +++ b/xml/System.Runtime.InteropServices/CONNECTDATA.xml @@ -29,13 +29,13 @@ Use instead. - method. - - For more information about `CONNECTDATA`, see the MSDN Library. - + method. + + For more information about `CONNECTDATA`, see the MSDN Library. + ]]> diff --git a/xml/System.Runtime.InteropServices/CollectionsMarshal.xml b/xml/System.Runtime.InteropServices/CollectionsMarshal.xml index 41310c50635..026035f958b 100644 --- a/xml/System.Runtime.InteropServices/CollectionsMarshal.xml +++ b/xml/System.Runtime.InteropServices/CollectionsMarshal.xml @@ -289,7 +289,7 @@ Items should not be added to or removed from the while the ref `TValue` is in use. -The ref `null` can be detected by calling . +The ref `null` can be detected by calling . ]]> diff --git a/xml/System.Runtime.InteropServices/ComAwareEventInfo.xml b/xml/System.Runtime.InteropServices/ComAwareEventInfo.xml index 8f8df06c9a0..43e9c23b048 100644 --- a/xml/System.Runtime.InteropServices/ComAwareEventInfo.xml +++ b/xml/System.Runtime.InteropServices/ComAwareEventInfo.xml @@ -75,11 +75,11 @@ and methods instead of using regular add handler and remove handler methods for events. This occurs if the interface that the corresponding event is defined on needs to be embedded. + Normally, compilers will automatically embed calls to the and methods instead of using regular add handler and remove handler methods for events. This occurs if the interface that the corresponding event is defined on needs to be embedded. You can specify this by embedding the entire assembly that contains the interface by using the **/link** option on the compilers or by setting the **Embed Interop Types** property to `True` in Visual Studio. - The type derives from the class and overrides the and methods. + The type derives from the class and overrides the and methods. ]]> @@ -196,11 +196,11 @@ method except that it allows you to attach events to COM objects. + This method is similar to the method except that it allows you to attach events to COM objects. - If `target` is a COM object, this method adds a delegate to an event by using the method. + If `target` is a COM object, this method adds a delegate to an event by using the method. - facilitates registering COM event sinks that forward calls to corresponding managed delegates. It requires the following information: + facilitates registering COM event sinks that forward calls to corresponding managed delegates. It requires the following information: - The target object itself (`target`). @@ -210,7 +210,7 @@ - The delegate that would be invoked when the COM object triggers the corresponding event (`handler`). - looks up the corresponding COM source interface (specified as the first parameter of the constructor). It then looks up a method on the source interface whose name is identical to the event name. The value of `GuidAttribute` on the source interface is the GUID that is passed to ; the value of `DispIDAttribute` on the method is the DispID value that is passed to . + looks up the corresponding COM source interface (specified as the first parameter of the constructor). It then looks up a method on the source interface whose name is identical to the event name. The value of `GuidAttribute` on the source interface is the GUID that is passed to ; the value of `DispIDAttribute` on the method is the DispID value that is passed to . ]]> @@ -368,7 +368,7 @@ method. + This method calls the method. ]]> @@ -432,7 +432,7 @@ method of the underlying object. + This method calls the method of the underlying object. ]]> @@ -944,11 +944,11 @@ method, except that it allows you to detach events from COM objects. + This method is similar to the method, except that it allows you to detach events from COM objects. - If `target` is a COM object, this method releases a delegate to an event by using the method. + If `target` is a COM object, this method releases a delegate to an event by using the method. - facilitates unregistering COM event sinks that forward calls to corresponding managed delegates. It requires the following information: + facilitates unregistering COM event sinks that forward calls to corresponding managed delegates. It requires the following information: - The target object itself (`target`). @@ -958,7 +958,7 @@ - The delegate that would be invoked when the COM object triggers the corresponding event (`handler`). - looks up the corresponding COM source interface (specified as the first parameter of the constructor). It then it looks up a method on the source interface whose name is identical to the event name. The value of `GuidAttribute` on the source interface is the GUID that is passed to ; the value of `DispIDAttribute` on the method is the DispID value that is passed to . + looks up the corresponding COM source interface (specified as the first parameter of the constructor). It then it looks up a method on the source interface whose name is identical to the event name. The value of `GuidAttribute` on the source interface is the GUID that is passed to ; the value of `DispIDAttribute` on the method is the DispID value that is passed to . ]]> diff --git a/xml/System.Runtime.InteropServices/ComRegisterFunctionAttribute.xml b/xml/System.Runtime.InteropServices/ComRegisterFunctionAttribute.xml index 49c845384d8..d93e0ea77d1 100644 --- a/xml/System.Runtime.InteropServices/ComRegisterFunctionAttribute.xml +++ b/xml/System.Runtime.InteropServices/ComRegisterFunctionAttribute.xml @@ -63,7 +63,7 @@ `ComRegisterFunctionAttribute` enables you to add arbitrary registration code to accommodate the requirements of COM clients. For example, you can update the registry using registration functions from the namespace. If you provide a registration method, you should also apply to an unregistration method, which reverses the operations done in the registration method. -**.NET Framework:** The common language runtime calls the method with this attribute when its containing assembly is registered (directly or indirectly) with the [Regasm.exe (Assembly Registration) tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) or through the method. +**.NET Framework:** The common language runtime calls the method with this attribute when its containing assembly is registered (directly or indirectly) with the [Regasm.exe (Assembly Registration) tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) or through the method. **.NET Core:** The common language runtime calls the method with this attribute when its containing assembly's COM host is registered via the [RegSvr32.exe tool](https://learn.microsoft.com/windows-server/administration/windows-commands/regsvr32). diff --git a/xml/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.xml b/xml/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.xml index 3bf7db1965f..a4bae374968 100644 --- a/xml/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.xml +++ b/xml/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.xml @@ -56,24 +56,24 @@ Specifies the method to call when you unregister an assembly for use from COM; this allows for the execution of user-written code during the unregistration process. - to provide a registration method, you should also provide an unregistration method to reverse the operations done in the registration method. You can have only one unregistration method for a class. -**.NET Framework:** The common language runtime calls the method with this attribute when its containing assembly is unregistered (directly or indirectly) with the [Regasm.exe (Assembly Registration) tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) or through the method. +**.NET Framework:** The common language runtime calls the method with this attribute when its containing assembly is unregistered (directly or indirectly) with the [Regasm.exe (Assembly Registration) tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) or through the method. + + **.NET Core:** The common language runtime calls the method with this attribute when its containing assembly's COM host is unregistered via the [RegSvr32.exe tool](https://learn.microsoft.com/windows-server/administration/windows-commands/regsvr32). + +## Examples + The following example demonstrates applying and to methods with the appropriate signature. - **.NET Core:** The common language runtime calls the method with this attribute when its containing assembly's COM host is unregistered via the [RegSvr32.exe tool](https://learn.microsoft.com/windows-server/administration/windows-commands/regsvr32). - -## Examples - The following example demonstrates applying and to methods with the appropriate signature. - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic ComRegisterFunctionAttribute Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/ComRegisterFunctionAttribute/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/ComRegisterFunctionAttribute/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/ComRegisterFunctionAttribute/Overview/source.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.InteropServices/CriticalHandle.xml b/xml/System.Runtime.InteropServices/CriticalHandle.xml index 89230102cde..12745706098 100644 --- a/xml/System.Runtime.InteropServices/CriticalHandle.xml +++ b/xml/System.Runtime.InteropServices/CriticalHandle.xml @@ -99,7 +99,7 @@ ## Remarks The class is similar to the class, except that implements reference counting. You can use instead of to address performance considerations when you can provide the necessary synchronization more efficiently yourself. - Because the class does not perform reference counting, it does not provide protection from handle recycling security attacks. Because the reference counting algorithm implicitly serializes operations, a certain amount of thread safety is also lost. If you call the or method while an operation that is using the handle is outstanding on another thread, or if you call or from two threads at the same time, the results are non-deterministic. The class still provides the guaranteed critical finalization provided by the class. + Because the class does not perform reference counting, it does not provide protection from handle recycling security attacks. Because the reference counting algorithm implicitly serializes operations, a certain amount of thread safety is also lost. If you call the or method while an operation that is using the handle is outstanding on another thread, or if you call or from two threads at the same time, the results are non-deterministic. The class still provides the guaranteed critical finalization provided by the class. ]]> @@ -223,11 +223,11 @@ or method allows the resources to be freed. Unlike the class, this will always happen immediately since there is no reference count to indicate that other threads are using this handle. Therefore, you must employ a synchronization mechanism to ensure it is safe to call the method. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. + Calling the or method allows the resources to be freed. Unlike the class, this will always happen immediately since there is no reference count to indicate that other threads are using this handle. Therefore, you must employ a synchronization mechanism to ensure it is safe to call the method. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. - Call the or method when you are finished using the object. The method leaves the object in an unusable state. + Call the or method when you are finished using the object. The method leaves the object in an unusable state. - **Note** Always call or before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. + **Note** Always call or before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. ]]> @@ -306,11 +306,11 @@ or method allows the resources to be freed. Unlike the class, this will always happen immediately since there is no reference count to indicate that other threads are using this handle. Therefore, you must employ a synchronization mechanism to ensure it is safe to call the method. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. + Calling the or method allows the resources to be freed. Unlike the class, this will always happen immediately since there is no reference count to indicate that other threads are using this handle. Therefore, you must employ a synchronization mechanism to ensure it is safe to call the method. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. - Call the or method when you are finished using the object. The method leaves the object in an unusable state. + Call the or method when you are finished using the object. The method leaves the object in an unusable state. - **Note** Always call the or method before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. + **Note** Always call the or method before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. ]]> @@ -381,7 +381,7 @@ method with the `disposing` parameter set to `false`. + You should never explicitly call the method with the `disposing` parameter set to `false`. ]]> @@ -448,7 +448,7 @@ method is the destructor for the class. Application code should not call this method directly. + The method is the destructor for the class. Application code should not call this method directly. ]]> @@ -569,11 +569,11 @@ method returns a value indicating whether the object's handle is no longer associated with a native resource. This differs from the definition of the property, which computes whether a given handle is always considered invalid. The method returns a `true` value in the following cases: + The method returns a value indicating whether the object's handle is no longer associated with a native resource. This differs from the definition of the property, which computes whether a given handle is always considered invalid. The method returns a `true` value in the following cases: -- The method was called. +- The method was called. -- The method or method was called and there are no references to the object on other threads. +- The method or method was called and there are no references to the object on other threads. ]]> @@ -706,13 +706,13 @@ method is guaranteed to be called only once, provided that you employ proper synchronization mechanisms to ensure that only one call to the or method is made. The method will not be called if the or property is `true`. Implement this method in your derived classes to execute any code that is required to free the handle. Because one of the functions of is to guarantee prevention of resource leaks, the code in your implementation of must never fail. The garbage collector calls after normal finalizers have been run for objects that were garbage collected at the same time, and guarantees the resources to invoke it and that it will not be interrupted while it is in progress. This method will be prepared as a constrained execution region (CER) at instance construction time (along with all the methods in its statically determinable call graph). Although this prevents thread abort interrupts, you must still be careful not to introduce any fault paths in your overridden method. In particular, apply the attribute to any methods you call from . In most cases this code should be: + The method is guaranteed to be called only once, provided that you employ proper synchronization mechanisms to ensure that only one call to the or method is made. The method will not be called if the or property is `true`. Implement this method in your derived classes to execute any code that is required to free the handle. Because one of the functions of is to guarantee prevention of resource leaks, the code in your implementation of must never fail. The garbage collector calls after normal finalizers have been run for objects that were garbage collected at the same time, and guarantees the resources to invoke it and that it will not be interrupted while it is in progress. This method will be prepared as a constrained execution region (CER) at instance construction time (along with all the methods in its statically determinable call graph). Although this prevents thread abort interrupts, you must still be careful not to introduce any fault paths in your overridden method. In particular, apply the attribute to any methods you call from . In most cases this code should be: `ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)` Additionally, for simple cleanup (for example, calling the Windows API `CloseHandle` on a file handle) you can check the return value for the single platform invoke call. For complex cleanup, you may have a lot of program logic and many method calls, some of which might fail. You must ensure that your program logic has fallback code for each of those cases. - If the method returns `false` for any reason, it generates a [releaseHandleFailed](/dotnet/framework/debug-trace-profile/releasehandlefailed-mda) Managed Debugging Assistant. + If the method returns `false` for any reason, it generates a [releaseHandleFailed](/dotnet/framework/debug-trace-profile/releasehandlefailed-mda) Managed Debugging Assistant. ]]> @@ -780,7 +780,7 @@ method only if you need to support a pre-existing handle (for example, if the handle is returned in a structure) because the .NET Framework COM interop infrastructure does not support marshaling handles in a structure. + Use the method only if you need to support a pre-existing handle (for example, if the handle is returned in a structure) because the .NET Framework COM interop infrastructure does not support marshaling handles in a structure. ]]> @@ -843,9 +843,9 @@ method only when you know that your handle is invalid and you want to mark it as such. Doing so does not change the value of the field; it only marks the handle as invalid. The handle might then contain a potentially stale value. The effect of this call is that no attempt is made to free the resources. + Call the method only when you know that your handle is invalid and you want to mark it as such. Doing so does not change the value of the field; it only marks the handle as invalid. The handle might then contain a potentially stale value. The effect of this call is that no attempt is made to free the resources. - As with the method, use only if you need to support a pre-existing handle. + As with the method, use only if you need to support a pre-existing handle. ]]> diff --git a/xml/System.Runtime.InteropServices/DllImportAttribute.xml b/xml/System.Runtime.InteropServices/DllImportAttribute.xml index e161f8eca62..5f9094e804c 100644 --- a/xml/System.Runtime.InteropServices/DllImportAttribute.xml +++ b/xml/System.Runtime.InteropServices/DllImportAttribute.xml @@ -622,11 +622,11 @@ For additional information about using the platform invoke service to access fun `true` to indicate that the callee will set an error via `SetLastError` on Windows or `errno` on other platforms; otherwise, `false`. The default is `false`. If this field is set to `true`, the runtime marshaler calls `GetLastError` or `errno` and caches the value returned to prevent it from being overwritten by other API calls. - You can retrieve the error code by calling on .NET 6.0 and above - or on .NET 5 and below or .NET Framework. + You can retrieve the error code by calling on .NET 6.0 and above + or on .NET 5 and below or .NET Framework. On .NET, the error information is cleared (set to `0`) before invoking the callee when this field is set to `true`. On .NET Framework, the error information is not cleared. - This means that error information returned by and + This means that error information returned by and on .NET represents only the error information from the last p/invoke with set to `true`. On .NET Framework, the error information can persist from one p/invoke to the next. diff --git a/xml/System.Runtime.InteropServices/ExporterEventKind.xml b/xml/System.Runtime.InteropServices/ExporterEventKind.xml index 49ee13ab78d..d17d0855b9b 100644 --- a/xml/System.Runtime.InteropServices/ExporterEventKind.xml +++ b/xml/System.Runtime.InteropServices/ExporterEventKind.xml @@ -28,11 +28,11 @@ Describes the callbacks that the type library exporter makes when exporting a type library. - method of an object which implements the interface. The value passed identifies the specific kind of event being reported. - + method of an object which implements the interface. The value passed identifies the specific kind of event being reported. + ]]> diff --git a/xml/System.Runtime.InteropServices/ExtensibleClassFactory.xml b/xml/System.Runtime.InteropServices/ExtensibleClassFactory.xml index 45e808af046..a5c8136fa88 100644 --- a/xml/System.Runtime.InteropServices/ExtensibleClassFactory.xml +++ b/xml/System.Runtime.InteropServices/ExtensibleClassFactory.xml @@ -25,20 +25,20 @@ Enables customization of managed objects that extend from unmanaged objects during creation. - method must be called in the `static` initializer of the class that is extending the RCW. Only one object creation callback is permitted per object type. When the extensible RCW is activated, the callback is registered. When the underlying COM object needs to be created, the callback is called to provide a reference to the object. The callback must return an `IUnknown` interface pointer for the base object. - - - -## Examples - Registers a `delegate` that will be called whenever an instance of a managed type that extends from an unmanaged type needs to allocate the aggregated unmanaged object. This `delegate` is expected to allocate and aggregate the unmanaged object and is called in place of a `CoCreateInstance`. This routine must be called in the context of the `static` initializer for the class for which the callbacks will be made. - + method must be called in the `static` initializer of the class that is extending the RCW. Only one object creation callback is permitted per object type. When the extensible RCW is activated, the callback is registered. When the underlying COM object needs to be created, the callback is called to provide a reference to the object. The callback must return an `IUnknown` interface pointer for the base object. + + + +## Examples + Registers a `delegate` that will be called whenever an instance of a managed type that extends from an unmanaged type needs to allocate the aggregated unmanaged object. This `delegate` is expected to allocate and aggregate the unmanaged object and is called in place of a `CoCreateInstance`. This routine must be called in the context of the `static` initializer for the class for which the callbacks will be made. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic ExtensibleClassFactory Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/ExtensibleClassFactory/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/ExtensibleClassFactory/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/ExtensibleClassFactory/Overview/source.vb" id="Snippet1"::: + ]]> @@ -73,13 +73,13 @@ A that is called in place of . Registers a that is called when an instance of a managed type, that extends from an unmanaged type, needs to allocate the aggregated unmanaged object. - diff --git a/xml/System.Runtime.InteropServices/ExternalException.xml b/xml/System.Runtime.InteropServices/ExternalException.xml index d1a571874ad..8c8e0837c4f 100644 --- a/xml/System.Runtime.InteropServices/ExternalException.xml +++ b/xml/System.Runtime.InteropServices/ExternalException.xml @@ -68,7 +68,7 @@ `ExternalException` uses the HRESULT E_FAIL, which has the value 0x80004005. - `ExternalException` uses the default implementation, which supports reference equality. + `ExternalException` uses the default implementation, which supports reference equality. For a list of initial values for an instance of `ExternalException`, see the `ExternalException` constructors. @@ -131,8 +131,8 @@ |Property|Value| |--------------|-----------| -||A null reference (`Nothing` in Visual Basic).| -||A localized error message string.| +||A null reference (`Nothing` in Visual Basic).| +||A localized error message string.| ]]> @@ -186,8 +186,8 @@ |Property|Value| |--------------|-----------| -||A null reference (`Nothing` in Visual Basic).| -||The error message string.| +||A null reference (`Nothing` in Visual Basic).| +||The error message string.| ]]> @@ -312,8 +312,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> @@ -371,9 +371,9 @@ |Property|Value| |--------------|-----------| -||The HRESULT of the error.| -||A null reference (`Nothing` in Visual Basic).| -||The error message string.| +||The HRESULT of the error.| +||A null reference (`Nothing` in Visual Basic).| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/GCHandle.xml b/xml/System.Runtime.InteropServices/GCHandle.xml index 346c2002251..387cf7c8fc2 100644 --- a/xml/System.Runtime.InteropServices/GCHandle.xml +++ b/xml/System.Runtime.InteropServices/GCHandle.xml @@ -83,23 +83,23 @@ Provides a way to access a managed object from unmanaged memory. - structure is used with the enumeration to create a handle corresponding to any managed object. This handle can be one of four types: `Weak`, `WeakTrackResurrection`, `Normal`, or `Pinned`. When the handle has been allocated, you can use it to prevent the managed object from being collected by the garbage collector when an unmanaged client holds the only reference. Without such a handle, the object can be collected by the garbage collector before completing its work on behalf of the unmanaged client. - - You can also use to create a pinned object that returns a memory address to prevent the garbage collector from moving the object in memory. - - When the handle goes out of scope you must explicitly release it by calling the method; otherwise, memory leaks may occur. When you free a pinned handle, the associated object will be unpinned and will become eligible for garbage collection, if there are no other references to it. - - - -## Examples - The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. - + structure is used with the enumeration to create a handle corresponding to any managed object. This handle can be one of four types: `Weak`, `WeakTrackResurrection`, `Normal`, or `Pinned`. When the handle has been allocated, you can use it to prevent the managed object from being collected by the garbage collector when an unmanaged client holds the only reference. Without such a handle, the object can be collected by the garbage collector before completing its work on behalf of the unmanaged client. + + You can also use to create a pinned object that returns a memory address to prevent the garbage collector from moving the object in memory. + + When the handle goes out of scope you must explicitly release it by calling the method; otherwise, memory leaks may occur. When you free a pinned handle, the associated object will be unpinned and will become eligible for garbage collection, if there are no other references to it. + + + +## Examples + The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> @@ -168,13 +168,13 @@ Retrieves the address of object data in a handle. The address of the pinned data object. - The handle is any type other than . @@ -254,19 +254,19 @@ Allocates a handle for the specified object. A new that protects the object from garbage collection. This must be released with when it is no longer needed. - handles are opaque, which means that you cannot resolve the address of the object it contains through the handle. - - - -## Examples - The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. - + handles are opaque, which means that you cannot resolve the address of the object it contains through the handle. + + + +## Examples + The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> @@ -404,11 +404,11 @@ if the specified object is equal to the current object; otherwise, . - objects are equal if they point to the same memory handle. - + objects are equal if they point to the same memory handle. + ]]> @@ -516,19 +516,19 @@ Releases a . - is called only once. - - - -## Examples - The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. - + is called only once. + + + +## Examples + The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> The handle was freed or never initialized. @@ -591,14 +591,14 @@ Returns a new object created from a handle to a managed object. A new object that corresponds to the value parameter. - object. The unmanaged function passes the type back to the caller as a parameter of the callback function. - + object. The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> The value of the parameter is . @@ -659,11 +659,11 @@ Returns an identifier for the current object. An identifier for the current object. - method returns an integer representation of the internal memory handle encapsulated by the structure. - + method returns an integer representation of the internal memory handle encapsulated by the structure. + ]]> @@ -723,11 +723,11 @@ if the handle is allocated; otherwise, . - was called on this , or if this is not initialized, the handle is not allocated and this property returns `false`. - + ]]> @@ -787,7 +787,7 @@ if the and parameters are equal; otherwise, . - .]]> + .]]> @@ -863,11 +863,11 @@ A is stored using an internal integer representation. The stored object using an internal integer representation. - from an integer value. - + from an integer value. + ]]> @@ -925,11 +925,11 @@ A is stored using an internal integer representation. The integer value. - . - + . + ]]> @@ -989,7 +989,7 @@ if the and parameters are not equal; otherwise, . - .]]> + .]]> @@ -1056,14 +1056,14 @@ Gets or sets the object this handle represents. The object this handle represents. - . The unmanaged function passes the type back to the caller as a parameter of the callback function. - + . The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> The handle was freed, or never initialized. @@ -1121,14 +1121,14 @@ Returns the internal integer representation of a object. An object that represents a object. - object. The unmanaged function passes the type back to the caller as a parameter of the callback function. - + object. The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.InteropServices/HandleRef.xml b/xml/System.Runtime.InteropServices/HandleRef.xml index a07655dfe71..514800acd2c 100644 --- a/xml/System.Runtime.InteropServices/HandleRef.xml +++ b/xml/System.Runtime.InteropServices/HandleRef.xml @@ -70,7 +70,7 @@ If you use platform invoke to call a managed object, and the object is not referenced elsewhere after the platform invoke call, it is possible for the garbage collector to finalize the managed object. This action releases the resource and invalidates the handle, causing the platform invoke call to fail. Wrapping a handle with guarantees that the managed object is not garbage collected until the platform invoke call completes. For a description of platform invoke services, see [Consuming Unmanaged DLL Functions](/dotnet/framework/interop/consuming-unmanaged-dll-functions). - The value type, like , is a special type recognized by the interop marshaler. A normal, nonpinned also prevents untimely garbage collection, yet provides better performance. Although using to keep an object alive for the duration of a platform invoke call is preferred, you can also use the method for the same purpose. + The value type, like , is a special type recognized by the interop marshaler. A normal, nonpinned also prevents untimely garbage collection, yet provides better performance. Although using to keep an object alive for the duration of a platform invoke call is preferred, you can also use the method for the same purpose. The constructor takes two parameters: an representing the wrapper, and an representing the unmanaged handle. The interop marshaler passes only the handle to unmanaged code, and guarantees that the wrapper (passed as the first parameter to the constructor of the `HandleRef`) remains alive for the duration of the call. diff --git a/xml/System.Runtime.InteropServices/ICustomFactory.xml b/xml/System.Runtime.InteropServices/ICustomFactory.xml index 0c4f03c3bb6..d8f9150d8de 100644 --- a/xml/System.Runtime.InteropServices/ICustomFactory.xml +++ b/xml/System.Runtime.InteropServices/ICustomFactory.xml @@ -50,11 +50,11 @@ Enables users to write activation code for managed objects that extend . - class with the . When the class is activated, the proxy's method is called by the common language runtime to activate the class. - + class with the . When the class is activated, the proxy's method is called by the common language runtime to activate the class. + ]]> @@ -103,11 +103,11 @@ Creates a new instance of the specified type. A associated with the specified type. - diff --git a/xml/System.Runtime.InteropServices/IRegistrationServices.xml b/xml/System.Runtime.InteropServices/IRegistrationServices.xml index c0c3e6331e5..165b40f51a1 100644 --- a/xml/System.Runtime.InteropServices/IRegistrationServices.xml +++ b/xml/System.Runtime.InteropServices/IRegistrationServices.xml @@ -26,11 +26,11 @@ Provides a set of services for registering and unregistering managed assemblies for use from COM. - @@ -159,29 +159,29 @@ if contains types that were successfully registered; otherwise if the assembly contains no eligible types. - to get an assembly. - + to get an assembly. + ]]> is . - The full name of is . - - -or- - - A method marked with is not . - - -or- - - There is more than one method marked with at a given level of the hierarchy. - - -or- - + The full name of is . + + -or- + + A method marked with is not . + + -or- + + There is more than one method marked with at a given level of the hierarchy. + + -or- + The signature of the method marked with is not valid. @@ -217,11 +217,11 @@ GUID used to register the specified type. Registers the specified type with COM using the specified GUID. - @@ -320,27 +320,27 @@ if contains types that were successfully unregistered; otherwise if the assembly contains no eligible types. - . This method also calls any unregistration functions found in the assembly. - + . This method also calls any unregistration functions found in the assembly. + ]]> is . - The full name of is . - - -or- - - A method marked with is not . - - -or- - - There is more than one method marked with at a given level of the hierarchy. - - -or- - + The full name of is . + + -or- + + A method marked with is not . + + -or- + + There is more than one method marked with at a given level of the hierarchy. + + -or- + The signature of the method marked with is not valid. diff --git a/xml/System.Runtime.InteropServices/ITypeLibExporterNameProvider.xml b/xml/System.Runtime.InteropServices/ITypeLibExporterNameProvider.xml index 9ef34249ead..d22cbd93a4f 100644 --- a/xml/System.Runtime.InteropServices/ITypeLibExporterNameProvider.xml +++ b/xml/System.Runtime.InteropServices/ITypeLibExporterNameProvider.xml @@ -30,11 +30,11 @@ Provides control over the casing of names when exported to a type library. - . You then pass this object as the last parameter to . - + . You then pass this object as the last parameter to . + ]]> @@ -61,11 +61,11 @@ Returns a list of names to control the casing of. An array of strings, where each element contains the name of a type to control casing for. - diff --git a/xml/System.Runtime.InteropServices/ImporterEventKind.xml b/xml/System.Runtime.InteropServices/ImporterEventKind.xml index 48c75221e2b..2b8da0306d0 100644 --- a/xml/System.Runtime.InteropServices/ImporterEventKind.xml +++ b/xml/System.Runtime.InteropServices/ImporterEventKind.xml @@ -28,11 +28,11 @@ Describes the callbacks that the type library importer makes when importing a type library. - method of an object which implements the interface. The value passed identifies the specific kind of event being reported. - + method of an object which implements the interface. The value passed identifies the specific kind of event being reported. + ]]> diff --git a/xml/System.Runtime.InteropServices/InvalidComObjectException.xml b/xml/System.Runtime.InteropServices/InvalidComObjectException.xml index 8a355487b1e..a257f801e87 100644 --- a/xml/System.Runtime.InteropServices/InvalidComObjectException.xml +++ b/xml/System.Runtime.InteropServices/InvalidComObjectException.xml @@ -76,7 +76,7 @@ . + An `InvalidComObjectException` is thrown when an invalid COM object is used. This happens when the `__ComObject` type is used directly, without having a backing class factory. For more information, see . `InvalidComObjectException` uses the HRESULT COR_E_INVALIDCOMOBJECT, which has the value 0x80131527. @@ -148,8 +148,8 @@ |Property Type|Value| |-------------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -208,8 +208,8 @@ |Property Type|Value| |-------------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]> @@ -341,8 +341,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]>
diff --git a/xml/System.Runtime.InteropServices/InvalidOleVariantTypeException.xml b/xml/System.Runtime.InteropServices/InvalidOleVariantTypeException.xml index dec18e7471c..a86aeca2fe7 100644 --- a/xml/System.Runtime.InteropServices/InvalidOleVariantTypeException.xml +++ b/xml/System.Runtime.InteropServices/InvalidOleVariantTypeException.xml @@ -146,8 +146,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]>
@@ -206,8 +206,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]>
@@ -339,8 +339,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/Marshal.xml b/xml/System.Runtime.InteropServices/Marshal.xml index 47d52a67bc2..68ce79adab6 100644 --- a/xml/System.Runtime.InteropServices/Marshal.xml +++ b/xml/System.Runtime.InteropServices/Marshal.xml @@ -70,7 +70,7 @@ class are essential to working with unmanaged code. Most methods defined in this class are typically used by developers who want to provide a bridge between the managed and unmanaged programming models. For example, the method copies ANSI characters from a specified string (in the managed heap) to a buffer in the unmanaged heap. It also allocates the target heap of the right size. + The `static` methods defined on the class are essential to working with unmanaged code. Most methods defined in this class are typically used by developers who want to provide a bridge between the managed and unmanaged programming models. For example, the method copies ANSI characters from a specified string (in the managed heap) to a buffer in the unmanaged heap. It also allocates the target heap of the right size. The common language runtime provides specific marshaling capabilities. For details on marshaling behavior, see [Interop Marshaling](/dotnet/framework/interop/interop-marshaling). @@ -151,9 +151,9 @@ , you must decrement the reference count by using a method such as . Do not rely on the return value of , as it can sometimes be unstable. + The common language runtime manages the reference count of a COM object for you, making it unnecessary to use this method directly. In rare cases, such as testing a custom marshaler, you might find it necessary to manipulate an object's lifetime manually. After calling , you must decrement the reference count by using a method such as . Do not rely on the return value of , as it can sometimes be unstable. - You can call , , or to obtain an value that represents an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer. You can also use these methods and the method on managed objects to obtain the COM interfaces represented by the managed object's COM callable wrapper. If you are not familiar with the details of this wrapper type, see [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). + You can call , , or to obtain an value that represents an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer. You can also use these methods and the method on managed objects to obtain the COM interfaces represented by the managed object's COM callable wrapper. If you are not familiar with the details of this wrapper type, see [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). ]]> @@ -223,7 +223,7 @@ is one of two memory allocation API methods in the class. ( is the other.) The initial memory content returned is undefined, and the allocated memory can be larger than the requested number of bytes. This method exposes the COM [CoTaskMemAlloc](https://go.microsoft.com/fwlink/?LinkId=148626) function, which is referred to as the COM task memory allocator. + is one of two memory allocation API methods in the class. ( is the other.) The initial memory content returned is undefined, and the allocated memory can be larger than the requested number of bytes. This method exposes the COM [CoTaskMemAlloc](https://go.microsoft.com/fwlink/?LinkId=148626) function, which is referred to as the COM task memory allocator. ]]> @@ -309,16 +309,16 @@ ## Remarks > [!IMPORTANT] -> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. +> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. - is one of two memory allocation methods in the class. ( is the other.) This method exposes the Win32 [LocalAlloc](https://go.microsoft.com/fwlink/?LinkId=148628) function from Kernel32.dll. + is one of two memory allocation methods in the class. ( is the other.) This method exposes the Win32 [LocalAlloc](https://go.microsoft.com/fwlink/?LinkId=148628) function from Kernel32.dll. - When calls `LocalAlloc`, it passes a `LMEM_FIXED` flag, which causes the allocated memory to be locked in place. Also, the allocated memory is not zero-filled. + When calls `LocalAlloc`, it passes a `LMEM_FIXED` flag, which causes the allocated memory to be locked in place. Also, the allocated memory is not zero-filled. ## Examples - The following example demonstrates calling the method. This code example is part of a larger example provided for the class. + The following example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Marshal/cpp/marshal.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/Overview/Marshal.cs" id="Snippet4"::: @@ -394,13 +394,13 @@ ## Remarks > [!IMPORTANT] -> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. +> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. - is one of two memory allocation methods in the class. ( is the other.) This method exposes the Win32 [LocalAlloc](https://go.microsoft.com/fwlink/?LinkID=148628) function from Kernel32.dll. + is one of two memory allocation methods in the class. ( is the other.) This method exposes the Win32 [LocalAlloc](https://go.microsoft.com/fwlink/?LinkID=148628) function from Kernel32.dll. - When calls `LocalAlloc`, it passes a `LMEM_FIXED` flag, which causes the allocated memory to be locked in place. Also, the allocated memory is not zero-filled. + When calls `LocalAlloc`, it passes a `LMEM_FIXED` flag, which causes the allocated memory to be locked in place. Also, the allocated memory is not zero-filled. - For example code, see and . + For example code, see and . ]]> @@ -465,7 +465,7 @@ ## Remarks If there are a lot of references between managed and native code with deep dependency graphs it can take a long time for all the objects to clean up. Each time a GC runs it will free up some number of RCWs, which will in turn release the underlying COM objects. Those COM objects will then release their managed references and make more objects available for cleanup the next time a GC runs, which starts the process over again. - The method provides a way for the application to determine how many cycles of GC.Collect and GC.WaitForPendingFinalizers need to happen in order to clean everything up. + The method provides a way for the application to determine how many cycles of GC.Collect and GC.WaitForPendingFinalizers need to happen in order to clean everything up. ]]> @@ -532,7 +532,7 @@ exposes the COM `BindToMoniker` method, which produces an object that you can cast to any COM interface you require. This method provides the same functionality as the `GetObject` method in Visual Basic 6.0 and Visual Basic 2005. + exposes the COM `BindToMoniker` method, which produces an object that you can cast to any COM interface you require. This method provides the same functionality as the `GetObject` method in Visual Basic 6.0 and Visual Basic 2005. ]]> @@ -598,7 +598,7 @@ is used for object pooling functionality and should never be called by user code directly. + is used for object pooling functionality and should never be called by user code directly. ]]> @@ -657,9 +657,9 @@ To solve this problem: -1. Use the method to turn off automatic cleanup of RCWs, and the message pumping that occurs, on a per-thread basis. This allows developers to opt out of automatic clean-up, and the corresponding message pumping. +1. Use the method to turn off automatic cleanup of RCWs, and the message pumping that occurs, on a per-thread basis. This allows developers to opt out of automatic clean-up, and the corresponding message pumping. -2. Use the method to notify the runtime to clean up all RCWs that are allocated in the current context. This companion method allows developers to precisely control when the runtime performs cleanup in the current context. +2. Use the method to notify the runtime to clean up all RCWs that are allocated in the current context. This companion method allows developers to precisely control when the runtime performs cleanup in the current context. ]]> @@ -747,7 +747,7 @@ ## Examples - The following example copies an array to unmanaged memory by using the overload, and then copies the unmanaged array back to managed memory by using the overload. + The following example copies an array to unmanaged memory by using the overload, and then copies the unmanaged array back to managed memory by using the overload. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/Copy/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/Copy/sample.vb" id="Snippet1"::: @@ -1707,7 +1707,7 @@ method. + Unmanaged, C-style arrays do not contain bounds information, which prevents the `startIndex` and `length` parameters from being validated. Therefore, the unmanaged data that corresponds to the `source` parameter populates the managed array regardless of its usefulness. You must initialize the managed array with the appropriate size before calling the method. ]]> @@ -2001,7 +2001,7 @@ method aggregates the inner managed pointer of a managed object with the specified outer pointer, and then returns an inner [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) pointer of the managed object. + The method aggregates the inner managed pointer of a managed object with the specified outer pointer, and then returns an inner [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) pointer of the managed object. ]]> @@ -2076,7 +2076,7 @@ method aggregates the inner managed pointer of a managed object of a specified type with the specified outer pointer, and returns an inner [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) pointer of the managed object. + The method aggregates the inner managed pointer of a managed object of a specified type with the specified outer pointer, and returns an inner [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) pointer of the managed object. ]]> @@ -2164,7 +2164,7 @@ converts one COM class type, typically the base `__ComObject` type, to another COM class type. The input COM object, represented by parameter `o`, is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper). + converts one COM class type, typically the base `__ComObject` type, to another COM class type. The input COM object, represented by parameter `o`, is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper). Both the `t` and `o` parameters must be classes whose signatures are attributed with . The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool applies this attribute for you when it imports a type library. If you create the RCW manually in source code, you should apply this attribute to the managed signature that represents the original coclass to signify its COM origins. @@ -2262,7 +2262,7 @@ converts a COM object of type `T` to the `TWrapper` COM class type. The input COM object, represented by parameter `o`, is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper). + converts a COM object of type `T` to the `TWrapper` COM class type. The input COM object, represented by parameter `o`, is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper). Both the `T` generic type parameter and the `o` parameter must be classes whose signatures are attributed with the attribute. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool applies this attribute for you when it imports a type library. If you create the RCW manually in source code, you should apply this attribute to the managed signature that represents the original coclass to signify its COM origins. @@ -2358,11 +2358,11 @@ method uses this method to prevent memory leaks when reusing memory occupied by a structure. + You can use this method to free reference-type fields, such as strings, of an unmanaged structure. Unlike its fields, a structure can be a value type or a reference type. Value-type structures that contain value-type fields (all blittable) have no references whose memory must be freed. The method uses this method to prevent memory leaks when reusing memory occupied by a structure. - calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkId=148633) function, which, in turn, frees an allocated string. + calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkId=148633) function, which, in turn, frees an allocated string. - In addition to , the class provides two other memory-deallocation methods: and . + In addition to , the class provides two other memory-deallocation methods: and . ]]> @@ -2433,9 +2433,9 @@ method uses this method to prevent memory leaks when reusing memory occupied by a structure. + You can use this method to free reference type fields, such as strings, of an unmanaged structure. Unlike its fields, a structure can be a value type or a reference type. Value type structures that contain value type fields (all blittable) have no references whose memory must be freed. The method uses this method to prevent memory leaks when reusing memory occupied by a structure. - calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkId=148633) function, which, in turn, frees an allocated string. + calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkId=148633) function, which, in turn, frees an allocated string. ]]> @@ -2504,7 +2504,7 @@ method releases the managed reference to a COM object. Calling this method is equivalent to calling the method in a loop until it returns 0 (zero). + The method releases the managed reference to a COM object. Calling this method is equivalent to calling the method in a loop until it returns 0 (zero). When the reference count on the COM object becomes 0, the COM object is usually freed, although this depends on the COM object's implementation and is beyond the control of the runtime. However, the RCW can still exist, waiting to be garbage-collected. @@ -2577,7 +2577,7 @@ and , you can use this method to deallocate memory. calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkID=148633) function, which frees memory allocated by any of the following unmanaged methods: `SysAllocString`, `SysAllocStringByteLen`, `SysAllocStringLen`, `SysReAllocString`, `SysReAllocStringLen`. You can call unmanaged methods such as these with platform invoke. For details, see [Consuming Unmanaged DLL Functions](/dotnet/framework/interop/consuming-unmanaged-dll-functions). + Like and , you can use this method to deallocate memory. calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkID=148633) function, which frees memory allocated by any of the following unmanaged methods: `SysAllocString`, `SysAllocStringByteLen`, `SysAllocStringLen`, `SysReAllocString`, `SysReAllocStringLen`. You can call unmanaged methods such as these with platform invoke. For details, see [Consuming Unmanaged DLL Functions](/dotnet/framework/interop/consuming-unmanaged-dll-functions). ]]> @@ -2642,11 +2642,11 @@ to free any memory allocated by , , or any equivalent unmanaged method. If the `ptr` parameter is `IntPtr.Zero`, the method does nothing. + You can use to free any memory allocated by , , or any equivalent unmanaged method. If the `ptr` parameter is `IntPtr.Zero`, the method does nothing. - exposes the COM [CoTaskMemFree](https://go.microsoft.com/fwlink/?LinkId=148638) function, which frees all bytes so that you can no longer use the memory that the `ptr` parameter points to. + exposes the COM [CoTaskMemFree](https://go.microsoft.com/fwlink/?LinkId=148638) function, which frees all bytes so that you can no longer use the memory that the `ptr` parameter points to. - In addition to , the class provides two other memory-deallocation methods: and . + In addition to , the class provides two other memory-deallocation methods: and . ]]> @@ -2718,18 +2718,18 @@ ## Remarks > [!IMPORTANT] -> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. +> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. - You can use to free any memory from the global heap allocated by , , or any equivalent unmanaged API method. If the `hglobal` parameter is the method does nothing. + You can use to free any memory from the global heap allocated by , , or any equivalent unmanaged API method. If the `hglobal` parameter is the method does nothing. - exposes the [LocalFree](https://go.microsoft.com/fwlink/?LinkId=148640) function from Kernel32.DLL, which frees all bytes so that you can no longer use the memory pointed to by `hglobal`. + exposes the [LocalFree](https://go.microsoft.com/fwlink/?LinkId=148640) function from Kernel32.DLL, which frees all bytes so that you can no longer use the memory pointed to by `hglobal`. - In addition to , the class provides two other memory-deallocation API methods: and . + In addition to , the class provides two other memory-deallocation API methods: and . ## Examples - The following example demonstrates calling the method. This code example is part of a larger example provided for the class. + The following example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Marshal/cpp/marshal.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/Overview/Marshal.cs" id="Snippet4"::: @@ -2798,7 +2798,7 @@ provides the same functionality as the property. + If the type has a GUID in the metadata, it is returned. Otherwise, a GUID is automatically generated. You can use this method to programmatically determine the COM GUID for any managed type, including COM-invisible types. Class interfaces are the only exception because they do not correspond to a managed type. provides the same functionality as the property. ]]> @@ -2917,7 +2917,7 @@ twice. The first call tries to retrieve a reference to an instance of Microsoft Word (an instance of the `Word.Application` object). The second call tries to retrieve a reference to an instance of Microsoft Excel (an instance of an `Excel.Application` object). +The example calls twice. The first call tries to retrieve a reference to an instance of Microsoft Word (an instance of the `Word.Application` object). The second call tries to retrieve a reference to an instance of Microsoft Excel (an instance of an `Excel.Application` object). The code retrieves a reference to an instance of Microsoft Word successfully. However, because Microsoft Excel is not running, the attempt to retrieve the second object raises a . @@ -3014,11 +3014,11 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho to decrement the reference count once you have finished with the pointer. You must adhere to the rules defined by COM when using raw COM interface pointers. + This method returns an interface pointer that represents the requested interface on the specified object. It is particularly useful if you have an unmanaged method that expects to be passed an interface pointer. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. You must adhere to the rules defined by COM when using raw COM interface pointers. - is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Although less common, you can use this method on a managed object to obtain a pointer to the object's COM callable wrapper. For example, you can use on a managed object that is exported to COM to obtain an interface pointer for . You cannot obtain a pointer to a class interface since a class interface lacks the corresponding type to pass to the second parameter (`t`). Instead, use to invoke the members on the default interface of the COM callable wrapper, which is usually an auto-dispatch class interface. + is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Although less common, you can use this method on a managed object to obtain a pointer to the object's COM callable wrapper. For example, you can use on a managed object that is exported to COM to obtain an interface pointer for . You cannot obtain a pointer to a class interface since a class interface lacks the corresponding type to pass to the second parameter (`t`). Instead, use to invoke the members on the default interface of the COM callable wrapper, which is usually an auto-dispatch class interface. - The method overload allows query interface customization by default. To specify whether to apply query interface customization, use the method overload. + The method overload allows query interface customization by default. To specify whether to apply query interface customization, use the method overload. For additional information, see the [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper) and [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper) articles. @@ -3118,7 +3118,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho lets you specify whether to apply query interface customization. Use the overload to apply query interface customization by default. + lets you specify whether to apply query interface customization. Use the overload to apply query interface customization by default. ]]> @@ -3217,11 +3217,11 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho method to decrement the reference count when you have finished with the pointer. You must adhere to the rules defined by COM when using raw COM interface pointers. + This method returns an interface pointer that represents the `TInterface` interface on the specified object. It is particularly useful if you have an unmanaged method that expects to be passed an interface pointer. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use the method to decrement the reference count when you have finished with the pointer. You must adhere to the rules defined by COM when using raw COM interface pointers. - is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. You can also use this method on a managed object to obtain a pointer to the object's COM callable wrapper, although this is less common. For example, you can use on a managed object that is exported to COM to obtain an interface pointer for . + is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. You can also use this method on a managed object to obtain a pointer to the object's COM callable wrapper, although this is less common. For example, you can use on a managed object that is exported to COM to obtain an interface pointer for . - The method overload allows query interface customization by default. To specify whether to apply query interface customization, use the method overload. + The method overload allows query interface customization by default. To specify whether to apply query interface customization, use the method overload. For additional information, see the [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper) and [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper) articles. @@ -3281,7 +3281,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho except that it returns `null` if the caller is not in the same context as the object. It is particularly useful if you have an unmanaged method that expects to be passed an interface pointer. + This method is the same as except that it returns `null` if the caller is not in the same context as the object. It is particularly useful if you have an unmanaged method that expects to be passed an interface pointer. ]]> @@ -3371,7 +3371,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho retrieves. adds data to the hash table. You should never have to call either method from your code. + All COM objects wrapped in a [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper) have an associated hash table, which retrieves. adds data to the hash table. You should never have to call either method from your code. ]]> @@ -3430,9 +3430,9 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho provides the opposite functionality of . + The zero-based slot number returned by this method accounts for three [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) and possibly four [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) methods, making the value of the first available slot either 3 or 7. provides the opposite functionality of . - You can use this method to retrieve slot numbers for members of interfaces that are not visible from COM and for members of private interfaces. The slot numbers returned correspond to the v-table numbers that would be reserved if the type was exposed to COM. COM-invisible members actually occupy a slot in an exposed v-table, even though the COM client cannot use the slot. You cannot use on a class interface by passing from a class. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). + You can use this method to retrieve slot numbers for members of interfaces that are not visible from COM and for members of private interfaces. The slot numbers returned correspond to the v-table numbers that would be reserved if the type was exposed to COM. COM-invisible members actually occupy a slot in an exposed v-table, even though the COM client cannot use the slot. You cannot use on a class interface by passing from a class. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). ]]> @@ -3517,11 +3517,11 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho and methods to marshal delegates in both directions. With , `ptr` is imported as a . A can be obtained for a managed delegate by calling and passed as a parameter; it can then be called from inside the unmanaged method. Note that the parameter marshaler can also marshal function pointers to delegates. + You can use the and methods to marshal delegates in both directions. With , `ptr` is imported as a . A can be obtained for a managed delegate by calling and passed as a parameter; it can then be called from inside the unmanaged method. Note that the parameter marshaler can also marshal function pointers to delegates. `ptr` is converted to a delegate that invokes the unmanaged method using [the default platform calling convention](/dotnet/standard/native-interop/calling-conventions#platform-default-calling-convention). You can set the calling convention by applying the to the delegate. - The method has the following restrictions: + The method has the following restrictions: - Generics are not supported in interop scenarios. - You can use this method only for pure unmanaged function pointers. @@ -3605,11 +3605,11 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho and methods to marshal delegates in both directions. + You can use the and methods to marshal delegates in both directions. `ptr` is converted to a delegate that invokes the unmanaged method using [the default platform calling convention](/dotnet/standard/native-interop/calling-conventions#platform-default-calling-convention). You can set the calling convention by applying the to the delegate. - The method has the following restrictions: + The method has the following restrictions: - Generics are not supported in interop scenarios. - You can use this method only for pure unmanaged function pointers. @@ -3675,7 +3675,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho and in conjunction with to pass slots within a specified range. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). + This method returns the zero-based, v-table number for an interface or a class. When used on a class, the slot number returned refers to the class interface for the class. If the class interface is auto-dispatch, this method always returns -1 to indicate that the dispatch-only interface does not expose a v-table to managed clients. You can use and in conjunction with to pass slots within a specified range. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). ]]> @@ -3746,7 +3746,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho is exposed for compiler support of structured exception handling (SEH) only. If this method is called before an exception is thrown, it returns 0x0. + is exposed for compiler support of structured exception handling (SEH) only. If this method is called before an exception is thrown, it returns 0x0. ]]> @@ -3824,7 +3824,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho method to get an based on an HRESULT without having to call the method and catch the exception. + Use the method to get an based on an HRESULT without having to call the method and catch the exception. The current [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface is used to construct the exception. @@ -3896,7 +3896,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho method to get an based on an HRESULT without having to call the method and catch the exception (thus avoiding the corresponding performance overhead). The `errorInfo` parameter supplies additional information about the error, such as its textual description and the globally unique identifier (GUID) for the interface that defined the error. + Use the method to get an based on an HRESULT without having to call the method and catch the exception (thus avoiding the corresponding performance overhead). The `errorInfo` parameter supplies additional information about the error, such as its textual description and the globally unique identifier (GUID) for the interface that defined the error. Use this method overload if you have custom error information that you have to supply in the conversion. @@ -4002,7 +4002,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho is exposed for compiler support of structured exception handling (SEH) only. + is exposed for compiler support of structured exception handling (SEH) only. ]]> @@ -4079,7 +4079,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho ## Remarks The delegate `d` is converted to a function pointer that can be passed to unmanaged code using [the default platform calling convention](/dotnet/standard/native-interop/calling-conventions#platform-default-calling-convention). You can set the calling convention by applying the to the delegate. - You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code. Use to prevent the delegate from being collected before the native call completes: + You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code. Use to prevent the delegate from being collected before the native call completes: ```csharp var callback = new MyNativeCallback(MyManagedMethod); @@ -4088,7 +4088,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho GC.KeepAlive(callback); // Prevent collection — fnPtr does not root the delegate. ``` - A P/Invoke that marshals a delegate handles the on the user's behalf: + A P/Invoke that marshals a delegate handles the on the user's behalf: ```csharp var callback = new MyNativeCallback(MyManagedMethod); @@ -4171,7 +4171,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho ## Remarks The delegate `d` is converted to a function pointer that can be passed to unmanaged code by using [the default platform calling convention](/dotnet/standard/native-interop/calling-conventions#platform-default-calling-convention). You can set the calling convention by applying the to the delegate. - You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code. Use to prevent the delegate from being collected before the native call completes: + You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code. Use to prevent the delegate from being collected before the native call completes: ```csharp var callback = new MyNativeCallback(MyManagedMethod); @@ -4180,7 +4180,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho GC.KeepAlive(callback); // Prevent collection — fnPtr does not root the delegate. ``` -A P/Invoke that marshals a delegate handles the on the user's behalf: +A P/Invoke that marshals a delegate handles the on the user's behalf: ```csharp var callback = new MyNativeCallback(MyManagedMethod); @@ -4321,9 +4321,9 @@ A P/Invoke that marshals a delegate handles the on also sets up an [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface for the exception that can be obtained by calling the COM GetErrorInfoNEEDGUID function. You can use this function to return an HRESULT value on a managed class implementation of a COM interface where you apply the attribute. Have the attributed method catch all exceptions and use the method to return the appropriate HRESULT value. Allowing an exception to propagate outside the method produces incorrect behavior. (In fact, the common language runtime fails to pass an exception to a COM client that calls such a method through a v-table.) + also sets up an [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface for the exception that can be obtained by calling the COM GetErrorInfoNEEDGUID function. You can use this function to return an HRESULT value on a managed class implementation of a COM interface where you apply the attribute. Have the attributed method catch all exceptions and use the method to return the appropriate HRESULT value. Allowing an exception to propagate outside the method produces incorrect behavior. (In fact, the common language runtime fails to pass an exception to a COM client that calls such a method through a v-table.) - Note that the method sets the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread. This can cause unexpected results for methods like the methods that default to using the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) of the current thread if it is set. + Note that the method sets the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread. This can cause unexpected results for methods like the methods that default to using the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) of the current thread if it is set. ]]> @@ -4392,7 +4392,7 @@ A P/Invoke that marshals a delegate handles the on The target function must have had the `setLastError` metadata flag set. For example, the `SetLastError` field of the must be `true`. The process for setting this flag depends on the source language used: C# and C++ are `false` by default, but the `Declare` statement in Visual Basic is `true`. ## Examples - The following example demonstrates how to retrieve an HRESULT corresponding to a Win32 error code using the method. + The following example demonstrates how to retrieve an HRESULT corresponding to a Win32 error code using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetHRForLastWin32Error/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetHRForLastWin32Error/example.vb" id="Snippet1"::: @@ -4458,7 +4458,7 @@ A P/Invoke that marshals a delegate handles the on is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. + In managed code, you seldom work directly with the `IDispatch` interface. However, is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. You can also use this method on a managed object to obtain an interface pointer to the COM callable wrapper for the object. For additional information, see [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). @@ -4509,7 +4509,7 @@ A P/Invoke that marshals a delegate handles the on except that it returns `null` if the caller is not in the same context as the object. + This method is the same as except that it returns `null` if the caller is not in the same context as the object. ]]> @@ -4561,12 +4561,12 @@ A P/Invoke that marshals a delegate handles the on causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. You can apply the to replace standard interop marshaling behavior with this custom marshaler. + This method returns a pointer to an `ITypeInfo` implementation that is based on the original type. Calling an object with causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. You can apply the to replace standard interop marshaling behavior with this custom marshaler. ## Examples - The following example demonstrates how to retrieve a pointer to the `ITypeInfo` interface for a type using the method. + The following example demonstrates how to retrieve a pointer to the `ITypeInfo` interface for a type using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetITypeInfoForType/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetITypeInfoForType/example.vb" id="Snippet1"::: @@ -4646,14 +4646,14 @@ A P/Invoke that marshals a delegate handles the on is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. This method provides the opposite functionality of the method. + In managed code, you seldom work directly with the `IUnknown` interface. However, is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. This method provides the opposite functionality of the method. You can also use this method on a managed object to obtain an interface pointer to the [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper) for the object. ## Examples - The following example demonstrates how to retrieve an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface for a managed object using the method. + The following example demonstrates how to retrieve an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface for a managed object using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetIUnknownForObject/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetIUnknownForObject/example.vb" id="Snippet1"::: @@ -4703,12 +4703,12 @@ A P/Invoke that marshals a delegate handles the on except that it returns `null` if the caller is not in the same context as the object. + This method is the same as except that it returns `null` if the caller is not in the same context as the object. ## Examples - The following example demonstrates how to retrieve an `IUnknown` interface for a managed object using the method. + The following example demonstrates how to retrieve an `IUnknown` interface for a managed object using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetIUnknownForObjectInContext/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetIUnknownForObjectInContext/example.vb" id="Snippet1"::: @@ -4761,16 +4761,16 @@ set to `true` or by a call to . +platform invoke usage, use . -This method is functionally equivalent to . It is -named to better reflect the intent of the API and its cross-platform nature. -should be preferred over . +This method is functionally equivalent to . It is +named to better reflect the intent of the API and its cross-platform nature. +should be preferred over . ## Examples The following example defines a p/invoke with -set to `true` and demonstrates using to get the last p/invoke error. +set to `true` and demonstrates using to get the last p/invoke error. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetLastPInvokeError/GetLastPInvokeError.cs" id="Snippet1"::: @@ -4848,7 +4848,7 @@ set to `true` and demonstrates using . +platform invoke usage. To get the last platform invoke error, use . ]]> @@ -4914,13 +4914,13 @@ platform invoke usage. To get the last platform invoke error, use exposes the Win32 [GetLastError](/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror) function from Kernel32.DLL. This method exists because it is not reliable to make a direct platform invoke call to `GetLastError` to obtain this information. If you want to access this error code, you must call instead of writing your own platform invoke definition for `GetLastError` and calling it. The common language runtime can make internal calls to APIs that overwrite the `GetLastError` maintained by the operating system. +On Windows systems, exposes the Win32 [GetLastError](/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror) function from Kernel32.DLL. This method exists because it is not reliable to make a direct platform invoke call to `GetLastError` to obtain this information. If you want to access this error code, you must call instead of writing your own platform invoke definition for `GetLastError` and calling it. The common language runtime can make internal calls to APIs that overwrite the `GetLastError` maintained by the operating system. You can use this method to obtain error codes only if you apply the to the method signature and set the field to `true`. The process for this varies depending upon the source language used: C# and C++ are `false` by default, but the `Declare` statement in Visual Basic is `true`. There is a difference in the behavior of the `GetLastWin32Error` method on .NET Core and .NET Framework when is `true`. On .NET Framework, the `GetLastWin32Error` method can retain error information from one P/Invoke call to the next. On .NET Core, error information is cleared before P/Invoke call, and the `GetLastWin32Error` represents only error information from the last method call. -On .NET 6 and later versions, this method is functionally equivalent to , which is named to better reflect the intent of the API and its cross-platform nature. should be preferred over . +On .NET 6 and later versions, this method is functionally equivalent to , which is named to better reflect the intent of the API and its cross-platform nature. should be preferred over . ## Examples The following example calls the `GetLastWin32Error` method. The example first demonstrates calling the method with no error present and then demonstrates calling the method with an error present. @@ -4981,7 +4981,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is exposed for compiler support only. + is exposed for compiler support only. ]]> @@ -5033,7 +5033,7 @@ On .NET 6 and later versions, this method is functionally equivalent to , , or object. The return value depends on the type of managed member that exists in the given COM slot (hence the generalized return type from which all three derive). - The zero-based slot number that is returned by this method accounts for three [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) and possibly four [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) methods, making the value of the first available slot either 3 or 7. provides the opposite functionality of . You can use and in conjunction with to pass slots within a specified range. + The zero-based slot number that is returned by this method accounts for three [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) and possibly four [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) methods, making the value of the first available slot either 3 or 7. provides the opposite functionality of . You can use and in conjunction with to pass slots within a specified range. The `memberType` parameter is important only on return. It contains the type of the COM member (a regular method or a property accessor) that corresponds to the returned object. @@ -5278,7 +5278,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is a [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper), which the common language runtime manages as it does any other managed object. The type of this wrapper is often a base `System.__ComObject` type, which is a hidden type used when the wrapper type is ambiguous. You can still make late-bound calls to such a base type as long as the COM object implements the [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) interface. Likewise, you can cast the returned object to an appropriate COM interface. + The `pUnk` parameter represents an `IUnknown` interface pointer; however, because all COM interfaces derive directly or indirectly from `IUnknown`, you can pass any COM interface to this method. The object returned by is a [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper), which the common language runtime manages as it does any other managed object. The type of this wrapper is often a base `System.__ComObject` type, which is a hidden type used when the wrapper type is ambiguous. You can still make late-bound calls to such a base type as long as the COM object implements the [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) interface. Likewise, you can cast the returned object to an appropriate COM interface. For an object to be wrapped with a specific managed class type (and not a generic wrapper type), you must adhere to the following requirements: @@ -5286,7 +5286,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method. + Alternatively, you can avoid these requirements and still get an object that is wrapped with a specific managed class type by using the method. ]]> @@ -5368,11 +5368,11 @@ On .NET 6 and later versions, this method is functionally equivalent to returns a managed object that corresponds to a raw pointer to an unmanaged VARIANT type. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. + returns a managed object that corresponds to a raw pointer to an unmanaged VARIANT type. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. - provides the opposite functionality of . + provides the opposite functionality of . - When the VARIANT type is VT_ERROR, returns an object of type `Int32` instead of `UInt32`. + When the VARIANT type is VT_ERROR, returns an object of type `Int32` instead of `UInt32`. ]]> @@ -5457,9 +5457,9 @@ On .NET 6 and later versions, this method is functionally equivalent to returns a managed object of type `T` that corresponds to a raw pointer to an unmanaged VARIANT type. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. + returns a managed object of type `T` that corresponds to a raw pointer to an unmanaged VARIANT type. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. - provides the opposite functionality of . + provides the opposite functionality of . ]]> @@ -5542,7 +5542,7 @@ On .NET 6 and later versions, this method is functionally equivalent to returns an array of managed objects that corresponds to a raw pointer to a C-style array of unmanaged VARIANT types. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. The method returns an empty array when the `cVars` parameter is 0. + returns an array of managed objects that corresponds to a raw pointer to a C-style array of unmanaged VARIANT types. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. The method returns an empty array when the `cVars` parameter is 0. The object array (the return value) gets garbage collected as usual. The unmanaged input array or individual VARIANTs in the input array are not freed. Therefore it is your responsibility to free them as appropriate. @@ -5634,7 +5634,7 @@ On .NET 6 and later versions, this method is functionally equivalent to returns an array of `T` that corresponds to a raw pointer to a C-style array of unmanaged VARIANT types. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. The method returns an empty array when the `cVars` parameter is 0. + returns an array of `T` that corresponds to a raw pointer to a C-style array of unmanaged VARIANT types. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. The method returns an empty array when the `cVars` parameter is 0. The returned array is garbage-collected as usual. The unmanaged input array or individual VARIANTs in the input array are not freed. Therefore, it is your responsibility to free them as appropriate. @@ -5741,7 +5741,7 @@ On .NET 6 and later versions, this method is functionally equivalent to and in conjunction with to pass slots within a specified range. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). + This method returns the zero-based v-table number for an interface or a class. When used on a class, the slot number that is returned refers to the class interface for the class. If the class interface is auto-dispatch, this method always returns -1 to indicate that the dispatch-only interface does not expose a v-table to managed clients. You can use and in conjunction with to pass slots within a specified range. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). ]]> @@ -5863,7 +5863,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper), which the common language runtime manages as it does any other managed object. + If an object has already been obtained for the `pUnk` parameter, `t` is ignored and the existing object is returned. `pUnk` represents an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer; however, because all COM interfaces derive directly or indirectly from `IUnknown`, you can pass any COM interface to this method. The object returned by is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper), which the common language runtime manages as it does any other managed object. ]]> @@ -5916,7 +5916,7 @@ On .NET 6 and later versions, this method is functionally equivalent to returns a instance that is based on the original type. You can apply the to replace standard interop marshaling behavior with this custom marshaler. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool uses the custom marshaler to translate `ITypeInfo` parameters to parameters. However, if you obtain an `ITypeInfo` interface by some means other than Tlbimp.exe, you can use to manually perform the same translation. + returns a instance that is based on the original type. You can apply the to replace standard interop marshaling behavior with this custom marshaler. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool uses the custom marshaler to translate `ITypeInfo` parameters to parameters. However, if you obtain an `ITypeInfo` interface by some means other than Tlbimp.exe, you can use to manually perform the same translation. ]]> @@ -6060,7 +6060,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method and passing -1 for its first parameter. + You can also retrieve the name of the type represented by an `ITypeInfo` by calling the method and passing -1 for its first parameter. ]]> @@ -6112,7 +6112,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method and passing -1 for its first parameter. + You can also retrieve the name of the type represented by an `ITypeInfo` object by calling the method and passing -1 for its first parameter. ]]> @@ -6168,7 +6168,7 @@ On .NET 6 and later versions, this method is functionally equivalent to extracts the LIBID directly from an existing type library. This action differs from that of the method, which calculates what the LIBID should be based on the current assembly. + extracts the LIBID directly from an existing type library. This action differs from that of the method, which calculates what the LIBID should be based on the current assembly. For more information about library identifiers, see [Exported Assembly Conversion](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/t1ztw645(v=vs.100)). @@ -6222,7 +6222,7 @@ On .NET 6 and later versions, this method is functionally equivalent to extracts the LIBID directly from an existing type library. This action differs from that of the method, which calculates what the LIBID should be based on the current assembly. + extracts the LIBID directly from an existing type library. This action differs from that of the method, which calculates what the LIBID should be based on the current assembly. For more information about library identifiers, see [Exported Assembly Conversion](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/t1ztw645(v=vs.100)). @@ -6272,7 +6272,7 @@ On .NET 6 and later versions, this method is functionally equivalent to at the assembly level, or it can be generated automatically. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool calculates a LIBID value based on the identity of the assembly. returns the LIBID that is associated with the , if the attribute is applied. Otherwise, returns the calculated value. Alternatively, you can use the method to extract the actual LIBID from an existing type library. + When assemblies are exported to type libraries, the type library is assigned a LIBID. You can set the LIBID explicitly by applying the at the assembly level, or it can be generated automatically. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool calculates a LIBID value based on the identity of the assembly. returns the LIBID that is associated with the , if the attribute is applied. Otherwise, returns the calculated value. Alternatively, you can use the method to extract the actual LIBID from an existing type library. See the [Exported Assembly Conversion](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/t1ztw645(v=vs.100)) topic for more information about library identifiers. @@ -6426,7 +6426,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method and passing -1 for its first parameter. + You can also retrieve the type library name by calling the method and passing -1 for its first parameter. ]]> @@ -6480,7 +6480,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method and passing -1 for its first parameter. + You can also retrieve the type library name by calling the method and passing -1 for its first parameter. ]]> @@ -6603,7 +6603,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method ensures that you receive a unique RCW, because it does not match an `IUnknown` pointer to an existing object. Use this method when you have to create a unique RCW that is not impacted by other code that calls the method. + The method ensures that you receive a unique RCW, because it does not match an `IUnknown` pointer to an existing object. Use this method when you have to create a unique RCW that is not impacted by other code that calls the method. ]]> @@ -6657,7 +6657,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is exposed for compiler support only. + is exposed for compiler support only. ]]> @@ -6760,9 +6760,9 @@ On .NET 6 and later versions, this method is functionally equivalent to returns `true` if the class type of the instance is attributed with or if it derives directly or indirectly from a class attributed with . The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool applies this attribute for you when it imports a type library. + returns `true` if the class type of the instance is attributed with or if it derives directly or indirectly from a class attributed with . The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool applies this attribute for you when it imports a type library. - Two other methods also determine whether a specified object represents a COM object, but the requirements for returning `true` differ from this method's requirements. returns `true` if the class (or interface) is attributed with directly; it does not return `true` for derived types. returns `true` if the type is attributed with or derives from a type with the same GUID. + Two other methods also determine whether a specified object represents a COM object, but the requirements for returning `true` differ from this method's requirements. returns `true` if the class (or interface) is attributed with directly; it does not return `true` for derived types. returns `true` if the type is attributed with or derives from a type with the same GUID. ]]> @@ -6824,7 +6824,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables you to check for COM visibility in one step. Types that are not visible cannot be used from COM. A type is visible if it is `public` and not hidden with the . + enables you to check for COM visibility in one step. Types that are not visible cannot be used from COM. A type is visible if it is `public` and not hidden with the . ]]> @@ -6871,7 +6871,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method returns the stack size (in bytes) needed to represent the parameters of a method signature in unmanaged memory. + The method returns the stack size (in bytes) needed to represent the parameters of a method signature in unmanaged memory. Note that the return value of this method is platform-dependent. For example, a signature with a single integer parameter returns a value of 4 on 32-bit platforms and a value of 8 on 64-bit platforms. @@ -6949,10 +6949,10 @@ On .NET 6 and later versions, this method is functionally equivalent to provides the offset in terms of the unmanaged structure layout, which does not necessarily correspond to the offset of the managed structure layout. Marshaling the structure can transform the layout and alter the offset. The `t` parameter can be a value type or a formatted reference type (with either a sequential or explicit layout). You can obtain the size of the entire layout by using the method. For additional information, see [Default Marshaling for Value Types](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0t2cwe11(v=vs.100)). + provides the offset in terms of the unmanaged structure layout, which does not necessarily correspond to the offset of the managed structure layout. Marshaling the structure can transform the layout and alter the offset. The `t` parameter can be a value type or a formatted reference type (with either a sequential or explicit layout). You can obtain the size of the entire layout by using the method. For additional information, see [Default Marshaling for Value Types](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0t2cwe11(v=vs.100)). > [!NOTE] -> Beginning with the .NET Framework version 2.0, may expose private fields. +> Beginning with the .NET Framework version 2.0, may expose private fields. ]]> @@ -7023,10 +7023,10 @@ On .NET 6 and later versions, this method is functionally equivalent to provides the offset in terms of the unmanaged structure layout, which does not necessarily correspond to the offset of the managed structure layout. Marshaling the structure can transform the layout and alter the offset. The `T` generic type parameter can be a value type or a formatted reference type (with either a sequential or explicit layout). You can obtain the size of the entire layout by using the method. For additional information, see [Default Marshaling for Value Types](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0t2cwe11(v=vs.100)). + provides the offset in terms of the unmanaged structure layout, which does not necessarily correspond to the offset of the managed structure layout. Marshaling the structure can transform the layout and alter the offset. The `T` generic type parameter can be a value type or a formatted reference type (with either a sequential or explicit layout). You can obtain the size of the entire layout by using the method. For additional information, see [Default Marshaling for Value Types](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0t2cwe11(v=vs.100)). > [!NOTE] -> Beginning with the .NET Framework version 2.0, may expose private fields. +> Beginning with the .NET Framework version 2.0, may expose private fields. ]]> @@ -7095,7 +7095,7 @@ On .NET 6 and later versions, this method is functionally equivalent to on a method outside of platform invoke has no effect. To execute setup tasks on all platform invoke methods in a type, use . + Calling on a method outside of platform invoke has no effect. To execute setup tasks on all platform invoke methods in a type, use . ]]> @@ -7157,7 +7157,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method invokes on every method for a given type. executes one-time method setup tasks without calling each method. You can use only for platform invoke calls. + The method invokes on every method for a given type. executes one-time method setup tasks without calling each method. You can use only for platform invoke calls. ]]> @@ -7238,12 +7238,12 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. ## Examples - The following example uses the method to create a managed string from an unmanaged `char` array. + The following example uses the method to create a managed string from an unmanaged `char` array. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.PtrToStringAnsi-IntPtr/cpp/sample.cpp" id="Snippet1"::: @@ -7313,12 +7313,12 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. ## Examples - The following example uses the method to create a managed string from an unmanaged`char` array. + The following example uses the method to create a managed string from an unmanaged`char` array. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.PtrToStringAnsi-IntPtr-int/cpp/sample.cpp" id="Snippet1"::: @@ -7398,9 +7398,9 @@ On .NET 6 and later versions, this method is functionally equivalent to . Otherwise, this method calls . + If the current platform is Unicode, each ANSI character is widened to a Unicode character and this method calls . Otherwise, this method calls . - is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. provides the opposite functionality of the and methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. provides the opposite functionality of the and methods. ]]> @@ -7470,9 +7470,9 @@ On .NET 6 and later versions, this method is functionally equivalent to ; on ANSI platforms, it calls . No transformations are done before these methods are called. + On Unicode platforms, this method calls ; on ANSI platforms, it calls . No transformations are done before these methods are called. - is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. provides the opposite functionality of and . + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. provides the opposite functionality of and . ]]> @@ -7544,7 +7544,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the method. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the method. ]]> @@ -7626,7 +7626,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. This API reflects the Windows definition of Unicode, which is a UTF-16 2-byte encoding. On many non-Windows platforms, the `wchar_t` data-type is 4-bytes, not 2-bytes. Consult your compiler to confirm if `wchar_t` can be used or `char16_t` should be used instead. @@ -7696,7 +7696,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. This API reflects the Windows definition of Unicode, which is a UTF-16 2-byte encoding. On many non-Windows platforms, the `wchar_t` data-type is 4-bytes, not 2-bytes. Consult your compiler to confirm if `wchar_t` can be used or `char16_t` should be used instead. @@ -7756,7 +7756,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the methods. + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the methods. ]]> @@ -7813,7 +7813,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the methods. ]]> @@ -7909,7 +7909,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You cannot use this overload method with value types. + is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You cannot use this overload method with value types. If the `ptr` parameter equals , `null` will be returned. ]]> @@ -8003,7 +8003,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You can pass a value type to this overload method. In this case, the returned object is a boxed instance. + is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You can pass a value type to this overload method. In this case, the returned object is a boxed instance. If the `ptr` parameter equals , `null` will be returned. ]]> @@ -8088,7 +8088,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as values. You can pass a value type to this method overload. + is often necessary in COM interop and platform invoke when structure parameters are represented as values. You can pass a value type to this method overload. If the `ptr` parameter equals and `T` is a reference type, `null` is returned. If `ptr` equals and `T` is a value type, a is thrown. ]]> @@ -8172,7 +8172,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as values. You cannot use this method overload with value types. + is often necessary in COM interop and platform invoke when structure parameters are represented as values. You cannot use this method overload with value types. If the `ptr` parameter equals and `T` is a reference type, `null` is returned. If `ptr` equals and `T` is a value type, a is thrown. ]]> @@ -8259,7 +8259,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method exposes the [IUnknown::QueryInterface](https://go.microsoft.com/fwlink/?LinkID=144867) method of a COM object, which attempts to obtain a specific interface pointer. Using `QueryInterface` on a COM object is the same as performing a cast operation in managed code. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. To obtain an value that represents a [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer, you can call , , or . + The method exposes the [IUnknown::QueryInterface](https://go.microsoft.com/fwlink/?LinkID=144867) method of a COM object, which attempts to obtain a specific interface pointer. Using `QueryInterface` on a COM object is the same as performing a cast operation in managed code. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. To obtain an value that represents a [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer, you can call , , or . ]]> @@ -8343,7 +8343,7 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -8355,7 +8355,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method to read the value of an unmanaged character. + The following example demonstrates how to use the method to read the value of an unmanaged character. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadByte/cpp/sample.cpp" id="Snippet1"::: @@ -8435,19 +8435,19 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet3"::: - The following example demonstrates how to use the method to read the value of an unmanaged character. + The following example demonstrates how to use the method to read the value of an unmanaged character. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadByte-IntPtr-int/cpp/sample.cpp" id="Snippet1"::: @@ -8534,7 +8534,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -8618,19 +8618,19 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int16` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int16` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: - The following example demonstrates how to use the method to read the value of an unmanaged `short` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `short` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt16/cpp/sample.cpp" id="Snippet1"::: @@ -8710,19 +8710,19 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: - The following example demonstrates how to use the method to read the value of an unmanaged `short` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `short` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt16-IntPtr-Int/cpp/sample.cpp" id="Snippet1"::: @@ -8810,7 +8810,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -8898,19 +8898,19 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int32` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int32` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet5"::: - The following example demonstrates how to use the method to read the value of an unmanaged `int` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `int` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt32/cpp/sample.cpp" id="Snippet1"::: @@ -8994,19 +8994,19 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet5"::: - The following example demonstrates how to use the method to read the value of an unmanaged `int` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `int` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt32-IntPtr-Int/cpp/sample.cpp" id="Snippet1"::: @@ -9098,7 +9098,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -9186,19 +9186,19 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int64` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int64` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet6"::: - The following example demonstrates how to use the method to read the value of an unmanaged `__int64` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `__int64` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt64/cpp/sample.cpp" id="Snippet1"::: @@ -9282,19 +9282,19 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet6"::: - The following example demonstrates how to use the method to read the value of an unmanaged `__int64` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `__int64` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt64-IntPtr-Int/cpp/sample.cpp" id="Snippet1"::: @@ -9386,7 +9386,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -9474,14 +9474,14 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet2"::: @@ -9565,14 +9565,14 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet2"::: @@ -9661,7 +9661,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -9733,7 +9733,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is one of two memory reallocation methods in the class. ( is the other.) The beginning of the reallocated memory content is the same as the original content; however, the entire memory block can be in a different location. This method exposes the COM [CoTaskMemRealloc](https://go.microsoft.com/fwlink/?LinkId=148778) function, which is referred to as the COM task memory allocator. + is one of two memory reallocation methods in the class. ( is the other.) The beginning of the reallocated memory content is the same as the original content; however, the entire memory block can be in a different location. This method exposes the COM [CoTaskMemRealloc](https://go.microsoft.com/fwlink/?LinkId=148778) function, which is referred to as the COM task memory allocator. ]]> @@ -9803,9 +9803,9 @@ On .NET 6 and later versions, this method is functionally equivalent to [!IMPORTANT] -> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. +> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. - is one of two memory reallocation API methods in the class. ( is the other.) + is one of two memory reallocation API methods in the class. ( is the other.) This method exposes the Win32 [GlobalReAlloc](https://go.microsoft.com/fwlink/?LinkId=148780) function from Kernel32.dll. The returned pointer can differ from the original. If it is different, the contents of the original memory block have been copied to the new block, and the original memory block has been freed. @@ -9883,14 +9883,14 @@ On .NET 6 and later versions, this method is functionally equivalent to should call . Calling after the reference count has reached zero causes undefined behavior. + The common language runtime manages the reference count of a COM object for you, making it unnecessary to use this method directly. Use this value only for testing purposes. In rare cases, such as testing a custom marshaler, you might find it necessary to manipulate an object's lifetime manually. Only programs that call should call . Calling after the reference count has reached zero causes undefined behavior. - You can call , , or to obtain an value that represents a [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer to release. You can also use these methods and the method on managed objects to release the COM interfaces represented by the managed object's [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). + You can call , , or to obtain an value that represents a [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer to release. You can also use these methods and the method on managed objects to release the COM interfaces represented by the managed object's [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). ## Examples - The following example demonstrates how to retrieve an `IUnknown` interface for a managed object using the method. The example then releases the interface pointer by calling the method. + The following example demonstrates how to retrieve an `IUnknown` interface for a managed object using the method. The example then releases the interface pointer by calling the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetIUnknownForObject/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetIUnknownForObject/example.vb" id="Snippet1"::: @@ -9970,17 +9970,17 @@ On .NET 6 and later versions, this method is functionally equivalent to method decrements the reference count of an RCW. When the reference count reaches zero, the runtime releases all its references on the unmanaged COM object, and throws a if you attempt to use the object further. If the same COM interface is passed more than one time from unmanaged to managed code, the reference count on the wrapper is incremented every time, and calling returns the number of remaining references. + The RCW has a reference count that is incremented every time a COM interface pointer is mapped to it. The method decrements the reference count of an RCW. When the reference count reaches zero, the runtime releases all its references on the unmanaged COM object, and throws a if you attempt to use the object further. If the same COM interface is passed more than one time from unmanaged to managed code, the reference count on the wrapper is incremented every time, and calling returns the number of remaining references. - This method enables you to force an RCW reference count release so that it occurs precisely when you want it to. However, improper use of may cause your application to fail, or may cause an access violation. + This method enables you to force an RCW reference count release so that it occurs precisely when you want it to. However, improper use of may cause your application to fail, or may cause an access violation. - Consider a scenario in which managed code in an application domain is holding onto an RCW that represents a COM component. If you call the method on the RCW, the managed code will be unable to access the RCW and will raise an exception. + Consider a scenario in which managed code in an application domain is holding onto an RCW that represents a COM component. If you call the method on the RCW, the managed code will be unable to access the RCW and will raise an exception. A more serious error may occur if a call to the RCW is executing when the RCW is released. In this case, there is a good chance that the thread making the call will cause an access violation. However, process memory may become corrupted, and the process may continue to run until it fails for reasons that are very difficult to debug. - This risk is compounded when the COM component that is being used is a singleton, for the following reason: The CLR activates COM components by calling the COM [CoCreateInstance](https://go.microsoft.com/fwlink/?LinkID=142894) function, which returns the same interface pointer every time it is called for singleton COM components. Thus, separate and independent pieces of managed code in an application domain can be using the same RCW for a singleton COM component, and if either one calls the method on the COM component, the other will be broken. + This risk is compounded when the COM component that is being used is a singleton, for the following reason: The CLR activates COM components by calling the COM [CoCreateInstance](https://go.microsoft.com/fwlink/?LinkID=142894) function, which returns the same interface pointer every time it is called for singleton COM components. Thus, separate and independent pieces of managed code in an application domain can be using the same RCW for a singleton COM component, and if either one calls the method on the COM component, the other will be broken. - Therefore, use the only if it is absolutely required. If you want to call this method to ensure that a COM component is released at a determined time, consider using the method instead. will release the underlying COM component regardless of how many times it has re-entered the CLR. The internal reference count of the RCW is incremented by one every time the COM component re-enters the CLR. Therefore, you could call the method in a loop until the value returned is zero. This achieves the same result as the method. + Therefore, use the only if it is absolutely required. If you want to call this method to ensure that a COM component is released at a determined time, consider using the method instead. will release the underlying COM component regardless of how many times it has re-entered the CLR. The internal reference count of the RCW is incremented by one every time the COM component re-enters the CLR. Therefore, you could call the method in a loop until the value returned is zero. This achieves the same result as the method. ]]> @@ -10087,7 +10087,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the `BSTR` when finished by calling the method. + The method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the `BSTR` when finished by calling the method. ]]> @@ -10151,12 +10151,12 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . The characters of the string are copied as ANSI characters. + The method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . The characters of the string are copied as ANSI characters. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemAnsi/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemAnsi/sample.vb" id="Snippet1"::: @@ -10223,12 +10223,12 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. The characters of the string are copied as Unicode characters. + The method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. The characters of the string are copied as Unicode characters. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemUnicode/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemUnicode/sample.vb" id="Snippet1"::: @@ -10295,12 +10295,12 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. + The method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocAnsi/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocAnsi/sample.vb" id="Snippet1"::: @@ -10367,12 +10367,12 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. + The method is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. ## Examples - The following example demonstrates how to use the method with the unmanaged `LogonUser` function to perform impersonation with the class. The example then uses the method to zero out and free the unmanaged string reference. + The following example demonstrates how to use the method with the unmanaged `LogonUser` function to perform impersonation with the class. The example then uses the method to zero out and free the unmanaged string reference. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocUnicode/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocUnicode/sample.vb" id="Snippet1"::: @@ -10452,7 +10452,7 @@ On .NET 6 and later versions, this method is functionally equivalent to adds data. retrieves data from the hash table. You should never have to call either method from your code. + All COM objects wrapped in a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper) have an associated hash table, to which adds data. retrieves data from the hash table. You should never have to call either method from your code. ]]> @@ -10508,7 +10508,7 @@ On .NET 6 and later versions, this method is functionally equivalent to . +The last platform invoke error is stored per-thread and can be retrieved using . ]]> @@ -10645,7 +10645,7 @@ The system error is based on the current operating system—that is, `errno` The size returned is the size of the unmanaged object. The unmanaged and managed sizes of an object can differ. For character types, the size is affected by the value applied to that class. - You can use the method to determine how much unmanaged memory to allocate using the and methods. + You can use the method to determine how much unmanaged memory to allocate using the and methods. ]]> @@ -10855,7 +10855,7 @@ The system error is based on the current operating system—that is, `errno` The size returned is the size of the unmanaged object. The unmanaged and managed sizes of an object can differ. For character types, the size is affected by the value applied to that class. - You can use the method to determine how much unmanaged memory to allocate by using the and methods. + You can use the method to determine how much unmanaged memory to allocate by using the and methods. ]]> @@ -10921,7 +10921,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the `BSTR` when finished by calling . This method provides the opposite functionality of . + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the `BSTR` when finished by calling . This method provides the opposite functionality of . ]]> @@ -10990,7 +10990,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as ANSI characters. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as ANSI characters. ]]> @@ -11054,7 +11054,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as Unicode characters. @@ -11124,7 +11124,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as Unicode characters. + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as Unicode characters. This API reflects the Windows definition of Unicode, which is a UTF-16 2-byte encoding. On many non-Windows platforms, the `wchar_t` data-type is 4-bytes, not 2-bytes. Consult your compiler to confirm if `wchar_t` can be used or `char16_t` should be used instead. @@ -11186,7 +11186,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string including a null terminator, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as UTF-8 characters. + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string including a null terminator, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as UTF-8 characters. ]]> @@ -11256,7 +11256,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . provides the opposite functionality of . + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . provides the opposite functionality of . This method copies embedded null characters, and includes a terminating null character. @@ -11330,7 +11330,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . This method copies embedded null characters, and includes a terminating null character. @@ -11406,7 +11406,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . This method copies embedded null characters, and includes a terminating null character. @@ -11504,20 +11504,20 @@ The system error is based on the current operating system—that is, `errno` A formatted class is a reference type whose layout is specified by the attribute, as either or . - copies the contents of `structure` to the pre-allocated block of memory that the `ptr` parameter points to. If `structure` contains reference types that marshal to COM interface pointers (interfaces, classes without layout, and ), the managed objects are kept alive with reference counts. All other reference types (for example, strings and arrays) are marshaled to copies. To release these managed or unmanaged objects, you must call the method before you free the memory block. + copies the contents of `structure` to the pre-allocated block of memory that the `ptr` parameter points to. If `structure` contains reference types that marshal to COM interface pointers (interfaces, classes without layout, and ), the managed objects are kept alive with reference counts. All other reference types (for example, strings and arrays) are marshaled to copies. To release these managed or unmanaged objects, you must call the method before you free the memory block. - If you use the method to copy a different instance to the memory block at a later time, specify `true` for `fDeleteOld` to remove reference counts for reference types in the previous instance. Otherwise, the managed reference types and unmanaged copies are effectively leaked. + If you use the method to copy a different instance to the memory block at a later time, specify `true` for `fDeleteOld` to remove reference counts for reference types in the previous instance. Otherwise, the managed reference types and unmanaged copies are effectively leaked. - The overall pattern for using is as follows: + The overall pattern for using is as follows: -1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear. +1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear. > [!IMPORTANT] > Specify `true` for `fDeleteOld` only if the block contains valid data. 2. If you copy a different instance to the memory block, and the object contains reference types, `fDeleteOld` must be `true` to free reference types in the old contents. -3. If the object contains reference types, you must call the method before you free the memory block. +3. If the object contains reference types, you must call the method before you free the memory block. > [!NOTE] > To pin an existing structure instead of copying it, use the type to create a pinned handle for the structure. For details on how to pin, see [Copying and Pinning](/dotnet/framework/interop/copying-and-pinning). @@ -11615,20 +11615,20 @@ The system error is based on the current operating system—that is, `errno` ## Remarks A formatted class is a reference type whose layout is specified by the attribute, as either or . - copies the contents of `structure` to the pre-allocated block of memory that the `ptr` parameter points to. If `structure` contains reference types that marshal to COM interface pointers (interfaces, classes without layout, and ), the managed objects are kept alive with reference counts. All other reference types (for example, strings and arrays) are marshaled to copies. To release these managed or unmanaged objects, you must call the method before you free the memory block. + copies the contents of `structure` to the pre-allocated block of memory that the `ptr` parameter points to. If `structure` contains reference types that marshal to COM interface pointers (interfaces, classes without layout, and ), the managed objects are kept alive with reference counts. All other reference types (for example, strings and arrays) are marshaled to copies. To release these managed or unmanaged objects, you must call the method before you free the memory block. - If you use the method to copy a different instance to the memory block at a later time, specify `true` for `fDeleteOld` to remove reference counts for reference types in the previous instance. Otherwise, the managed reference types and unmanaged copies are effectively leaked. + If you use the method to copy a different instance to the memory block at a later time, specify `true` for `fDeleteOld` to remove reference counts for reference types in the previous instance. Otherwise, the managed reference types and unmanaged copies are effectively leaked. - The overall pattern for using is as follows: + The overall pattern for using is as follows: -1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear. +1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear. > [!IMPORTANT] > Specify `true` for `fDeleteOld` only if the block contains valid data. 2. If you copy a different instance to the memory block, and the object contains reference types, `fDeleteOld` must be `true` to free reference types in the old contents. -3. If the object contains reference types, you must call the method before you free the memory block. +3. If the object contains reference types, you must call the method before you free the memory block. > [!NOTE] > To pin an existing structure instead of copying it, use the type to create a pinned handle for the structure. For details on how to pin, see [Copying and Pinning](/dotnet/framework/interop/copying-and-pinning). @@ -11833,13 +11833,13 @@ The system error is based on the current operating system—that is, `errno` ## Remarks This method creates an exception object for the specified failure HRESULT. If the HRESULT is 0 or positive (a success code), the method returns without creating or throwing an exception. - Note that the method returns an exception based on the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread if one is set. When this happens, the `errorCode` parameter is ignored. + Note that the method returns an exception based on the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread if one is set. When this happens, the `errorCode` parameter is ignored. - Some failure HRESULTs map to defined exceptions, whereas others do not. If the HRESULT maps to a defined exception, creates an instance of the exception and throws it. Otherwise, it creates an instance of , initializes the error code field with the HRESULT, and throws that exception. When is invoked, it attempts to retrieve extra information regarding the error by using the unmanaged [GetErrorInfo](/windows/win32/api/oleauto/nf-oleauto-geterrorinfo) function. + Some failure HRESULTs map to defined exceptions, whereas others do not. If the HRESULT maps to a defined exception, creates an instance of the exception and throws it. Otherwise, it creates an instance of , initializes the error code field with the HRESULT, and throws that exception. When is invoked, it attempts to retrieve extra information regarding the error by using the unmanaged [GetErrorInfo](/windows/win32/api/oleauto/nf-oleauto-geterrorinfo) function. For the mapping from each HRESULT to its comparable exception class in the .NET Framework, see [How to: Map HRESULTs and Exceptions](/dotnet/framework/interop/how-to-map-hresults-and-exceptions). - Occasionally, might return an exception from a previous COM call. In this case, you can use the following workaround and pass `IntPtr(-1)` as the second parameter (`errorInfo`): + Occasionally, might return an exception from a previous COM call. In this case, you can use the following workaround and pass `IntPtr(-1)` as the second parameter (`errorInfo`): ```csharp public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) @@ -11911,11 +11911,11 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) ## Remarks This method creates an exception object for the specified failure HRESULT. If the HRESULT is 0 or positive (a success code), the method returns without creating or throwing an exception. - The method releases the `errorInfo` parameter, decreasing the COM reference count of the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface. + The method releases the `errorInfo` parameter, decreasing the COM reference count of the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface. - Note that the method returns an exception based on the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread if one is set. When this happens, the `errorCode` parameter is ignored. + Note that the method returns an exception based on the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread if one is set. When this happens, the `errorCode` parameter is ignored. - Some failure HRESULTs map to defined exceptions, whereas others do not. If the HRESULT maps to a defined exception, creates an instance of the exception and throws it. Otherwise, it creates an instance of , initializes the error code field with the HRESULT, and throws that exception. The `errorInfo` parameter is used to retrieve extra information regarding the error. + Some failure HRESULTs map to defined exceptions, whereas others do not. If the HRESULT maps to a defined exception, creates an instance of the exception and throws it. Otherwise, it creates an instance of , initializes the error code field with the HRESULT, and throws that exception. The `errorInfo` parameter is used to retrieve extra information regarding the error. For the mapping from each HRESULT to its comparable exception class in the .NET Framework, see [How to: Map HRESULTs and Exceptions](/dotnet/framework/interop/how-to-map-hresults-and-exceptions). @@ -12191,7 +12191,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. @@ -12278,12 +12278,12 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet3"::: @@ -12372,7 +12372,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. ]]> @@ -12455,14 +12455,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: @@ -12541,14 +12541,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: @@ -12629,14 +12629,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: @@ -12710,14 +12710,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: @@ -12803,7 +12803,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -12893,7 +12893,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -12978,14 +12978,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet5"::: @@ -13067,14 +13067,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet5"::: @@ -13164,7 +13164,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -13249,14 +13249,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet6"::: @@ -13338,14 +13338,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet6"::: @@ -13435,7 +13435,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -13520,14 +13520,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet2"::: @@ -13610,14 +13610,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) ## Remarks This method writes a 32 bit integer on 32 bit systems, and a 64 bit integer on 64 bit systems. - enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet2"::: @@ -13703,7 +13703,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -13771,7 +13771,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first sets the contents of the BSTR to zero, and then frees the BSTR. + The method first sets the contents of the BSTR to zero, and then frees the BSTR. ]]> @@ -13833,12 +13833,12 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemAnsi/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemAnsi/sample.vb" id="Snippet1"::: @@ -13903,7 +13903,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ]]> @@ -13957,7 +13957,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ]]> @@ -14019,12 +14019,12 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocAnsi/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocAnsi/sample.vb" id="Snippet1"::: @@ -14089,12 +14089,12 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ## Examples - The following example demonstrates how to use the method with the unmanaged `LogonUser` function to perform impersonation with the class. The example then uses the method to zero out and free the unmanaged string reference. + The following example demonstrates how to use the method with the unmanaged `LogonUser` function to perform impersonation with the class. The example then uses the method to zero out and free the unmanaged string reference. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocUnicode/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocUnicode/sample.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.InteropServices/MarshalDirectiveException.xml b/xml/System.Runtime.InteropServices/MarshalDirectiveException.xml index 303e888acb6..7f253f7b4d1 100644 --- a/xml/System.Runtime.InteropServices/MarshalDirectiveException.xml +++ b/xml/System.Runtime.InteropServices/MarshalDirectiveException.xml @@ -146,8 +146,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -206,8 +206,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]> @@ -337,8 +337,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/MemoryMarshal.xml b/xml/System.Runtime.InteropServices/MemoryMarshal.xml index 3c95382a47d..f9a698ca6ec 100644 --- a/xml/System.Runtime.InteropServices/MemoryMarshal.xml +++ b/xml/System.Runtime.InteropServices/MemoryMarshal.xml @@ -251,7 +251,7 @@ ## Remarks > [!CAUTION] -> This method must be used with extreme caution. is used to represent immutable data and other memory that is not meant to be written to. instances created by this method should not be written to. The purpose of this method is to allow variables typed as but only used for reading to store a . +> This method must be used with extreme caution. is used to represent immutable data and other memory that is not meant to be written to. instances created by this method should not be written to. The purpose of this method is to allow variables typed as but only used for reading to store a . ]]> @@ -615,7 +615,7 @@ This method is supported only on platforms that support misaligned memory access ## Remarks -The array must already be pinned before this method is called, and that array must not be unpinned while the buffer that it returns is still in use. Calling this method on an unpinned array could result in memory corruption. +The array must already be pinned before this method is called, and that array must not be unpinned while the buffer that it returns is still in use. Calling this method on an unpinned array could result in memory corruption. ]]> @@ -1268,7 +1268,7 @@ If the span is empty, this method returns a reference to the location where the ## Remarks -This method allows a read-only memory buffer to be used in existing APIs that require a parameter of type . +This method allows a read-only memory buffer to be used in existing APIs that require a parameter of type . ]]> @@ -1342,7 +1342,7 @@ This method allows a read-only memory buffer to be used in existing APIs that re ## Remarks > [!CAUTION] -> is used to represent immutable data. instances returned by this method should not be written to, and the wrapped array instance should only be passed to methods which treat the array contents as read-only. +> is used to represent immutable data. instances returned by this method should not be written to, and the wrapped array instance should only be passed to methods which treat the array contents as read-only. ]]> diff --git a/xml/System.Runtime.InteropServices/NFloat.xml b/xml/System.Runtime.InteropServices/NFloat.xml index 5b8046aa9b5..8c46eef3dec 100644 --- a/xml/System.Runtime.InteropServices/NFloat.xml +++ b/xml/System.Runtime.InteropServices/NFloat.xml @@ -2091,7 +2091,7 @@ This computes `cos(x * Ï€)`. This method correctly handles floating-point values and so `2.0` will return `true` while `2.2` will return `false`. -A return value of `false` does not imply that will return `true`. A number with a fractional portion, for example, `3.3`, is not even or odd. +A return value of `false` does not imply that will return `true`. A number with a fractional portion, for example, `3.3`, is not even or odd. ]]> @@ -2375,7 +2375,7 @@ This method correctly handles floating-point values and so `2.0` and `3.0` will This method correctly handles floating-point values and so `3.0` will return `true` while `3.3` will return `false`. -A return value of `false` does not imply that will return `true`. A number with a fractional portion, for example, `3.3`, is not even or odd. +A return value of `false` does not imply that will return `true`. A number with a fractional portion, for example, `3.3`, is not even or odd. ]]> @@ -2417,7 +2417,7 @@ A return value of `false` does not imply that will return `true`. A complex number, `a + bi` for non-zero `b`, is not positive or negative +A return value of `false` does not imply that will return `true`. A complex number, `a + bi` for non-zero `b`, is not positive or negative ]]> @@ -2880,7 +2880,7 @@ This function checks values against the extended real number line, thus returns ## Remarks -For , this method matches the IEEE 754:2019 `maximum` function. This requires NaN inputs to be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For , this method matches the IEEE 754:2019 `maximum` function. This requires NaN inputs to be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -2924,7 +2924,7 @@ For , this method matches the IEEE 754: ## Remarks -For , this method matches the IEEE 754:2019 `maximumMagnitude` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For , this method matches the IEEE 754:2019 `maximumMagnitude` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -2968,7 +2968,7 @@ For , this method matches the IE ## Remarks -For this method matches the IEEE 754:2019 `maximumMagnitudeNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For this method matches the IEEE 754:2019 `maximumMagnitudeNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3044,7 +3044,7 @@ For this method matches the IEE ## Remarks -For this method matches the IEEE 754:2019 `maximumNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For this method matches the IEEE 754:2019 `maximumNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3116,7 +3116,7 @@ For this method matches the IEEE 754:2 ## Remarks -For , this method matches the IEEE 754:2019 `minimum` function. This requires NaN inputs to be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For , this method matches the IEEE 754:2019 `minimum` function. This requires NaN inputs to be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3160,7 +3160,7 @@ For , this method matches the IEEE 754: ## Remarks -For , this method matches the IEEE 754:2019 `minimumMagnitude` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For , this method matches the IEEE 754:2019 `minimumMagnitude` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3204,7 +3204,7 @@ For , this method matches the IE ## Remarks -For this method matches the IEEE 754:2019 `minimumMagnitudeNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For this method matches the IEEE 754:2019 `minimumMagnitudeNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3280,7 +3280,7 @@ For this method matches the IEE ## Remarks -For this method matches the IEEE 754:2019 `minimumNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For this method matches the IEEE 754:2019 `minimumNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> diff --git a/xml/System.Runtime.InteropServices/NativeLibrary.xml b/xml/System.Runtime.InteropServices/NativeLibrary.xml index bf6a5bd58b4..54e787a4014 100644 --- a/xml/System.Runtime.InteropServices/NativeLibrary.xml +++ b/xml/System.Runtime.InteropServices/NativeLibrary.xml @@ -211,7 +211,7 @@ Calling this method with an invalid `handle` parameter other than on the calling assembly, if any are present, are used. This method does not invoke the resolver registered using -method. Starting with .NET 5, this method does invoke the method and the event. +method. Starting with .NET 5, this method does invoke the method and the event. ]]> diff --git a/xml/System.Runtime.InteropServices/OSPlatform.xml b/xml/System.Runtime.InteropServices/OSPlatform.xml index 08336a85922..cac4a5a2212 100644 --- a/xml/System.Runtime.InteropServices/OSPlatform.xml +++ b/xml/System.Runtime.InteropServices/OSPlatform.xml @@ -112,18 +112,18 @@ Creates a new instance. An object that represents the operating system. - method with the following strings is equivalent to retrieving the object from the corresponding static property: - -|osPlatform string|OSPlatform property| -|-----------------------|-------------------------| + method with the following strings is equivalent to retrieving the object from the corresponding static property: + +|osPlatform string|OSPlatform property| +|-----------------------|-------------------------| |"FREEBSD"|| -|"LINUX"|| -|"OSX"|| -|"WINDOWS"|| - +|"LINUX"|| +|"OSX"|| +|"WINDOWS"|| + ]]> @@ -199,11 +199,11 @@ if is a instance and its name is the same as the current object. - object is the `osPlatform` string passed to the method. The names of the objects returned by the static properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. - + object is the `osPlatform` string passed to the method. The names of the objects returned by the static properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. + ]]> @@ -258,11 +258,11 @@ if the current instance and are equal; otherwise, . - instances are equal if they have the same name. The name of an object is the `osPlatform` string passed to the method. The names of the objects returned by the static OSPlatform properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. - + instances are equal if they have the same name. The name of an object is the `osPlatform` string passed to the method. The names of the objects returned by the static OSPlatform properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. + ]]> @@ -440,11 +440,11 @@ if and are equal; otherwise, . - instances are equal if they have the same name. The name of an object is the `osPlatform` string passed to the method. The names of the objects returned by the static OSPlatform properties are "FREEBSD", "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. - + instances are equal if they have the same name. The name of an object is the `osPlatform` string passed to the method. The names of the objects returned by the static OSPlatform properties are "FREEBSD", "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. + ]]> @@ -587,11 +587,11 @@ Returns the string representation of this instance. A string that represents this instance. - object is the `osPlatform` string passed to the method. The names of the OSPlatform objects returned by the static OSPlatform properties are "FREEBSD", "LINUX", "OSX", and "WINDOWS". - + object is the `osPlatform` string passed to the method. The names of the OSPlatform objects returned by the static OSPlatform properties are "FREEBSD", "LINUX", "OSX", and "WINDOWS". + ]]> diff --git a/xml/System.Runtime.InteropServices/RegistrationClassContext.xml b/xml/System.Runtime.InteropServices/RegistrationClassContext.xml index 2cdf672a662..ebb7a3147ab 100644 --- a/xml/System.Runtime.InteropServices/RegistrationClassContext.xml +++ b/xml/System.Runtime.InteropServices/RegistrationClassContext.xml @@ -23,13 +23,13 @@ Specifies the set of execution contexts in which a class object will be made available for requests to construct instances. - enumeration are used in the `classContext` parameter of the method. These values are the same as those defined in the COM **CLSCTX** enumeration, which is used as the `dwClsContext` parameter in calls to the COM API `CoRegisterClassObject`. - - For more information about `CoRegisterClassObject` and the **CLSCTX** enumeration, see the MSDN library. - + enumeration are used in the `classContext` parameter of the method. These values are the same as those defined in the COM **CLSCTX** enumeration, which is used as the `dwClsContext` parameter in calls to the COM API `CoRegisterClassObject`. + + For more information about `CoRegisterClassObject` and the **CLSCTX** enumeration, see the MSDN library. + ]]> diff --git a/xml/System.Runtime.InteropServices/RegistrationConnectionType.xml b/xml/System.Runtime.InteropServices/RegistrationConnectionType.xml index 30215e9dd85..1ccf50b51e1 100644 --- a/xml/System.Runtime.InteropServices/RegistrationConnectionType.xml +++ b/xml/System.Runtime.InteropServices/RegistrationConnectionType.xml @@ -23,13 +23,13 @@ Defines the types of connections to a class object. - enumeration are used in the `flags` parameter of the method. These values are the same as those defined in the COM **REGCLS** enumeration, which is used as the `flags` parameter in calls to the COM API `CoRegisterClassObject`. - - For more information about `CoRegisterClassObject` and the **REGCLS** enumeration, see the MSDN library. - + enumeration are used in the `flags` parameter of the method. These values are the same as those defined in the COM **REGCLS** enumeration, which is used as the `flags` parameter in calls to the COM API `CoRegisterClassObject`. + + For more information about `CoRegisterClassObject` and the **REGCLS** enumeration, see the MSDN library. + ]]> diff --git a/xml/System.Runtime.InteropServices/RegistrationServices.xml b/xml/System.Runtime.InteropServices/RegistrationServices.xml index adc91b7dc5a..ae84c4c8510 100644 --- a/xml/System.Runtime.InteropServices/RegistrationServices.xml +++ b/xml/System.Runtime.InteropServices/RegistrationServices.xml @@ -43,13 +43,13 @@ You can use the following methods to assist you in preparing a registration file: -- +- -- +- -- +- -- +- Although these methods help in gathering information to be used in a registration file, they do not actually produce a registration file. Instead, you can use the [Regasm.exe (Assembly Registration Tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) tool with the `/regfile` option to perform this task. methods cannot export and register a type library. To export and register a type library, you can use the [Regasm.exe (Assembly Registration Tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) tool and the [Tlbexp.exe (Type Library Exporter)](/dotnet/framework/tools/tlbexp-exe-type-library-exporter) tool. @@ -219,7 +219,7 @@ ## Remarks `RegisterAssembly` adds the appropriate registry entries for the types in the specified assembly. This method also calls any registration functions found in the assembly. - Use to get an assembly. + Use to get an assembly. ]]> @@ -296,9 +296,9 @@ method is not atomic and can cause unpredictable results when used in a multithreaded context. + This method is equivalent to calling `CoRegisterClassObject` in COM. The method is not atomic and can cause unpredictable results when used in a multithreaded context. - In version 2.0 and later, use the method to unregister a type in COM. + In version 2.0 and later, use the method to unregister a type in COM. Note that using platform invoke to call the unmanaged `CoRegisterClassObject` and `CoDisconnectObject` methods for registration and unregistration of COM objects is not supported. @@ -350,9 +350,9 @@ method is not atomic and can cause unpredictable results when used in a multithreaded context. + This method is equivalent to calling `CoRegisterClassObject` in COM. The method is not atomic and can cause unpredictable results when used in a multithreaded context. - In the .NET Framework version 2.0 and later, use the method to unregister a type in COM. + In the .NET Framework version 2.0 and later, use the method to unregister a type in COM. Note that using platform invoke to call the unmanaged `CoRegisterClassObject` and `CoDisconnectObject` methods for registration and unregistration of COM objects is not supported. @@ -474,7 +474,7 @@ . This method also calls any unregistration functions found in the assembly. + `UnregisterAssembly` removes the registry entries for the types in the specified assembly previously added by . This method also calls any unregistration functions found in the assembly. ]]> diff --git a/xml/System.Runtime.InteropServices/RuntimeEnvironment.xml b/xml/System.Runtime.InteropServices/RuntimeEnvironment.xml index 7be2a6467b1..0935d6a1796 100644 --- a/xml/System.Runtime.InteropServices/RuntimeEnvironment.xml +++ b/xml/System.Runtime.InteropServices/RuntimeEnvironment.xml @@ -151,7 +151,7 @@ method. This code example is part of a larger example provided for the class. + The following example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RuntimeEnvironment/cpp/RuntimeEnvironment.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/RuntimeEnvironment/Overview/RuntimeEnvironment.cs" id="Snippet2"::: @@ -211,7 +211,7 @@ method. This code example is part of a larger example provided for the class. + The following example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RuntimeEnvironment/cpp/RuntimeEnvironment.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/RuntimeEnvironment/Overview/RuntimeEnvironment.cs" id="Snippet3"::: @@ -294,7 +294,7 @@ The following table shows the supported combinations for `clsid` and `riid`. |CLSID_TypeNameFactory|IID_TypeNameFactory| |CLSID_CLRStrongName|IID_CLRStrongName| - is similar to the method. + is similar to the method. ]]> @@ -364,7 +364,7 @@ The following table shows the supported combinations for `clsid` and `riid`. is similar to the method. + is similar to the method. ]]> diff --git a/xml/System.Runtime.InteropServices/SEHException.xml b/xml/System.Runtime.InteropServices/SEHException.xml index 65ac630d8fb..f3501914829 100644 --- a/xml/System.Runtime.InteropServices/SEHException.xml +++ b/xml/System.Runtime.InteropServices/SEHException.xml @@ -183,8 +183,8 @@ catch(…) |Property|Value| |--------------|-----------| -||A null reference (`Nothing` in Visual Basic).| -||A localized error message string.| +||A null reference (`Nothing` in Visual Basic).| +||A localized error message string.| ]]> @@ -243,8 +243,8 @@ catch(…) |Property|Value| |--------------|-----------| -||A null reference (`Nothing` in Visual Basic).| -||`message`.| +||A null reference (`Nothing` in Visual Basic).| +||`message`.| ]]> @@ -376,8 +376,8 @@ catch(…) |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> @@ -434,7 +434,7 @@ catch(…) returns `true`, then a filtered exception handler can correct the problem that caused the exception, and the code will continue from the point at which the exception was thrown. + If returns `true`, then a filtered exception handler can correct the problem that caused the exception, and the code will continue from the point at which the exception was thrown. ]]> diff --git a/xml/System.Runtime.InteropServices/SafeArrayRankMismatchException.xml b/xml/System.Runtime.InteropServices/SafeArrayRankMismatchException.xml index 625c610c81f..3bf1ba1d284 100644 --- a/xml/System.Runtime.InteropServices/SafeArrayRankMismatchException.xml +++ b/xml/System.Runtime.InteropServices/SafeArrayRankMismatchException.xml @@ -148,8 +148,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -208,8 +208,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]> @@ -341,8 +341,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/SafeArrayTypeMismatchException.xml b/xml/System.Runtime.InteropServices/SafeArrayTypeMismatchException.xml index cae6b997cc6..39e0d1183b7 100644 --- a/xml/System.Runtime.InteropServices/SafeArrayTypeMismatchException.xml +++ b/xml/System.Runtime.InteropServices/SafeArrayTypeMismatchException.xml @@ -146,8 +146,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -206,8 +206,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]> @@ -339,8 +339,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/SafeBuffer.xml b/xml/System.Runtime.InteropServices/SafeBuffer.xml index 4b3de3944ec..19f719241c6 100644 --- a/xml/System.Runtime.InteropServices/SafeBuffer.xml +++ b/xml/System.Runtime.InteropServices/SafeBuffer.xml @@ -84,11 +84,11 @@ method before you use any instance of . To avoid races when you store an instance of a object in a static variable, you should use one of the following approaches: + You must call the method before you use any instance of . To avoid races when you store an instance of a object in a static variable, you should use one of the following approaches: - Create a lock when publishing the . -- Create a local variable, initialize the , and then assign the to the static variable, for example, by using the method. +- Create a local variable, initialize the , and then assign the to the static variable, for example, by using the method. > [!NOTE] > Assignments in a static class constructor are implicitly locked. @@ -207,11 +207,11 @@ returns, you should perform bounds checking by verifying that the `pointer` parameter is `null`. If it is not `null`, you must call the method in a constrained execution region (CER). + When returns, you should perform bounds checking by verifying that the `pointer` parameter is `null`. If it is not `null`, you must call the method in a constrained execution region (CER). - calls the method and exposes the pointer. + calls the method and exposes the pointer. - The following example demonstrates how to use the method: + The following example demonstrates how to use the method: ``` byte* pointer = null; diff --git a/xml/System.Runtime.InteropServices/SafeHandle.xml b/xml/System.Runtime.InteropServices/SafeHandle.xml index 9372e08d525..8ea769fd566 100644 --- a/xml/System.Runtime.InteropServices/SafeHandle.xml +++ b/xml/System.Runtime.InteropServices/SafeHandle.xml @@ -177,7 +177,7 @@ Optionally specify `-Fault` to intentionally attempt to leak the handle by abort is never called; thus, it is not recommended to use this parameter value as your code may leak resources. + If the `ownsHandle` parameter is `false`, is never called; thus, it is not recommended to use this parameter value as your code may leak resources. ]]> @@ -242,12 +242,12 @@ Optionally specify `-Fault` to intentionally attempt to leak the handle by abort or method allows the resources to be freed. This might not happen immediately if other threads are using the same safe handle object, but will happen as soon as that is no longer the case. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. + Calling the or method allows the resources to be freed. This might not happen immediately if other threads are using the same safe handle object, but will happen as soon as that is no longer the case. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. - Call the or method when you are finished using the object. + Call the or method when you are finished using the object. > [!NOTE] -> Always call or before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. +> Always call or before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. ]]> @@ -318,7 +318,7 @@ Optionally specify `-Fault` to intentionally attempt to leak the handle by abort method prevents the common language runtime from reclaiming memory used by a handle (which occurs when the runtime calls the method). You can use this method to manually increment the reference count on a instance. returns a Boolean value using a `ref` parameter (`success`) that indicates whether the reference count was incremented successfully. This allows your program logic to back out in case of failure. You should set `success` to `false` before calling . If `success` is `true`, avoid resource leaks by matching the call to with a corresponding call to . + The method prevents the common language runtime from reclaiming memory used by a handle (which occurs when the runtime calls the method). You can use this method to manually increment the reference count on a instance. returns a Boolean value using a `ref` parameter (`success`) that indicates whether the reference count was incremented successfully. This allows your program logic to back out in case of failure. You should set `success` to `false` before calling . If `success` is `true`, avoid resource leaks by matching the call to with a corresponding call to . If this call is successful, it will set the `ref bool success` parameter to `true` and return successfully. If this call is unsuccessful, it will throw an exception and leave the `ref bool success` parameter unmodified. @@ -393,7 +393,7 @@ If this call is successful, it will set the `ref bool success` parameter to `tru You can use this method to retrieve the actual handle value from an instance of the derived class. This method is needed for backwards compatibility because many properties in the .NET Framework return `IntPtr` handle types. `IntPtr` handle types are platform-specific types used to represent a pointer or a handle. > [!CAUTION] -> Using the method can pose security risks because, if the handle has been marked as invalid with , still returns the original, potentially stale handle value. The returned handle can also be recycled at any point. At best, this means the handle might suddenly stop working. At worst, if the handle or the resource that the handle represents is exposed to untrusted code, this can lead to a recycling security attack on the reused or returned handle. For example, an untrusted caller can query data on the handle just returned and receive information for an entirely unrelated resource. See the and the methods for more information about using the method safely. +> Using the method can pose security risks because, if the handle has been marked as invalid with , still returns the original, potentially stale handle value. The returned handle can also be recycled at any point. At best, this means the handle might suddenly stop working. At worst, if the handle or the resource that the handle represents is exposed to untrusted code, this can lead to a recycling security attack on the reused or returned handle. For example, an untrusted caller can query data on the handle just returned and receive information for an entirely unrelated resource. See the and the methods for more information about using the method safely. ]]> @@ -460,10 +460,10 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method is the counterpart to . You should always match a call to the method with a successful call to . + The method is the counterpart to . You should always match a call to the method with a successful call to . > [!CAUTION] -> In the same way that unmatched calls can cause resource leaks, unmatched calls can cause invalid handle states to become visible to other threads. +> In the same way that unmatched calls can cause resource leaks, unmatched calls can cause invalid handle states to become visible to other threads. ]]> @@ -543,12 +543,12 @@ If this call is successful, it will set the `ref bool success` parameter to `tru or method allows the resources to be freed. This might not happen immediately if other threads are using the same instance of the safe handle, but will happen as soon as that is no longer the case. Although most classes using do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, they can provide a finalizer that is guaranteed to run before the critical finalizer runs. + Calling the or method allows the resources to be freed. This might not happen immediately if other threads are using the same instance of the safe handle, but will happen as soon as that is no longer the case. Although most classes using do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, they can provide a finalizer that is guaranteed to run before the critical finalizer runs. - Call the or method when you are finished using the object. The method leaves the object in an unusable state. + Call the or method when you are finished using the object. The method leaves the object in an unusable state. > [!NOTE] -> Always call the or method before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. +> Always call the or method before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. ]]> @@ -619,7 +619,7 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method with the `disposing` parameter set to `false`. + You should never explicitly call the method with the `disposing` parameter set to `false`. ]]> @@ -682,7 +682,7 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method is the destructor for the class. Application code should not call this method directly. + The method is the destructor for the class. Application code should not call this method directly. ]]> @@ -807,11 +807,11 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method returns a value indicating whether the object's handle is no longer associated with a native resource. This differs from the definition of the property, which computes whether a given handle is always considered invalid. The method returns a `true` value in the following cases: + The method returns a value indicating whether the object's handle is no longer associated with a native resource. This differs from the definition of the property, which computes whether a given handle is always considered invalid. The method returns a `true` value in the following cases: -- The method was called. +- The method was called. -- The method or method was called and there are no references to the object on other threads. +- The method or method was called and there are no references to the object on other threads. ]]> @@ -949,11 +949,11 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method is guaranteed to be called only once and only if the handle is valid as defined by the property. Implement this method in your derived classes to execute any code that is required to free the handle. Because one of the functions of is to guarantee prevention of resource leaks, the code in your implementation of must never fail. The garbage collector calls after normal finalizers have been run for objects that were garbage collected at the same time. The garbage collector guarantees the resources to invoke this method and that the method will not be interrupted while it is in progress. + The method is guaranteed to be called only once and only if the handle is valid as defined by the property. Implement this method in your derived classes to execute any code that is required to free the handle. Because one of the functions of is to guarantee prevention of resource leaks, the code in your implementation of must never fail. The garbage collector calls after normal finalizers have been run for objects that were garbage collected at the same time. The garbage collector guarantees the resources to invoke this method and that the method will not be interrupted while it is in progress. Additionally, for simple cleanup (for example, calling the Windows API `CloseHandle` on a file handle) you can check the return value for the single platform invoke call. For complex cleanup, you may have a lot of program logic and many method calls, some of which might fail. You must ensure that your program logic has fallback code for each of those cases. - If returns `false` for any reason, it generates a [releaseHandleFailed](/dotnet/framework/debug-trace-profile/releasehandlefailed-mda) Managed Debugging Assistant when running on .NET Framework. This helps you detect cases where your attempt to release resources fails. + If returns `false` for any reason, it generates a [releaseHandleFailed](/dotnet/framework/debug-trace-profile/releasehandlefailed-mda) Managed Debugging Assistant when running on .NET Framework. This helps you detect cases where your attempt to release resources fails. ## Examples The following code example releases the handle and is part of a larger example provided for the class. @@ -1030,7 +1030,7 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method only if you need to support a pre-existing handle (for example, if the handle is returned in a structure) because the .NET Framework COM interop infrastructure does not support marshaling output handles in a structure. + Use the method only if you need to support a pre-existing handle (for example, if the handle is returned in a structure) because the .NET Framework COM interop infrastructure does not support marshaling output handles in a structure. ]]> @@ -1097,9 +1097,9 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method only when you know that your handle no longer references a resource. Doing so does not change the value of the field; it only marks the handle as closed. The handle might then contain a potentially stale value. The effect of this call is that no attempt is made to free the resources. + Call the method only when you know that your handle no longer references a resource. Doing so does not change the value of the field; it only marks the handle as closed. The handle might then contain a potentially stale value. The effect of this call is that no attempt is made to free the resources. - As with the method, use only if you need to support a pre-existing handle. + As with the method, use only if you need to support a pre-existing handle. ]]> diff --git a/xml/System.Runtime.InteropServices/TypeIdentifierAttribute.xml b/xml/System.Runtime.InteropServices/TypeIdentifierAttribute.xml index 47a9e777364..4f4fd0e7173 100644 --- a/xml/System.Runtime.InteropServices/TypeIdentifierAttribute.xml +++ b/xml/System.Runtime.InteropServices/TypeIdentifierAttribute.xml @@ -73,7 +73,7 @@ - For types that don't have GUIDs in their type library, it has a constructor that takes two strings (`scope` and `identifier`). These are combined into a GUID and become the key that is used for type equivalence. - Type equivalence is discussed in the topic. + Type equivalence is discussed in the topic. ]]> diff --git a/xml/System.Runtime.InteropServices/TypeLibExporterFlags.xml b/xml/System.Runtime.InteropServices/TypeLibExporterFlags.xml index 55fc5ed7a4f..d0ded6dec90 100644 --- a/xml/System.Runtime.InteropServices/TypeLibExporterFlags.xml +++ b/xml/System.Runtime.InteropServices/TypeLibExporterFlags.xml @@ -32,11 +32,11 @@ Indicates how a type library should be produced. - . - + . + ]]> diff --git a/xml/System.Runtime.InteropServices/TypeLibImporterFlags.xml b/xml/System.Runtime.InteropServices/TypeLibImporterFlags.xml index f97d9ae40e5..7aadd12dff0 100644 --- a/xml/System.Runtime.InteropServices/TypeLibImporterFlags.xml +++ b/xml/System.Runtime.InteropServices/TypeLibImporterFlags.xml @@ -35,7 +35,7 @@ method. + This enumeration is used with the method. ]]> diff --git a/xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml b/xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml index 1a92d7e6212..0dd97f8c312 100644 --- a/xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml +++ b/xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml @@ -43,9 +43,9 @@ Types used in a managed-to-unmanaged interop operation can use is specified with a flag that preserves constructors for the storage location. -- Calls to with a constant string representing the type name when is specified with a flag that preserves constructors. +- Calls to with a constant string representing the type name when is specified with a flag that preserves constructors. - The type of a method argument to the `newobj` instruction. -- The generic argument to the method. +- The generic argument to the method. - The argument to the `box` instruction. - The argument to the `newarr` instruction. - The argument to the `mkrefany` instruction. diff --git a/xml/System.Runtime.InteropServices/TypeMapAttribute`1.xml b/xml/System.Runtime.InteropServices/TypeMapAttribute`1.xml index ff7f57f30ab..fa73e68b313 100644 --- a/xml/System.Runtime.InteropServices/TypeMapAttribute`1.xml +++ b/xml/System.Runtime.InteropServices/TypeMapAttribute`1.xml @@ -57,8 +57,8 @@ When an application is trimmed, an entry in the External Type Map is included wh - The argument to the `newarr` instruction. - The type of a method argument to the `newobj` instruction if it's a class type. - The owning type of an instance method argument to `call` or `ldftn`, or the owning type of any method argument to `callvirt` or `ldvirtftn`. If the owning type is an interface and the trimming tool can determine that there's only one implementation of the interface, it's free to interpret the method token argument as though it's the method on the only implementing type. -- The generic argument to the method. -- Calls to with a constant string representing the type name. +- The generic argument to the method. +- Calls to with a constant string representing the type name. Many of these instructions can be passed a generic parameter. In that case, the trimming tool should consider type arguments of instantiations of that type as having met one of these rules and include any entries with those types as "trim target" types. diff --git a/xml/System.Runtime.InteropServices/UCOMITypeInfo.xml b/xml/System.Runtime.InteropServices/UCOMITypeInfo.xml index bcd5af090bd..7ae28a9ddd0 100644 --- a/xml/System.Runtime.InteropServices/UCOMITypeInfo.xml +++ b/xml/System.Runtime.InteropServices/UCOMITypeInfo.xml @@ -30,11 +30,11 @@ Use instead. - @@ -67,11 +67,11 @@ On successful return, a reference to the member. Retrieves the addresses of static functions or variables, such as those defined in a DLL. - @@ -104,11 +104,11 @@ On successful return, a reference to the created object. Creates a new instance of a type that describes a component class (coclass). - @@ -139,11 +139,11 @@ On successful return, a reference to the index of the type description within the containing type library. Retrieves the type library that contains this type description and its index within that type library. - @@ -180,11 +180,11 @@ If not , and the function is defined by an ordinal, then lpwOrdinal is set to point to the ordinal. Retrieves a description or specification of an entry point for a function in a DLL. - @@ -221,11 +221,11 @@ On successful return, the fully qualified name of the Help file. Retrieves the documentation string, the complete Help file name and path, and the context ID for the Help topic for a specified type description. - @@ -256,13 +256,13 @@ Reference to a that describes the specified function. Retrieves the structure that contains information about a specified function. - . - - For additional information about `ITypeInfo::GetFuncDesc`, see the MSDN Library. - + . + + For additional information about `ITypeInfo::GetFuncDesc`, see the MSDN Library. + ]]> @@ -295,11 +295,11 @@ Reference to an array in which name mappings are placed. Maps between member names and member IDs, and parameter names and parameter IDs. - @@ -330,11 +330,11 @@ On successful return, a reference to the enumeration. Retrieves the value for one implemented interface or base interface in a type description. - @@ -365,11 +365,11 @@ A reference to the opcode string used in marshaling the fields of the structure described by the referenced type description, or returns if there is no information to return. Retrieves marshaling information. - @@ -404,11 +404,11 @@ On successful return, the number of names in the array. Retrieves the variable with the specified member ID (or the name of the property or method and its parameters) that correspond to the specified function ID. - @@ -439,11 +439,11 @@ On successful return, the referenced type description. If a type description references other type descriptions, it retrieves the referenced type descriptions. - @@ -474,11 +474,11 @@ Reference to a handle for the implemented interface. If a type description describes a COM class, it retrieves the type description of the implemented interface types. - @@ -507,13 +507,13 @@ On successful return, a reference to the structure that contains the attributes of this type description. Retrieves a structure that contains the attributes of the type description. - . - - For additional information about `ITypeInfo::GetTypeAttr`, see the MSDN Library. - + . + + For additional information about `ITypeInfo::GetTypeAttr`, see the MSDN Library. + ]]> @@ -542,11 +542,11 @@ On successful return, a reference to the of the containing type library. Retrieves the interface for the type description, which enables a client compiler to bind to the type description's members. - @@ -577,13 +577,13 @@ On successful return, a reference to the that describes the specified variable. Retrieves a structure that describes the specified variable. - . - - For additional information about `ITypeInfo::GetVarDesc`, see the MSDN Library. - + . + + For additional information about `ITypeInfo::GetVarDesc`, see the MSDN Library. + ]]> @@ -624,22 +624,22 @@ If returns , indicates the index within rgvarg of the argument with incorrect type. If more than one argument returns an error, indicates only the first argument with an error. Invokes a method, or accesses a property of an object, that implements the interface described by the type description. - . - - Valid values for `wFlags` are: - -|Value|Description| -|-----------|-----------------| -|DISPATCH_METHOD|The member is accessed as a method. If there is ambiguity, both this and the `DISPATCH_PROPERTYGET` flag can be set.| -|DISPATCH_PROPERTYGET|The member is retrieved as a property or data member.| -|DISPATCH_PROPERTYPUT|The member is changed as a property or data member.| -|DISPATCH_PROPERTYPUTREF|The member is changed by using a reference assignment, rather than a value assignment. This value is only valid when the property accepts a reference to an object.| - - For additional information about `ITypeInfo::Invoke`, see the MSDN Library. - + . + + Valid values for `wFlags` are: + +|Value|Description| +|-----------|-----------------| +|DISPATCH_METHOD|The member is accessed as a method. If there is ambiguity, both this and the `DISPATCH_PROPERTYGET` flag can be set.| +|DISPATCH_PROPERTYGET|The member is retrieved as a property or data member.| +|DISPATCH_PROPERTYPUT|The member is changed as a property or data member.| +|DISPATCH_PROPERTYPUTREF|The member is changed by using a reference assignment, rather than a value assignment. This value is only valid when the property accepts a reference to an object.| + + For additional information about `ITypeInfo::Invoke`, see the MSDN Library. + ]]> @@ -668,11 +668,11 @@ Reference to the to release. Releases a previously returned by . - @@ -701,11 +701,11 @@ Reference to the to release. Releases a previously returned by . - @@ -734,11 +734,11 @@ Reference to the to release. Releases a previously returned by . - diff --git a/xml/System.Runtime.InteropServices/UCOMITypeLib.xml b/xml/System.Runtime.InteropServices/UCOMITypeLib.xml index fc224ed07c3..6d30b237bcc 100644 --- a/xml/System.Runtime.InteropServices/UCOMITypeLib.xml +++ b/xml/System.Runtime.InteropServices/UCOMITypeLib.xml @@ -42,11 +42,11 @@ Use instead. - @@ -80,18 +80,18 @@ A hash value to speed up the search, computed by the function. If is 0, a value is computed. On successful return, an array of pointers to the type descriptions that contain the name specified in . An array of the 's of the found items; [i] is the that indexes into the type description specified by [i]. Cannot be . - On entry, indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. - + On entry, indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. + On exit, indicates the number of instances that were found. If the and values of are identical, there might be more type descriptions that contain the name. Finds occurrences of a type description in a type library. - @@ -139,11 +139,11 @@ Returns a string that contains the fully qualified name of the Help file. Retrieves the library's documentation string, the complete Help file name and path, and the context identifier for the library Help topic in the Help file. - @@ -183,13 +183,13 @@ On successful return, a structure that contains the library's attributes. Retrieves the structure that contains the library's attributes. - . - - For additional information about `ITypeLib::GetTypeLibAttr`, see the MSDN Library. - + . + + For additional information about `ITypeLib::GetTypeLibAttr`, see the MSDN Library. + ]]> @@ -218,11 +218,11 @@ On successful return, an instance of a instance for this . Enables a client compiler to bind to a library's types, variables, constants, and global functions. - @@ -253,11 +253,11 @@ On successful return, a describing the type referenced by . Retrieves the specified type description in the library. - @@ -295,11 +295,11 @@ Returns the number of type descriptions in the type library. The number of type descriptions in the type library. - @@ -330,11 +330,11 @@ On successful return, the requested interface. Retrieves the type description that corresponds to the specified GUID. - @@ -370,11 +370,11 @@ A reference to the enumeration for the type description. Retrieves the type of a type description. - @@ -405,11 +405,11 @@ Reference to the enumeration for the type description. Retrieves the type of a type description. - @@ -453,11 +453,11 @@ if was found in the type library; otherwise . - @@ -497,11 +497,11 @@ The to release. Releases the originally obtained from . - diff --git a/xml/System.Runtime.InteropServices/VariantWrapper.xml b/xml/System.Runtime.InteropServices/VariantWrapper.xml index 5f5bc0aaeba..c5eb6c1c95e 100644 --- a/xml/System.Runtime.InteropServices/VariantWrapper.xml +++ b/xml/System.Runtime.InteropServices/VariantWrapper.xml @@ -71,25 +71,25 @@ Marshals data of type from managed to unmanaged code. This class cannot be inherited. - is to add one level of indirection when marshaling a managed type to the corresponding `VARIANT` type. - - You can use this class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. In versions 1.0 and 1.1 of the .NET Framework, it was not possible to marshal variant data of type `VT_VARIANT | VT_BYREF` to unmanaged code. The interop marshaler passed a variant of the managed type (for example, `VT_BSTR | VT_BYREF` for , or `VT_I4 | VT_BYREF` for ), but not `VT_VARIANT | VT_BYREF`. - - One advantage of using `VT_VARIANT | VT_BYREF` variant types is that the type of data can be changed during a method call. For example, you can pass a `VT_VARIANT | VT_BYREF` variant type that contains a `VT_BSTR` and get a variant returned that contains a `VT_I4` after a method call. Because the COM interop marshaler has no way of knowing when to pass `VT_BSTR | VT_BYREF` and when to pass `VT_VARIANT | VT_BYREF`, which points to a variant that contains a `BSTR` for parameters declared as `VARIANT *`, you can instruct the marshaler by using . - - Note that early binding is not supported; you can use only when calling or with a Dispatch-only interface called in an early bound fashion. In C#, you must also use the `ref` keyword to specify `ByRef` semantics for any parameter of type . In Visual Basic, `ByRef` semantics are added automatically for every implicit late binding call. Also note that nesting objects and arrays of objects is not supported. - - - -## Examples - The following code example demonstrates how to use the class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. - + is to add one level of indirection when marshaling a managed type to the corresponding `VARIANT` type. + + You can use this class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. In versions 1.0 and 1.1 of the .NET Framework, it was not possible to marshal variant data of type `VT_VARIANT | VT_BYREF` to unmanaged code. The interop marshaler passed a variant of the managed type (for example, `VT_BSTR | VT_BYREF` for , or `VT_I4 | VT_BYREF` for ), but not `VT_VARIANT | VT_BYREF`. + + One advantage of using `VT_VARIANT | VT_BYREF` variant types is that the type of data can be changed during a method call. For example, you can pass a `VT_VARIANT | VT_BYREF` variant type that contains a `VT_BSTR` and get a variant returned that contains a `VT_I4` after a method call. Because the COM interop marshaler has no way of knowing when to pass `VT_BSTR | VT_BYREF` and when to pass `VT_VARIANT | VT_BYREF`, which points to a variant that contains a `BSTR` for parameters declared as `VARIANT *`, you can instruct the marshaler by using . + + Note that early binding is not supported; you can use only when calling or with a Dispatch-only interface called in an early bound fashion. In C#, you must also use the `ref` keyword to specify `ByRef` semantics for any parameter of type . In Visual Basic, `ByRef` semantics are added automatically for every implicit late binding call. Also note that nesting objects and arrays of objects is not supported. + + + +## Examples + The following code example demonstrates how to use the class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/VariantWrapper/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/VariantWrapper/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/VariantWrapper/Overview/sample.vb" id="Snippet1"::: + ]]> @@ -140,14 +140,14 @@ The object to marshal. Initializes a new instance of the class for the specified parameter. - class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. - + class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/VariantWrapper/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/VariantWrapper/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/VariantWrapper/Overview/sample.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.InteropServices/_Assembly.xml b/xml/System.Runtime.InteropServices/_Assembly.xml index e6d95c9cdeb..a07e4cf140e 100644 --- a/xml/System.Runtime.InteropServices/_Assembly.xml +++ b/xml/System.Runtime.InteropServices/_Assembly.xml @@ -101,7 +101,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods locate a type from this assembly and create an instance of it using the system activator. + The methods locate a type from this assembly and create an instance of it using the system activator. ]]> @@ -138,7 +138,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method locates the specified type from this assembly and creates an instance of it using the system activator, using case-sensitive search. + The method locates the specified type from this assembly and creates an instance of it using the system activator, using case-sensitive search. ]]> @@ -178,7 +178,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search. + The method locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search. ]]> @@ -228,7 +228,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search and having the specified culture, arguments, and binding and activation attributes. + The method locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search and having the specified culture, arguments, and binding and activation attributes. An example of an activation attribute for the `activationAttributes` parameter is: `URLAttribute(http://hostname/appname/objectURI)`. @@ -301,7 +301,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -421,7 +421,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get the custom attributes for this assembly. + The methods get the custom attributes for this assembly. ]]> @@ -458,7 +458,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the custom attributes for this assembly. + The method gets all the custom attributes for this assembly. ]]> @@ -497,7 +497,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the custom attributes for this assembly. + The method gets all the custom attributes for this assembly. ]]> @@ -568,7 +568,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a for the specified file in the file table of the manifest of this assembly. + The method gets a for the specified file in the file table of the manifest of this assembly. ]]> @@ -589,7 +589,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get the files in the file table of an assembly manifest. + The methods get the files in the file table of an assembly manifest. ]]> @@ -623,7 +623,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the files in the file table of an assembly manifest. + The method gets the files in the file table of an assembly manifest. ]]> @@ -661,7 +661,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the files in the file table of an assembly manifest, specifying whether to include resource modules. + The method gets the files in the file table of an assembly manifest, specifying whether to include resource modules. ]]> @@ -695,7 +695,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. ]]> @@ -716,7 +716,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get all the loaded modules that are part of this assembly. + The methods get all the loaded modules that are part of this assembly. ]]> @@ -750,7 +750,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the loaded modules that are part of this assembly. + The method gets all the loaded modules that are part of this assembly. ]]> @@ -788,7 +788,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the loaded modules that are part of this assembly, specifying whether to include resource modules. + The method gets all the loaded modules that are part of this assembly, specifying whether to include resource modules. ]]> @@ -825,7 +825,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns information about how the given resource has been persisted. + The method returns information about how the given resource has been persisted. ]]> @@ -859,7 +859,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the names of all the resources in this assembly. + The method returns the names of all the resources in this assembly. ]]> @@ -880,7 +880,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods load the specified manifest resource from this assembly. + The methods load the specified manifest resource from this assembly. ]]> @@ -917,7 +917,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method loads the specified manifest resource from this assembly. + The method loads the specified manifest resource from this assembly. ]]> @@ -956,7 +956,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method loads the specified manifest resource, scoped by the namespace of the specified type, from this assembly. + The method loads the specified manifest resource, scoped by the namespace of the specified type, from this assembly. ]]> @@ -993,7 +993,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the specified module in this assembly. + The method gets the specified module in this assembly. ]]> @@ -1014,7 +1014,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get all the modules that are part of this assembly. + The methods get all the modules that are part of this assembly. ]]> @@ -1048,7 +1048,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the modules that are part of this assembly. + The method gets all the modules that are part of this assembly. ]]> @@ -1086,7 +1086,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the modules that are part of this assembly, specifying whether to include resource modules. + The method gets all the modules that are part of this assembly, specifying whether to include resource modules. ]]> @@ -1107,7 +1107,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get an for this assembly. + The methods get an for this assembly. ]]> @@ -1141,7 +1141,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets an for this assembly. + The method gets an for this assembly. ]]> @@ -1179,7 +1179,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets an for this assembly, setting the codebase as specified by the `copiedName` parameter. + The method gets an for this assembly, setting the codebase as specified by the `copiedName` parameter. ]]> @@ -1223,7 +1223,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets serialization information with all of the data needed to reinstantiate this assembly. + The method gets serialization information with all of the data needed to reinstantiate this assembly. ]]> @@ -1257,7 +1257,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the objects for all the assemblies referenced by this assembly. + The method gets the objects for all the assemblies referenced by this assembly. ]]> @@ -1278,7 +1278,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get the satellite assembly. + The methods get the satellite assembly. ]]> @@ -1315,7 +1315,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the satellite assembly for the specified culture. + The method gets the satellite assembly for the specified culture. ]]> @@ -1354,7 +1354,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the specified version of the satellite assembly for the specified culture. + The method gets the specified version of the satellite assembly for the specified culture. ]]> @@ -1375,7 +1375,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get the object that represents the specified type. + The methods get the object that represents the specified type. ]]> @@ -1409,7 +1409,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -1446,7 +1446,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the object with the specified name in the assembly instance. + The method gets the object with the specified name in the assembly instance. ]]> @@ -1486,7 +1486,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the object with the specified name in the assembly instance and optionally throws an exception if the type is not found. + The method gets the object with the specified name in the assembly instance and optionally throws an exception if the type is not found. ]]> @@ -1529,7 +1529,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the object with the specified name in the assembly instance, with the options of ignoring the case, and of throwing an exception if the type is not found. + The method gets the object with the specified name in the assembly instance, with the options of ignoring the case, and of throwing an exception if the type is not found. ]]> @@ -1563,7 +1563,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the types defined in this assembly. + The method gets the types defined in this assembly. ]]> @@ -1637,7 +1637,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method indicates whether a custom attribute identified by the specified is defined. + The method indicates whether a custom attribute identified by the specified is defined. ]]> @@ -1658,7 +1658,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The members load the module internal to this assembly. + The members load the module internal to this assembly. ]]> @@ -1697,7 +1697,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. + The method loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. ]]> @@ -1738,7 +1738,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. The raw bytes representing the symbols for the module are also loaded. + The method loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. The raw bytes representing the symbols for the module are also loaded. ]]> @@ -1847,7 +1847,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the full name of the assembly, also known as the display name. + The method returns the full name of the assembly, also known as the display name. ]]> diff --git a/xml/System.Runtime.InteropServices/_ConstructorInfo.xml b/xml/System.Runtime.InteropServices/_ConstructorInfo.xml index aeb216af496..5b89ad3a7eb 100644 --- a/xml/System.Runtime.InteropServices/_ConstructorInfo.xml +++ b/xml/System.Runtime.InteropServices/_ConstructorInfo.xml @@ -178,7 +178,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -196,7 +196,7 @@ members return all attributes applied to this member. + The members return all attributes applied to this member. ]]> @@ -232,7 +232,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -270,7 +270,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -303,7 +303,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. ]]> @@ -377,7 +377,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The member returns the flags. + The member returns the flags. ]]> @@ -410,7 +410,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the parameters of the specified method or constructor. + The method gets the parameters of the specified method or constructor. ]]> @@ -443,7 +443,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -604,7 +604,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the constructor reflected by this with the specified arguments, under the constraints of the specified . + The method invokes the constructor reflected by this with the specified arguments, under the constraints of the specified . ]]> @@ -644,7 +644,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the method or constructor represented by this object, using the specified parameters. + The method invokes the method or constructor represented by this object, using the specified parameters. ]]> @@ -686,7 +686,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. + The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. ]]> @@ -722,7 +722,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the constructor reflected by the instance that has the specified parameters, providing default values for the parameters not commonly used. + The method invokes the constructor reflected by the instance that has the specified parameters, providing default values for the parameters not commonly used. ]]> @@ -860,7 +860,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The member indicates whether one or more instances of `attributeType` is applied to this member. + The member indicates whether one or more instances of `attributeType` is applied to this member. ]]> diff --git a/xml/System.Runtime.InteropServices/_EventInfo.xml b/xml/System.Runtime.InteropServices/_EventInfo.xml index 2c5cf5befed..d8cbde45af4 100644 --- a/xml/System.Runtime.InteropServices/_EventInfo.xml +++ b/xml/System.Runtime.InteropServices/_EventInfo.xml @@ -80,7 +80,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method adds an event handler to an event source. + The method adds an event handler to an event source. ]]> @@ -181,7 +181,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -233,7 +233,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return the method used to add an event-handler delegate to the event source. + The methods return the method used to add an event-handler delegate to the event source. ]]> @@ -266,7 +266,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method used to add an event-handler delegate to the event source. + The method returns the method used to add an event-handler delegate to the event source. ]]> @@ -303,7 +303,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method retrieves the object for the method of the event and specifies whether to return non-public methods + The method retrieves the object for the method of the event and specifies whether to return non-public methods ]]> @@ -323,7 +323,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return all attributes applied to this member. + The methods return all attributes applied to this member. ]]> @@ -360,7 +360,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method retrieves the object for the method of the event and specifies whether to return non-public methods + The method retrieves the object for the method of the event and specifies whether to return non-public methods ]]> @@ -399,7 +399,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -432,7 +432,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -493,7 +493,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return the method that is called when the event is raised. + The methods return the method that is called when the event is raised. ]]> @@ -526,7 +526,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method that is called when the event is raised. + The method returns the method that is called when the event is raised. ]]> @@ -563,7 +563,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method that is called when the event is raised and specifies whether to return non-public methods. + The method returns the method that is called when the event is raised and specifies whether to return non-public methods. ]]> @@ -583,7 +583,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method used to remove an event-handler delegate from the event source. + The method returns the method used to remove an event-handler delegate from the event source. ]]> @@ -616,7 +616,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method used to remove an event-handler delegate from the event source. + The method returns the method used to remove an event-handler delegate from the event source. ]]> @@ -653,7 +653,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method retrieves the object for removing a method of the event and specifies whether to return non-public methods. + The method retrieves the object for removing a method of the event and specifies whether to return non-public methods. ]]> @@ -686,7 +686,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -843,7 +843,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method indicates whether one or more instances of the `attributeType` parameter are applied to this member. + The method indicates whether one or more instances of the `attributeType` parameter are applied to this member. ]]> @@ -1042,7 +1042,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method removes an event handler from an event source. + The method removes an event handler from an event source. ]]> diff --git a/xml/System.Runtime.InteropServices/_Exception.xml b/xml/System.Runtime.InteropServices/_Exception.xml index a915efd39d3..6c928f9d482 100644 --- a/xml/System.Runtime.InteropServices/_Exception.xml +++ b/xml/System.Runtime.InteropServices/_Exception.xml @@ -75,7 +75,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -108,7 +108,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the that is the root cause of one or more subsequent exceptions. + The method returns the that is the root cause of one or more subsequent exceptions. ]]> @@ -141,7 +141,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -184,7 +184,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method sets the object with information about the exception. + The method sets the object with information about the exception. ]]> @@ -217,7 +217,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the runtime type of the current instance. + The method gets the runtime type of the current instance. ]]> @@ -442,7 +442,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method creates and returns a string representation of the current exception. + The method creates and returns a string representation of the current exception. ]]> diff --git a/xml/System.Runtime.InteropServices/_FieldInfo.xml b/xml/System.Runtime.InteropServices/_FieldInfo.xml index c603d403b96..352fab4c29b 100644 --- a/xml/System.Runtime.InteropServices/_FieldInfo.xml +++ b/xml/System.Runtime.InteropServices/_FieldInfo.xml @@ -144,7 +144,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -228,7 +228,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods return all attributes applied to this member. + The methods return all attributes applied to this member. ]]> @@ -264,7 +264,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -302,7 +302,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -335,7 +335,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. ]]> @@ -409,7 +409,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -515,7 +515,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the value of a field supported by a given object. + The method returns the value of a field supported by a given object. ]]> @@ -557,7 +557,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the value of a field supported by a given object. + The method returns the value of a field supported by a given object. ]]> @@ -676,7 +676,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method indicates whether one or more instance of `attributeType` is applied to this member. + The method indicates whether one or more instance of `attributeType` is applied to this member. ]]> @@ -1155,7 +1155,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods set the value of the field for the given object to the given value. + The methods set the value of the field for the given object to the given value. ]]> @@ -1192,7 +1192,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method sets the value of the field supported by the given object. + The method sets the value of the field supported by the given object. ]]> @@ -1235,7 +1235,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method sets the value of the field supported by the given object. + The method sets the value of the field supported by the given object. ]]> @@ -1278,7 +1278,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method sets the value of the field supported by the given object. + The method sets the value of the field supported by the given object. ]]> diff --git a/xml/System.Runtime.InteropServices/_MemberInfo.xml b/xml/System.Runtime.InteropServices/_MemberInfo.xml index 4f1d91c0a0d..68250047052 100644 --- a/xml/System.Runtime.InteropServices/_MemberInfo.xml +++ b/xml/System.Runtime.InteropServices/_MemberInfo.xml @@ -116,7 +116,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -136,7 +136,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns all attributes applied to this member. + The method returns all attributes applied to this member. ]]> @@ -173,7 +173,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -212,7 +212,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -245,7 +245,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -319,7 +319,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -476,7 +476,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method indicates whether one or more instances of the `attributeType` parameter are applied to this member. + The method indicates whether one or more instances of the `attributeType` parameter are applied to this member. ]]> diff --git a/xml/System.Runtime.InteropServices/_MethodBase.xml b/xml/System.Runtime.InteropServices/_MethodBase.xml index 7f1e320b230..6421dbdd86b 100644 --- a/xml/System.Runtime.InteropServices/_MethodBase.xml +++ b/xml/System.Runtime.InteropServices/_MethodBase.xml @@ -176,7 +176,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -196,7 +196,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The members return all attributes applied to this member. + The members return all attributes applied to this member. ]]> @@ -233,7 +233,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -272,7 +272,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -305,7 +305,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -379,7 +379,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The member returns the flags. + The member returns the flags. ]]> @@ -412,7 +412,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the parameters of the specified method or constructor. + The method gets the parameters of the specified method or constructor. ]]> @@ -445,7 +445,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -535,7 +535,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods invoke the constructor reflected by the instance that has the specified parameters. + The methods invoke the constructor reflected by the instance that has the specified parameters. ]]> @@ -575,7 +575,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method invokes the method or constructor represented by this object, using the specified parameters. + The method invokes the method or constructor represented by this object, using the specified parameters. ]]> @@ -619,7 +619,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. + The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. ]]> @@ -805,7 +805,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The member indicates whether one or more instances of the `attributeType` parameter are applied to this member. + The member indicates whether one or more instances of the `attributeType` parameter are applied to this member. ]]> diff --git a/xml/System.Runtime.InteropServices/_MethodInfo.xml b/xml/System.Runtime.InteropServices/_MethodInfo.xml index d520ad75b59..b0b5c3bc28b 100644 --- a/xml/System.Runtime.InteropServices/_MethodInfo.xml +++ b/xml/System.Runtime.InteropServices/_MethodInfo.xml @@ -176,7 +176,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -209,7 +209,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the object for the method on the direct or indirect base class in which the method represented by this instance was first declared. + The method returns the object for the method on the direct or indirect base class in which the method represented by this instance was first declared. ]]> @@ -229,7 +229,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The members return all attributes applied to this member. + The members return all attributes applied to this member. ]]> @@ -266,7 +266,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -305,7 +305,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -338,7 +338,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -412,7 +412,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The member returns the flags. + The member returns the flags. ]]> @@ -445,7 +445,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the parameters of the specified method or constructor. + The method gets the parameters of the specified method or constructor. ]]> @@ -478,7 +478,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -568,7 +568,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods invoke the constructor reflected by the instance that has the specified parameters. + The methods invoke the constructor reflected by the instance that has the specified parameters. ]]> @@ -606,7 +606,7 @@ method invokes the method or constructor represented by this object, using the specified parameters. + The method invokes the method or constructor represented by this object, using the specified parameters. ]]> @@ -650,7 +650,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. + The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. ]]> @@ -836,7 +836,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The member indicates whether one or more instances of the `attributeType` parameter are applied to this member. + The member indicates whether one or more instances of the `attributeType` parameter are applied to this member. ]]> diff --git a/xml/System.Runtime.InteropServices/_PropertyInfo.xml b/xml/System.Runtime.InteropServices/_PropertyInfo.xml index a4e30f7bbc4..285d942cdd4 100644 --- a/xml/System.Runtime.InteropServices/_PropertyInfo.xml +++ b/xml/System.Runtime.InteropServices/_PropertyInfo.xml @@ -210,7 +210,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -230,7 +230,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return an array of the `get` and `set` accessors on this property. + The methods return an array of the `get` and `set` accessors on this property. ]]> @@ -263,7 +263,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array whose elements reflect the public `get`, `set`, and other accessors of the property reflected by the current instance. + The method returns an array whose elements reflect the public `get`, `set`, and other accessors of the property reflected by the current instance. ]]> @@ -300,7 +300,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array whose elements reflect the public and, if specified, non-public `get`, `set`, and other accessors of the property reflected by the current instance. + The method returns an array whose elements reflect the public and, if specified, non-public `get`, `set`, and other accessors of the property reflected by the current instance. ]]> @@ -320,7 +320,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return all attributes applied to this member. + The methods return all attributes applied to this member. ]]> @@ -357,7 +357,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -396,7 +396,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -416,7 +416,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return a object representing the `get` accessor for this property. + The methods return a object representing the `get` accessor for this property. ]]> @@ -449,7 +449,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the public `get` accessor for this property. + The method returns the public `get` accessor for this property. ]]> @@ -486,7 +486,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the public or non-public `get` accessor for this property. + The method returns the public or non-public `get` accessor for this property. ]]> @@ -519,7 +519,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -593,7 +593,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of all the index parameters for the property + The method returns an array of all the index parameters for the property ]]> @@ -613,7 +613,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return a object representing the `set` accessor for this property. + The methods return a object representing the `set` accessor for this property. ]]> @@ -646,7 +646,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the public `set` accessor for this property. + The method returns the public `set` accessor for this property. ]]> @@ -693,7 +693,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the `set` accessor for this property. + The method returns the `set` accessor for this property. ]]> @@ -726,7 +726,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -816,7 +816,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return the value of the property. + The methods return the value of the property. ]]> @@ -854,7 +854,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns a literal value associated with the property by a compiler. + The method returns a literal value associated with the property by a compiler. ]]> @@ -898,7 +898,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the value of a property having the specified binding, index, and . + The method returns the value of a property having the specified binding, index, and . ]]> @@ -985,7 +985,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method indicates whether one or more instance of the `attributeType` parameter is applied to this member. + The method indicates whether one or more instance of the `attributeType` parameter is applied to this member. ]]> @@ -1166,7 +1166,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method sets the property value for the given object to the given value. + The method sets the property value for the given object to the given value. ]]> @@ -1205,7 +1205,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method sets the value of the property with optional index values for index properties. + The method sets the value of the property with optional index values for index properties. ]]> @@ -1250,7 +1250,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method sets the property value for the given object to the given value. + The method sets the property value for the given object to the given value. ]]> diff --git a/xml/System.Runtime.InteropServices/_Type.xml b/xml/System.Runtime.InteropServices/_Type.xml index 4224e70255d..6ac459fbe3d 100644 --- a/xml/System.Runtime.InteropServices/_Type.xml +++ b/xml/System.Runtime.InteropServices/_Type.xml @@ -223,7 +223,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines if the underlying system type of the current is the same as the underlying system type of the specified or . + The method determines if the underlying system type of the current is the same as the underlying system type of the specified or . . @@ -262,7 +262,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines if the underlying system type of the current is the same as the underlying system type of the specified . + The method determines if the underlying system type of the current is the same as the underlying system type of the specified . ]]> @@ -299,7 +299,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines if the underlying system type of the current is the same as the underlying system type of the specified . + The method determines if the underlying system type of the current is the same as the underlying system type of the specified . ]]> @@ -341,7 +341,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array of objects representing a filtered list of interfaces implemented or inherited by the current . + The method returns an array of objects representing a filtered list of interfaces implemented or inherited by the current . ]]> @@ -393,7 +393,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns a filtered array of objects of the specified member type. + The method returns a filtered array of objects of the specified member type. ]]> @@ -458,7 +458,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the number of dimensions in an . + The method gets the number of dimensions in an . ]]> @@ -478,7 +478,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific constructor of the current . + The method gets a specific constructor of the current . ]]> @@ -518,7 +518,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for a public instance constructor whose parameters match the types in the specified array. + The method searches for a public instance constructor whose parameters match the types in the specified array. ]]> @@ -576,7 +576,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints. + The method searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints. ]]> @@ -632,7 +632,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention. + The method searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention. ]]> @@ -652,7 +652,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the constructors of the current . + The method gets the constructors of the current . ]]> @@ -685,7 +685,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public constructors defined for the current . + The method returns all the public constructors defined for the current . ]]> @@ -725,7 +725,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the constructors defined for the current , using the specified . + The method searches for the constructors defined for the current , using the specified . ]]> @@ -745,7 +745,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all attributes applied to this member. + The method returns all attributes applied to this member. ]]> @@ -781,7 +781,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all attributes applied to this member. + The method returns all attributes applied to this member. ]]> @@ -819,7 +819,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all attributes applied to this member. + The method returns all attributes applied to this member. ]]> @@ -856,7 +856,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the members defined for the current whose is set. + The method searches for the members defined for the current whose is set. ]]> @@ -893,7 +893,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the of the object encompassed or referred to by the current array, pointer or reference type. + The method returns the of the object encompassed or referred to by the current array, pointer or reference type. ]]> @@ -913,7 +913,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific event declared or inherited by the current . + The method gets a specific event declared or inherited by the current . ]]> @@ -957,7 +957,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for events that are declared or inherited by the current , using the specified binding constraints. + The method searches for events that are declared or inherited by the current , using the specified binding constraints. ]]> @@ -999,7 +999,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the object representing the specified event, using the specified binding constraints. + The method returns the object representing the specified event, using the specified binding constraints. ]]> @@ -1019,7 +1019,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the events that are declared or inherited by the current . + The method gets the events that are declared or inherited by the current . ]]> @@ -1056,7 +1056,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public events that are declared or inherited by the current . + The method returns all the public events that are declared or inherited by the current . ]]> @@ -1100,7 +1100,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for events that are declared or inherited by the current , using the specified binding constraints. + The method searches for events that are declared or inherited by the current , using the specified binding constraints. ]]> @@ -1120,7 +1120,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific field of the current . + The method gets a specific field of the current . ]]> @@ -1156,7 +1156,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public field with the specified name. + The method searches for the public field with the specified name. ]]> @@ -1198,7 +1198,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified field, using the specified binding constraints. + The method searches for the specified field, using the specified binding constraints. ]]> @@ -1218,7 +1218,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific field of the current . + The method gets a specific field of the current . ]]> @@ -1255,7 +1255,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public fields of the current . + The method returns all the public fields of the current . ]]> @@ -1299,7 +1299,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the fields defined for the current , using the specified binding constraints. + The method searches for the fields defined for the current , using the specified binding constraints. ]]> @@ -1332,7 +1332,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method. + The method. ]]> @@ -1393,7 +1393,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific interface implemented or inherited by the current . + The method gets a specific interface implemented or inherited by the current . ]]> @@ -1429,7 +1429,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the interface with the specified name. + The method searches for the interface with the specified name. ]]> @@ -1472,7 +1472,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified interface, specifying whether to do a case-sensitive search. + The method searches for the specified interface, specifying whether to do a case-sensitive search. ]]> @@ -1508,7 +1508,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an interface mapping for the specified interface type. + The method returns an interface mapping for the specified interface type. ]]> @@ -1545,7 +1545,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the interfaces implemented or inherited by the current . + The method gets all the interfaces implemented or inherited by the current . ]]> @@ -1565,7 +1565,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the specified members of the current . + The method gets the specified members of the current . ]]> @@ -1601,7 +1601,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public members with the specified name. + The method searches for the public members with the specified name. ]]> @@ -1643,7 +1643,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified members, using the specified binding constraints. + The method searches for the specified members, using the specified binding constraints. ]]> @@ -1687,7 +1687,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified members of the specified member type, using the specified binding constraints. + The method searches for the specified members of the specified member type, using the specified binding constraints. ]]> @@ -1707,7 +1707,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the members (properties, methods, fields, events, and so on) of the current . + The method gets the members (properties, methods, fields, events, and so on) of the current . ]]> @@ -1744,7 +1744,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public members of the current . + The method returns all the public members of the current . ]]> @@ -1788,7 +1788,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the members defined for the current , using the specified binding constraints. + The method searches for the members defined for the current , using the specified binding constraints. ]]> @@ -1808,7 +1808,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method. + The method. ]]> @@ -1844,7 +1844,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public method with the specified name. + The method searches for the public method with the specified name. ]]> @@ -1886,7 +1886,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified method, using the specified binding constraints. + The method searches for the specified method, using the specified binding constraints. ]]> @@ -1928,7 +1928,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public method whose parameters match the specified argument types. + The method searches for the specified public method whose parameters match the specified argument types. ]]> @@ -1972,7 +1972,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public method whose parameters match the specified argument types and modifiers. + The method searches for the specified public method whose parameters match the specified argument types and modifiers. ]]> @@ -2028,7 +2028,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints. + The method searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints. ]]> @@ -2086,7 +2086,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention. + The method searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention. ]]> @@ -2106,7 +2106,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the methods of the current . + The method gets the methods of the current . ]]> @@ -2143,7 +2143,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public methods of the current . + The method returns all the public methods of the current . ]]> @@ -2187,7 +2187,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the methods defined for the current , using the specified binding constraints. + The method searches for the methods defined for the current , using the specified binding constraints. ]]> @@ -2207,7 +2207,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific type nested within the current . + The method gets a specific type nested within the current . ]]> @@ -2243,7 +2243,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public nested type with the specified name. + The method searches for the public nested type with the specified name. ]]> @@ -2285,7 +2285,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified nested type, using the specified binding constraints. + The method searches for the specified nested type, using the specified binding constraints. ]]> @@ -2305,7 +2305,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the types nested within the current . + The method gets the types nested within the current . ]]> @@ -2342,7 +2342,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the types nested within the current . + The method returns all the types nested within the current . ]]> @@ -2404,7 +2404,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the properties of the current . + The method gets the properties of the current . ]]> @@ -2441,7 +2441,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public properties of the current . + The method returns all the public properties of the current . ]]> @@ -2485,7 +2485,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the properties of the current , using the specified binding constraints. + The method searches for the properties of the current , using the specified binding constraints. ]]> @@ -2505,7 +2505,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific property of the current . + The method gets a specific property of the current . ]]> @@ -2541,7 +2541,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public property with the specified name. + The method searches for the public property with the specified name. ]]> @@ -2583,7 +2583,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified property, using the specified binding constraints. + The method searches for the specified property, using the specified binding constraints. ]]> @@ -2621,7 +2621,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public property with the specified name and return type. + The method searches for the public property with the specified name and return type. ]]> @@ -2663,7 +2663,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public property whose parameters match the specified argument types. + The method searches for the specified public property whose parameters match the specified argument types. ]]> @@ -2707,7 +2707,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public property whose parameters match the specified argument types. + The method searches for the specified public property whose parameters match the specified argument types. ]]> @@ -2753,7 +2753,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public property whose parameters match the specified argument types and modifiers. + The method searches for the specified public property whose parameters match the specified argument types and modifiers. ]]> @@ -2811,7 +2811,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints. + The method searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints. ]]> @@ -2844,7 +2844,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the current . + The method gets the current . ]]> @@ -3046,7 +3046,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes a specific member of the current . + The method invokes a specific member of the current . . @@ -3104,7 +3104,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the specified member, using the specified binding constraints and matching the specified argument list. + The method invokes the specified member, using the specified binding constraints and matching the specified argument list. ]]> @@ -3166,7 +3166,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the specified member, using the specified binding constraints and matching the specified argument list and culture. + The method invokes the specified member, using the specified binding constraints and matching the specified argument list and culture. ]]> @@ -3232,7 +3232,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the specified member, using the specified binding constraints and matching the specified argument list, modifiers, and culture. + The method invokes the specified member, using the specified binding constraints and matching the specified argument list, modifiers, and culture. ]]> @@ -3603,7 +3603,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method indicates whether one or more instance of `attributeType` is applied to this member. + The method indicates whether one or more instance of `attributeType` is applied to this member. ]]> @@ -3739,7 +3739,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the specified object is an instance of the current . + The method determines whether the specified object is an instance of the current . ]]> @@ -4304,7 +4304,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the class represented by the current derives from the class represented by the specified . + The method determines whether the class represented by the current derives from the class represented by the specified . ]]> @@ -4563,7 +4563,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the name of the current . + The method returns the name of the current . ]]> diff --git a/xml/System.Runtime.Loader/AssemblyLoadContext+ContextualReflectionScope.xml b/xml/System.Runtime.Loader/AssemblyLoadContext+ContextualReflectionScope.xml index be3a7404a8b..d111d69163f 100644 --- a/xml/System.Runtime.Loader/AssemblyLoadContext+ContextualReflectionScope.xml +++ b/xml/System.Runtime.Loader/AssemblyLoadContext+ContextualReflectionScope.xml @@ -38,7 +38,7 @@ ### Remarks -This is an implementation detail of the APIs. It is a struct, to avoid heap allocation. It is required to be public to avoid boxing. +This is an implementation detail of the APIs. It is a struct, to avoid heap allocation. It is required to be public to avoid boxing. ]]> diff --git a/xml/System.Runtime.Loader/AssemblyLoadContext.xml b/xml/System.Runtime.Loader/AssemblyLoadContext.xml index 1f32a6dec7c..9223dd5f032 100644 --- a/xml/System.Runtime.Loader/AssemblyLoadContext.xml +++ b/xml/System.Runtime.Loader/AssemblyLoadContext.xml @@ -637,7 +637,7 @@ Implementations of this method can return an assembly loaded into any loads an assembly by resolving the . This triggers a full resolution. The resolution fallback sequence follows this process: + loads an assembly by resolving the . This triggers a full resolution. The resolution fallback sequence follows this process: 1. The method calls . @@ -1158,7 +1158,7 @@ The OS handle returned by this method can be used with methods of the ). +This event is raised if the native library cannot be resolved by the default resolution logic (including ). ]]> diff --git a/xml/System.Runtime.Remoting.Activation/ActivatorLevel.xml b/xml/System.Runtime.Remoting.Activation/ActivatorLevel.xml index 1f9d09574e4..94e2a708894 100644 --- a/xml/System.Runtime.Remoting.Activation/ActivatorLevel.xml +++ b/xml/System.Runtime.Remoting.Activation/ActivatorLevel.xml @@ -28,11 +28,11 @@ Defines the appropriate position for a in the chain of activators. - . Because each activator is responsible for calling the next one in the chain, an activator can position itself anywhere in the chain. The enumerator helps activators find the appropriate position in the chain. - + . Because each activator is responsible for calling the next one in the chain, an activator can position itself anywhere in the chain. The enumerator helps activators find the appropriate position in the chain. + ]]> diff --git a/xml/System.Runtime.Remoting.Activation/IActivator.xml b/xml/System.Runtime.Remoting.Activation/IActivator.xml index 639aaa914cd..f4f19a81a22 100644 --- a/xml/System.Runtime.Remoting.Activation/IActivator.xml +++ b/xml/System.Runtime.Remoting.Activation/IActivator.xml @@ -98,7 +98,7 @@ is used to locate the right position in the chain when adding an activator. + The is used to locate the right position in the chain when adding an activator. ]]> diff --git a/xml/System.Runtime.Remoting.Activation/IConstructionCallMessage.xml b/xml/System.Runtime.Remoting.Activation/IConstructionCallMessage.xml index 50be5bb8840..47c90fc4043 100644 --- a/xml/System.Runtime.Remoting.Activation/IConstructionCallMessage.xml +++ b/xml/System.Runtime.Remoting.Activation/IConstructionCallMessage.xml @@ -35,7 +35,7 @@ and before the thread returns to the user code, a is sent to the remote application. When the construction message arrives at the remote application, it is processed by a remoting activator (either the default one, or one that is specified in the property) and a new object is created. The remoting application then returns a to the local application. The contains an instance of , which packages information about the remote object. The remoting infrastructure converts the instance into a proxy to the remote object, which is returned to the user code. + When the user creates an instance of a new client-activated object by calling `new` or and before the thread returns to the user code, a is sent to the remote application. When the construction message arrives at the remote application, it is processed by a remoting activator (either the default one, or one that is specified in the property) and a new object is created. The remoting application then returns a to the local application. The contains an instance of , which packages information about the remote object. The remoting infrastructure converts the instance into a proxy to the remote object, which is returned to the user code. ]]> @@ -174,7 +174,7 @@ indexer allows you to specify additional attributes to use during object activation. The user specifies the in the `activationAttributes` parameter to . + The indexer allows you to specify additional attributes to use during object activation. The user specifies the in the `activationAttributes` parameter to . ]]> @@ -211,7 +211,7 @@ contains the list of properties that were contributed by various attributes in the construction call message. These properties are used to create the context in which the server object is activated. + A new object's context is generally chosen based on metadata attributes of the class. The context selection mechanism is extensible through custom attributes, also known as static context properties, which are compiled into the class metadata. When activating an object remotely, the contains the list of properties that were contributed by various attributes in the construction call message. These properties are used to create the context in which the server object is activated. ]]> diff --git a/xml/System.Runtime.Remoting.Activation/UrlAttribute.xml b/xml/System.Runtime.Remoting.Activation/UrlAttribute.xml index 58c7ef44ca4..83da50cc20d 100644 --- a/xml/System.Runtime.Remoting.Activation/UrlAttribute.xml +++ b/xml/System.Runtime.Remoting.Activation/UrlAttribute.xml @@ -36,7 +36,7 @@ is passed in the activation attributes array as a parameter to when creating activated objects with the method. + The is passed in the activation attributes array as a parameter to when creating activated objects with the method. For more information about using attributes, see [Attributes](/dotnet/standard/attributes/). @@ -142,7 +142,7 @@ method. + This method overrides the default method. ]]> @@ -217,7 +217,7 @@ does not contribute any properties to the new context because it is used by the remoting infrastructure to force the creation of the context and the server object inside the context at the specified URL. + does not contribute any properties to the new context because it is used by the remoting infrastructure to force the creation of the context and the server object inside the context at the specified URL. ]]> diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpChannel.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpChannel.xml index 5db54a52839..7338ebd338f 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpChannel.xml @@ -50,7 +50,7 @@ Channels are used by the .NET Framework remoting infrastructure to transport remote calls. When a client makes a call to a remote object, the call is serialized into a message that is sent by a client channel and received by a server channel. It is then deserialized and processed. Any returned values are transmitted by the server channel and received by the client channel. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). @@ -253,7 +253,7 @@ is called and a is created. + The current property is used when is called and a is created. ]]> @@ -288,7 +288,7 @@ . + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . ]]> @@ -432,12 +432,12 @@ method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpClientChannel/CPP/client.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpChannel/Overview/client.cs" id="Snippet11"::: @@ -477,7 +477,7 @@ . + This method is used by . ]]> @@ -511,7 +511,7 @@ . + This property need not be set explicitly, as it is sufficient to set the ensureSecurity parameter of . ]]> @@ -626,7 +626,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpClientChannel/CPP/client.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpChannel/Overview/client.cs" id="Snippet13"::: diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpClientChannel.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpClientChannel.xml index fa46d30c473..f1497274ed8 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpClientChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpClientChannel.xml @@ -47,7 +47,7 @@ By default, the uses a SOAP formatter to serialize all messages. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). @@ -225,7 +225,7 @@ . + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . ]]> @@ -299,7 +299,7 @@ method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. @@ -448,7 +448,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpClientChannel/CPP/client.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpChannel/Overview/client.cs" id="Snippet13"::: diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandler.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandler.xml index c231f8d93c4..350ac2cc04f 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandler.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandler.xml @@ -22,11 +22,11 @@ Implements an ASP.NET handler that forwards requests to the remoting HTTP channel. - classes, rather than conventional ASP or ASP.NET Web pages, responds to these specific requests. HTTP handlers provide a way of interacting with the low-level request and response services of the IIS Web server, and provide functionality similar to ISAPI extensions but with a simpler programming model. - + classes, rather than conventional ASP or ASP.NET Web pages, responds to these specific requests. HTTP handlers provide a way of interacting with the low-level request and response services of the IIS Web server, and provide functionality similar to ISAPI extensions but with a simpler programming model. + ]]> @@ -82,11 +82,11 @@ The constructor ignores the parameter. Initializes a new instance of the class with default values. - constructor instead. - + constructor instead. + ]]> @@ -145,11 +145,11 @@ A that provides references to the intrinsic server objects (for example, , , , and ) used to service HTTP requests. Enables processing of HTTP Web requests by the current instance. - methods, see . - + methods, see . + ]]> diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.xml index f0c7e9810cf..b8995bd55cb 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.xml @@ -22,11 +22,11 @@ Initializes new instances of the class. - class. - + class. + ]]> @@ -84,11 +84,11 @@ Returns an instance of the class. A new that processes the request. - . - + . + ]]> diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpServerChannel.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpServerChannel.xml index d1f760d065a..41f02e4419f 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpServerChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpServerChannel.xml @@ -39,7 +39,7 @@ The accepts messages serialized in either binary or SOAP format. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for . + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for . @@ -351,7 +351,7 @@ . + Every registered channel has a unique name. This name is used to retrieve a specific channel when calling . ]]> @@ -492,7 +492,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpServerChannel/CPP/server.cpp" id="Snippet22"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpServerChannel/Overview/server.cs" id="Snippet22"::: @@ -532,12 +532,12 @@ . + The current method is used by . ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpChannel.GetUrlsFromUri/CPP/class1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpServerChannel/GetUrlsForUri/class1.cs" id="Snippet1"::: @@ -638,7 +638,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpServerChannel/CPP/server.cpp" id="Snippet25"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpServerChannel/Overview/server.cs" id="Snippet25"::: @@ -679,7 +679,7 @@ ## Remarks It is not necessary to call this method to begin listening on a newly initialized channel. - Use this method to restart listening on a channel after the method has been called to stop listening on the channel. + Use this method to restart listening on a channel after the method has been called to stop listening on the channel. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. @@ -717,7 +717,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. diff --git a/xml/System.Runtime.Remoting.Channels.Ipc/IpcChannel.xml b/xml/System.Runtime.Remoting.Channels.Ipc/IpcChannel.xml index cf90e1a408f..6b1f3088983 100644 --- a/xml/System.Runtime.Remoting.Channels.Ipc/IpcChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Ipc/IpcChannel.xml @@ -283,7 +283,7 @@ . The default name is "ipc". + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . The default name is "ipc". @@ -371,14 +371,14 @@ method returns a channel message sink that delivers messages to either the specified URL or channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. Channel sinks provide a plug-in point that allows access to the underlying messages flowing through the channel as well as the stream used by the transport mechanism to send messages to a remote object. Channel sinks are linked together in a chain of `ChannelSinkProviders` and all channel messages flow through this chain of sinks before the message is finally serialized and transported. ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcChannel/CPP/client.cpp" id="Snippet22"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcChannel/Overview/client.cs" id="Snippet22"::: @@ -417,12 +417,12 @@ . + This method is used by . ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcChannel/CPP/server.cpp" id="Snippet19"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcChannel/Overview/server.cs" id="Snippet19"::: @@ -457,7 +457,7 @@ . + This property need not be set explicitly, as it is sufficient to set the ensureSecurity parameter of . ]]> @@ -500,7 +500,7 @@ ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcChannel/CPP/server.cpp" id="Snippet19"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcChannel/Overview/server.cs" id="Snippet19"::: @@ -540,7 +540,7 @@ ## Remarks It is not necessary to call this method to begin listening on a newly initialized channel. - Use this method to restart listening on a channel after the method has been called. + Use this method to restart listening on a channel after the method has been called. The `data` parameter can be used to pass a specific initialization state to the channel. If you do not want to pass a specific state to the channel, set `data` to `null`. @@ -577,7 +577,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. The `data` parameter can be used to pass a specific initialization state to the channel. If you do not want to pass a specific state to the channel, set `data` to `null`. diff --git a/xml/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.xml b/xml/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.xml index 4668a64f6d5..d16fda943b4 100644 --- a/xml/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.xml @@ -41,7 +41,7 @@ By default, the class uses a binary formatter to serialize all messages. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for the constructor. + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for the constructor. @@ -218,7 +218,7 @@ method. The default name is "ipc client". + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling the method. The default name is "ipc client". @@ -306,12 +306,12 @@ method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. ## Examples - The following code example shows how to use the method. + The following code example shows how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcClientChannel/CPP/client.cpp" id="Snippet22"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel/.ctor/client.cs" id="Snippet22"::: @@ -378,7 +378,7 @@ method. + The following code example shows how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcClientChannel/CPP/client.cpp" id="Snippet24"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel/.ctor/client.cs" id="Snippet24"::: diff --git a/xml/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.xml b/xml/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.xml index 0b039642e9d..a529a35a61a 100644 --- a/xml/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.xml @@ -41,7 +41,7 @@ The instance accepts messages serialized in either binary or SOAP format. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing an collection to the constructor). For a list of these configuration properties, see the documentation for the constructor. + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing an collection to the constructor). For a list of these configuration properties, see the documentation for the constructor. > [!CAUTION] > When setting the `exclusiveAddressUse` property to `false` in the `properties` argument, several objects can be registered for the same named pipe. In such a case requests can go to any of the channels registered. This setting is considered secure only if ALCs are also used. @@ -338,7 +338,7 @@ method. The default name is "ipc server". + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling the method. The default name is "ipc server". @@ -421,7 +421,7 @@ ## Examples - The following code example illustrates how to use the method. + The following code example illustrates how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Ipc/CPP/server.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel/Overview/server.cs" id="Snippet12"::: @@ -460,12 +460,12 @@ method. + This method is used by the method. ## Examples - The following code example shows how to use the method. + The following code example shows how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcServerChannel/CPP/server.cpp" id="Snippet19"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel/.ctor/server.cs" id="Snippet19"::: @@ -536,7 +536,7 @@ ## Examples - The following code example shows how to use the method. + The following code example shows how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcServerChannel/CPP/server.cpp" id="Snippet19"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel/.ctor/server.cs" id="Snippet19"::: @@ -576,7 +576,7 @@ ## Remarks It is not necessary to call this method to begin listening on a newly initialized channel. - Use this method to restart listening on a channel after the method has been called to stop listening on the channel. + Use this method to restart listening on a channel after the method has been called to stop listening on the channel. The data object can be used to pass a specific initialization state to the channel. If you do not want to pass a specific state to the channel, pass `null` as the `data` parameter value. @@ -614,7 +614,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. The data object can be used to pass a specific initialization state to the channel. If you do not want to pass a specific state to the channel, pass `null` as the `data` parameter value. diff --git a/xml/System.Runtime.Remoting.Channels.Tcp/TcpChannel.xml b/xml/System.Runtime.Remoting.Channels.Tcp/TcpChannel.xml index dd4f2bac117..f789fbcf391 100644 --- a/xml/System.Runtime.Remoting.Channels.Tcp/TcpChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Tcp/TcpChannel.xml @@ -49,7 +49,7 @@ To perform additional processing of messages, you can specify implementations of the and through which all messages processed by the are passed. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For more information about channel configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For more information about channel configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). ## Examples The following code example shows how to use a to set up a remoting server and its client. The example contains three parts, a server, a client, and a remote object used by the server and the client. @@ -271,7 +271,7 @@ . To set the property, assign the value to the "name" indexed property in the dictionary passed to the constructor. + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . To set the property, assign the value to the "name" indexed property in the dictionary passed to the constructor. @@ -356,7 +356,7 @@ method returns a channel message sink that delivers messages to either the specified URL or channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. Channel sinks provide a plug-in point that allows access to the underlying messages flowing through the channel as well as the stream used by the transport mechanism to send messages to a remote object. Channel sinks are linked together in a chain of `ChannelSinkProviders` and all channel messages flow through this chain of sinks before the message is finally serialized and transported. @@ -403,7 +403,7 @@ . + This method is used by . @@ -444,7 +444,7 @@ . + This property need not be set explicitly, as it is sufficient to set the ensureSecurity parameter of . ]]> @@ -530,7 +530,7 @@ ## Remarks It is not necessary to call this method to begin listening on a newly initialized channel. - Use this method to restart listening on a channel after the method has been called. + Use this method to restart listening on a channel after the method has been called. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. @@ -570,7 +570,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. diff --git a/xml/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.xml b/xml/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.xml index 3f67874f952..a9dec678114 100644 --- a/xml/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.xml @@ -47,7 +47,7 @@ By default, the class uses a binary formatter to serialize all messages. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for . + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for . @@ -222,7 +222,7 @@ . + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . @@ -312,7 +312,7 @@ method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. diff --git a/xml/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.xml b/xml/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.xml index a2a583d6fd8..a9d507959ea 100644 --- a/xml/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.xml @@ -47,7 +47,7 @@ The instance accepts messages serialized in either binary or SOAP format. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). ## Examples The following code example shows the use of a remotable type. @@ -347,7 +347,7 @@ . + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . @@ -467,12 +467,12 @@ . + This method is used by . ## Examples - The following code example shows the use of the method. + The following code example shows the use of the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/TcpServerChannel.GetUrlsForUri/CPP/class1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel/GetUrlsForUri/class1.cs" id="Snippet1"::: @@ -585,7 +585,7 @@ constructor automatically calls `StartListening`, so you shouldn't call this method unless was previously called. + The constructor automatically calls `StartListening`, so you shouldn't call this method unless was previously called. Calling `StartListening` on an already listening channel may lead to unexpected behaviors and should be avoided. @@ -627,7 +627,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. diff --git a/xml/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties.xml b/xml/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties.xml index ec476b0befa..d23b7b7e97d 100644 --- a/xml/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties.xml +++ b/xml/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties.xml @@ -39,24 +39,24 @@ Provides a base implementation of a channel object that exposes a dictionary interface to its properties. - is the base class for and . - - and can be used as the base classes for channels and channel sinks that provide named properties. - - handles the complex task of asking a channel object for its properties. - - This class makes a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). - - - -## Examples + is the base class for and . + + and can be used as the base classes for channels and channel sinks that provide named properties. + + handles the complex task of asking a channel object for its properties. + + This class makes a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CommonTransportKeys/CPP/commontransportkeys.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties/Overview/commontransportkeys.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties/Overview/commontransportkeys.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties/Overview/commontransportkeys.vb" id="Snippet1"::: + ]]> @@ -85,13 +85,13 @@ Initializes a new instance of the class. - @@ -131,11 +131,11 @@ The value to add. Throws a . - is being used in this case, and because returns `true`. - + is being used in this case, and because returns `true`. + ]]> The method is called. @@ -171,11 +171,11 @@ Throws a . - is being used in this case, and because returns `true`. - + is being used in this case, and because returns `true`. + ]]> The method is called. @@ -352,11 +352,11 @@ if the number of properties that can be entered into the channel object is fixed; otherwise, . - always returns `true`. - + always returns `true`. + ]]> @@ -392,11 +392,11 @@ if the collection of properties in the channel object is read-only; otherwise, . - always returns `false`. - + always returns `false`. + ]]> @@ -432,11 +432,11 @@ if the dictionary of channel object properties is synchronized; otherwise, . - always returns `false`. - + always returns `false`. + ]]> @@ -547,11 +547,11 @@ Gets a of the channel properties associated with the channel object. A of the channel properties associated with the channel object. - The immediate caller does not have infrastructure permission. @@ -590,11 +590,11 @@ The key of the object to be removed. Throws a . - is being used in this case, and because returns `true`. - + is being used in this case, and because returns `true`. + ]]> The method is called. @@ -630,11 +630,11 @@ Gets an object that is used to synchronize access to the . An object that is used to synchronize access to the . - returns a reference to the current instance of . - + returns a reference to the current instance of . + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSink.xml b/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSink.xml index 58b5d8afb35..3891a212b09 100644 --- a/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSink.xml +++ b/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSink.xml @@ -34,7 +34,7 @@ is forwarded to all sinks in the chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. This is easily achieved by implementing the interface, which gives the impression of having a reference to the formatter sink. The real formatter sink can then be placed later in the sink chain. + The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After the formatter sink, the is forwarded to all sinks in the chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. This is easily achieved by implementing the interface, which gives the impression of having a reference to the formatter sink. The real formatter sink can then be placed later in the sink chain. |Property|Description| |--------------|-----------------| @@ -211,7 +211,7 @@ method is called by the formatter sink before it serializes the message. + The method is called by the formatter sink before it serializes the message. ]]> diff --git a/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSinkProvider.xml index 7b90f454456..5d5b5cefd82 100644 --- a/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSinkProvider.xml @@ -30,7 +30,7 @@ ## Remarks A creates client formatter sinks that use the to serialize messages for the client channel through which remoting messages flow. - The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage, the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. You can do this by implementing both the and interfaces. The formatter sink can then be placed in the sink chain later. + The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage, the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. You can do this by implementing both the and interfaces. The formatter sink can then be placed in the sink chain later. Formatter sinks use sink configuration properties to configure the channel at run time. Sink properties can be specified in a configuration file, or programmatically, inside of a . In a configuration file all values are represented by strings, but when building a property programmatically, value types can be specified with their native values or with strings. @@ -138,7 +138,7 @@ method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. + When the method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. ]]> diff --git a/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSink.xml b/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSink.xml index a1f38299cfc..7dacf9e12ef 100644 --- a/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSink.xml +++ b/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSink.xml @@ -28,7 +28,7 @@ method, which is called by server channels to create the server channel sink chains. When the message reaches the dispatch sink, the dispatch sink passes the message to the remoting infrastructure. + The request stream propagates from the server transport sink through the server channel sinks until it reaches the appropriate formatter sink. The formatter sink deserializes the message and passes it through the pipeline. A special dispatch sink is inserted at the end of the channel sink chain by the method, which is called by server channels to create the server channel sink chains. When the message reaches the dispatch sink, the dispatch sink passes the message to the remoting infrastructure. The following table shows the sink configuration properties that can be specified for the current sink provider. @@ -228,9 +228,9 @@ interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together, which means that every message sink is responsible for calling on the next message sink after the current message sink has finished its work. For instance, a synchronization-related message sink might cause a lock to be acquired or released and delegated to the downstream message sink. + The proxy's job is to convert a method call that is invoked on it into a message. The message, which implements the interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together, which means that every message sink is responsible for calling on the next message sink after the current message sink has finished its work. For instance, a synchronization-related message sink might cause a lock to be acquired or released and delegated to the downstream message sink. - When the formatter channel sink gets a message that needs to be sent over the channel, it calls , passing the message as a parameter. The formatter sink then creates the transport header array and calls on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that will be passed back to the formatter sink. After this call returns, the message is serialized, is called on the first chain in the sink chain, and the message is passed to the channel sinks. + When the formatter channel sink gets a message that needs to be sent over the channel, it calls , passing the message as a parameter. The formatter sink then creates the transport header array and calls on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that will be passed back to the formatter sink. After this call returns, the message is serialized, is called on the first chain in the sink chain, and the message is passed to the channel sinks. After the channel sinks get the message, they can write data to the stream, add headers to the header array, and add themselves to the sink stack before forwarding the call to the next sink. When the call reaches the transport sink at the end of the chain, the transport sink sends the headers and serialized message over the channel to the server, where the process is reversed. diff --git a/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSinkProvider.xml index 9b3e525db32..d339da7f2c6 100644 --- a/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSinkProvider.xml @@ -30,9 +30,9 @@ ## Remarks Channel sinks are connected to a server channel through implementations of the interface. All the remoting server channels provide constructors that take a as a parameter. - Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. + Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. - When multiple channel sink providers are provided in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers will be created when the channel is created during the call. + When multiple channel sink providers are provided in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers will be created when the channel is created during the call. Formatter sinks use sink configuration properties to configure the channel at run time. Sink properties can be specified in a configuration file, or programmatically, inside of a . In a configuration file all values are represented by strings, but when building a property programmatically, value types can be specified with their native values or with strings. diff --git a/xml/System.Runtime.Remoting.Channels/ChannelServices.xml b/xml/System.Runtime.Remoting.Channels/ChannelServices.xml index 9c051beb36c..2e727cf5753 100644 --- a/xml/System.Runtime.Remoting.Channels/ChannelServices.xml +++ b/xml/System.Runtime.Remoting.Channels/ChannelServices.xml @@ -31,7 +31,7 @@ ## Remarks Channels transport messages between applications across such remoting boundaries as application domains, processes, and computers. These crossings can be inbound and outbound. A channel can listen on an endpoint for inbound messages, send to an endpoint for outbound messages, or both. This provides an extensibility point in the runtime to plug in a wide range of protocols, even though the runtime might not be at the other end of the channel. Run-time objects can be used to expose a wide range of semantics and entities. The channel provides the extensibility point to convert the messages to and from the specific protocols. - Channels must expose the interface, which provides informational properties such as the and . Channels are registered using the method. Channels can also be loaded from the remoting configuration. (See [\ Element (Template)](https://msdn.microsoft.com/library/73399d48-f0fd-46e9-828b-6cdafde5ffce) for details.) + Channels must expose the interface, which provides informational properties such as the and . Channels are registered using the method. Channels can also be loaded from the remoting configuration. (See [\ Element (Template)](https://msdn.microsoft.com/library/73399d48-f0fd-46e9-828b-6cdafde5ffce) for details.) On the client side, messages are handed off to the client channel sink chain after they traverse the client chain. The first channel sink is typically a , which serializes the message into a stream that is passed down the channel sink chain to the client transport sink. The client transport sink then writes this stream out to the wire. @@ -334,9 +334,9 @@ [!NOTE] -> is obsolete. Please use instead. +> is obsolete. Please use instead. - The method takes in the interface from a channel object. The channel's must be unique, or the channel must be anonymous. A channel is anonymous if the is set to either `null` or by using the `name` configuration property. + The method takes in the interface from a channel object. The channel's must be unique, or the channel must be anonymous. A channel is anonymous if the is set to either `null` or by using the `name` configuration property. You cannot register two channels with the same name in a . By default, the name of a is "http" and the name of a is "tcp." Therefore, if you want to register two channels of the same type, you must specify a different name for one of them through configuration properties. @@ -384,7 +384,7 @@ method receives the interface from a channel object. The channel's must be unique, or the channel must be anonymous. A channel is anonymous if the is set to either `null` or by using the `name` configuration property. + The method receives the interface from a channel object. The channel's must be unique, or the channel must be anonymous. A channel is anonymous if the is set to either `null` or by using the `name` configuration property. You cannot register two channels with the same name in a . By default, the name of a is "http" and the name of a is "tcp". Therefore, if you want to register two channels of the same type, you must specify a different name for one of them through configuration properties. diff --git a/xml/System.Runtime.Remoting.Channels/ClientChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/ClientChannelSinkStack.xml index 091705be802..ccba7b148ad 100644 --- a/xml/System.Runtime.Remoting.Channels/ClientChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/ClientChannelSinkStack.xml @@ -36,11 +36,11 @@ Holds the stack of client channel sinks that must be invoked during an asynchronous message response decoding. - @@ -132,11 +132,11 @@ The stream that is returning from the transport sink. Requests asynchronous processing of a method call on the sinks that are in the current sink stack. - method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see . - + method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see . + ]]> The current sink stack is empty. @@ -175,11 +175,11 @@ The exception to dispatch to the server. Dispatches the specified exception on the reply sink. - method dispatches the specified exception to the server through the reply sink that is specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the exception is not transmitted, and no new exception is thrown. - + method dispatches the specified exception to the server through the reply sink that is specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the exception is not transmitted, and no new exception is thrown. + ]]> @@ -217,11 +217,11 @@ The to dispatch. Dispatches the specified reply message on the reply sink. - method dispatches the specified message to the server through the reply sink that is specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the message is not transmitted, and no new exception is thrown. - + method dispatches the specified message to the server through the reply sink that is specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the message is not transmitted, and no new exception is thrown. + ]]> @@ -298,11 +298,11 @@ Information generated on the request side that is needed on the response side. Pushes the specified sink and information that is associated with it onto the sink stack. - method on the corresponding sink. - + method on the corresponding sink. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/IAuthorizeRemotingConnection.xml b/xml/System.Runtime.Remoting.Channels/IAuthorizeRemotingConnection.xml index 45633b5cd2a..c1332949bc9 100644 --- a/xml/System.Runtime.Remoting.Channels/IAuthorizeRemotingConnection.xml +++ b/xml/System.Runtime.Remoting.Channels/IAuthorizeRemotingConnection.xml @@ -14,11 +14,11 @@ The interface provides methods that indicate whether a client is authorized to connect on the current channel, based on the client's network address and user identity. - interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. - + interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. + ]]> @@ -48,11 +48,11 @@ if the network address of the client is authorized; otherwise, . - interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. - + interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. + ]]> @@ -82,11 +82,11 @@ if the user identity of the client is authorized; otherwise, . - interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. - + interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/IChannel.xml b/xml/System.Runtime.Remoting.Channels/IChannel.xml index 7c4346a5608..58b600ce70b 100644 --- a/xml/System.Runtime.Remoting.Channels/IChannel.xml +++ b/xml/System.Runtime.Remoting.Channels/IChannel.xml @@ -22,17 +22,17 @@ Provides conduits for messages that cross remoting boundaries. - s, s, processes, or computers. An application can cross these boundaries only by using channels. These crossings can be inbound and outbound. A channel can listen on an endpoint for inbound messages, send to an endpoint for outbound messages, or both. This provides an extensibility point in the runtime to plug in a wide range protocols, even though the runtime might not be at the other end of the channel. - - Run-time objects can be used to represent a wide and rich set of semantics and entities. The channel provides the extensibility point to convert the messages to and from the specific protocols. If there are runtimes at both ends of the channel, a virtual channel is created between the two ends, in order to connect the client and server sink chains on either side of the boundary. - - The client part of the channel is located at the end of a client context sink chain. The server part of the channel is located at the start of the server context sink chain. Messages are delivered to the client channel using the interface, travel through the channel, and are then received by the server channel. The server channel delivers the message to the first server context sink. - - Channels must expose the interface, which provides informational properties such as the and properties. Channels can be registered using the method. - + s, s, processes, or computers. An application can cross these boundaries only by using channels. These crossings can be inbound and outbound. A channel can listen on an endpoint for inbound messages, send to an endpoint for outbound messages, or both. This provides an extensibility point in the runtime to plug in a wide range protocols, even though the runtime might not be at the other end of the channel. + + Run-time objects can be used to represent a wide and rich set of semantics and entities. The channel provides the extensibility point to convert the messages to and from the specific protocols. If there are runtimes at both ends of the channel, a virtual channel is created between the two ends, in order to connect the client and server sink chains on either side of the boundary. + + The client part of the channel is located at the end of a client context sink chain. The server part of the channel is located at the start of the server context sink chain. Messages are delivered to the client channel using the interface, travel through the channel, and are then received by the server channel. The server channel delivers the message to the first server context sink. + + Channels must expose the interface, which provides informational properties such as the and properties. Channels can be registered using the method. + ]]> @@ -64,13 +64,13 @@ Gets the name of the channel. The name of the channel. - The immediate caller does not have infrastructure permission. @@ -103,22 +103,22 @@ Gets the priority of the channel. An integer that indicates the priority of the channel. - . - - For server channels, the priority indicates the order in which their channel data will appear in a , which in turn affects the order in which clients will try to connect to the server object. If the server is listening on an HTTP channel with priority 50 and a TCP channel with priority 25 and the client has registered both an HTTP and TCP channel, then the client will use the HTTP channel to talk to the server. - - - -## Examples + . + + For server channels, the priority indicates the order in which their channel data will appear in a , which in turn affects the order in which clients will try to connect to the server object. If the server is listening on an HTTP channel with priority 50 and a TCP channel with priority 25 and the client has registered both an HTTP and TCP channel, then the client will use the HTTP channel to talk to the server. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpServerChannel_Server_Client/CPP/httpclientchannel_6_client.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannel/ChannelName/httpclientchannel_6_client.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannel/ChannelName/httpclientchannel_6_client.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannel/ChannelName/httpclientchannel_6_client.vb" id="Snippet5"::: + ]]> The immediate caller does not have infrastructure permission. @@ -163,13 +163,13 @@ Returns the object URI as an out parameter, and the URI of the current channel as the return value. The URI of the current channel, or if the URI does not belong to this channel. - The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IChannelReceiver.xml b/xml/System.Runtime.Remoting.Channels/IChannelReceiver.xml index d3f86a04bb5..08076ec7865 100644 --- a/xml/System.Runtime.Remoting.Channels/IChannelReceiver.xml +++ b/xml/System.Runtime.Remoting.Channels/IChannelReceiver.xml @@ -26,18 +26,18 @@ Provides required functions and properties for the receiver channels. - interface. - - - -## Examples + interface. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IChannelReceiver_StartListening_ChannelData/CPP/ichannelreceiver_channeldata_server.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.vb" id="Snippet1"::: + ]]> @@ -69,11 +69,11 @@ Gets the channel-specific data. The channel data. - is called and a is created. - + is called and a is created. + ]]> The immediate caller does not have infrastructure permission. @@ -110,18 +110,18 @@ Returns an array of all the URLs for a URI. An array of the URLs. - method. - - - -## Examples + method. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IChannelReceiver_StartListening_ChannelData/CPP/ichannelreceiver_channeldata_server.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.vb" id="Snippet3"::: + ]]> The immediate caller does not have infrastructure permission. @@ -157,18 +157,18 @@ Optional initialization information. Instructs the current channel to start listening for requests. - The immediate caller does not have infrastructure permission. @@ -204,18 +204,18 @@ Optional state information for the channel. Instructs the current channel to stop listening for requests. - The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IChannelSender.xml b/xml/System.Runtime.Remoting.Channels/IChannelSender.xml index 1e4e000624f..3be34a5bf84 100644 --- a/xml/System.Runtime.Remoting.Channels/IChannelSender.xml +++ b/xml/System.Runtime.Remoting.Channels/IChannelSender.xml @@ -26,21 +26,21 @@ Provides required functions and properties for the sender channels. - interface. - - - -## Examples + The sending side of channels must expose the interface. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IChannelSender/CPP/ichannelsender_2_client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.vb" id="Snippet1"::: + ]]> @@ -80,18 +80,18 @@ Returns a channel message sink that delivers messages to the specified URL or channel data object. A channel message sink that delivers messages to the specified URL or channel data object, or if the channel cannot connect to the given endpoint. - method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, the `remoteChannelData` parameter is used as a target for the sink. Either the `url` parameter or the `remoteChannelData` parameter can be `null`, but not both. - - - -## Examples + method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, the `remoteChannelData` parameter is used as a target for the sink. Either the `url` parameter or the `remoteChannelData` parameter can be `null`, but not both. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IChannelSender/CPP/ichannelsender_2_client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.vb" id="Snippet1"::: + ]]> The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IClientChannelSink.xml b/xml/System.Runtime.Remoting.Channels/IClientChannelSink.xml index b281c9742e3..3c4a5619883 100644 --- a/xml/System.Runtime.Remoting.Channels/IClientChannelSink.xml +++ b/xml/System.Runtime.Remoting.Channels/IClientChannelSink.xml @@ -179,7 +179,7 @@ method is called by the formatter sink before it serializes the message. + The method is called by the formatter sink before it serializes the message. diff --git a/xml/System.Runtime.Remoting.Channels/IClientChannelSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/IClientChannelSinkProvider.xml index 80c295479ba..8c9fe47e959 100644 --- a/xml/System.Runtime.Remoting.Channels/IClientChannelSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/IClientChannelSinkProvider.xml @@ -22,25 +22,25 @@ Creates client channel sinks for the client channel through which remoting messages flow. - interface. All the remoting client channels provide constructors that take a as a parameter. - - Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. - - When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers will be created when the channel is created during the call. - - - -## Examples - The following code example illustrates an implementation of this interface. - + interface. All the remoting client channels provide constructors that take a as a parameter. + + Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. + + When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers will be created when the channel is created during the call. + + + +## Examples + The following code example illustrates an implementation of this interface. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Sinks/CPP/clientsink.cpp" id="Snippet30"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/clientsink.cs" id="Snippet30"::: - - See the interface documentation for an example of the corresponding client sink implementation. - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/clientsink.cs" id="Snippet30"::: + + See the interface documentation for an example of the corresponding client sink implementation. + ]]> @@ -80,19 +80,19 @@ Creates a sink chain. The first sink of the newly formed channel sink chain, or , which indicates that this provider will not or cannot provide a connection for this endpoint. - method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. - - - -## Examples - The following code example illustrates an implementation of this method. - + method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. + + + +## Examples + The following code example illustrates an implementation of this method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Sinks/CPP/clientsink.cpp" id="Snippet33"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/clientsink.cs" id="Snippet33"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/clientsink.cs" id="Snippet33"::: + ]]> The immediate caller does not have infrastructure permission. @@ -129,14 +129,14 @@ Gets or sets the next sink provider in the channel sink provider chain. The next sink provider in the channel sink provider chain. - The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IClientChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/IClientChannelSinkStack.xml index 11410de2999..665b4b53996 100644 --- a/xml/System.Runtime.Remoting.Channels/IClientChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/IClientChannelSinkStack.xml @@ -26,15 +26,15 @@ Provides functionality for a stack of client channel sinks that must be invoked during an asynchronous message response decoding. - is used during processing of responses to asynchronous calls. - - During a synchronous call, the method is called when a message is outbound to the server. Each sink in the sink chain calls the method on the next sink until the call reaches the transport sink at the end of the chain. From there the message is transported to the server. - - When the formatter sink is called through the method, it dispatches the call asynchronously by calling on the next channel sink. A stack of reply sinks is needed to process the response. Any sink that wants to process the response needs to push itself to the client channel sink stack inside of . - + is used during processing of responses to asynchronous calls. + + During a synchronous call, the method is called when a message is outbound to the server. Each sink in the sink chain calls the method on the next sink until the call reaches the transport sink at the end of the chain. From there the message is transported to the server. + + When the formatter sink is called through the method, it dispatches the call asynchronously by calling on the next channel sink. A stack of reply sinks is needed to process the response. Any sink that wants to process the response needs to push itself to the client channel sink stack inside of . + ]]> @@ -106,11 +106,11 @@ Information generated on the request side that is needed on the response side. Pushes the specified sink and information associated with it onto the sink stack. - method on the corresponding sink. - + method on the corresponding sink. + ]]> The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IClientResponseChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/IClientResponseChannelSinkStack.xml index 3e29e3440cd..34e90636502 100644 --- a/xml/System.Runtime.Remoting.Channels/IClientResponseChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/IClientResponseChannelSinkStack.xml @@ -56,11 +56,11 @@ The stream coming back from the transport sink. Requests asynchronous processing of a method call on the sinks in the current sink stack. - method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see . - + method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see . + ]]> The current sink stack is empty. @@ -97,11 +97,11 @@ The exception to dispatch to the server. Dispatches the specified exception on the reply sink. - method dispatches the specified exception to the server through the reply sink specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the exception is not transmitted, and no new exception is thrown. - + method dispatches the specified exception to the server through the reply sink specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the exception is not transmitted, and no new exception is thrown. + ]]> The immediate caller does not have infrastructure permission. @@ -137,11 +137,11 @@ The to dispatch. Dispatches the specified reply message on the reply sink. - method dispatches the specified message to the server through the reply sink specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the message is not transmitted, and no new exception is thrown. - + method dispatches the specified message to the server through the reply sink specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the message is not transmitted, and no new exception is thrown. + ]]> The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IServerChannelSink.xml b/xml/System.Runtime.Remoting.Channels/IServerChannelSink.xml index a7afa650b67..7bae30bac70 100644 --- a/xml/System.Runtime.Remoting.Channels/IServerChannelSink.xml +++ b/xml/System.Runtime.Remoting.Channels/IServerChannelSink.xml @@ -26,21 +26,21 @@ Provides methods used for security and transport sinks. - interface. - + interface. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Sinks/CPP/serversink.cpp" id="Snippet60"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/serversink.cs" id="Snippet60"::: - - See the interface documentation for an example of the corresponding server sink provider implementation. - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/serversink.cs" id="Snippet60"::: + + See the interface documentation for an example of the corresponding server sink provider implementation. + ]]> @@ -83,18 +83,18 @@ The stream heading back to the transport sink. Requests processing from the current sink of the response from a method call sent asynchronously. - The immediate caller does not have infrastructure permission. @@ -137,11 +137,11 @@ Returns the onto which the provided response message is to be serialized. The onto which the provided response message is to be serialized. - The immediate caller does not have infrastructure permission. @@ -174,11 +174,11 @@ Gets the next server channel sink in the server sink chain. The next server channel sink in the server sink chain. - The immediate caller does not have the required permission. @@ -227,11 +227,11 @@ Requests message processing from the current sink. A status value that provides information about how message was processed. - interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together in the sense that every message sink is responsible for calling on the next message sink after it has performed its work. For instance, a synchronization-related message sink can cause a lock to be acquired or released, and then delegated further to the downstream message sink. - + interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together in the sense that every message sink is responsible for calling on the next message sink after it has performed its work. For instance, a synchronization-related message sink can cause a lock to be acquired or released, and then delegated further to the downstream message sink. + ]]> The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IServerChannelSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/IServerChannelSinkProvider.xml index 50491ff951f..dabe695215b 100644 --- a/xml/System.Runtime.Remoting.Channels/IServerChannelSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/IServerChannelSinkProvider.xml @@ -22,27 +22,27 @@ Creates server channel sinks for the server channel through which remoting messages flow. - interface. All the remoting server channels provide constructors that take a as a parameter. - - Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. - - When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers are created at the same time as the channel, during a call. - - After the is generated, .NET Framework searches through the list of registered channels to find one that can process the call. Once an appropriate channel has been found, the channel sink is retrieved from the channel, and the is forwarded to the sink for processing. - - - -## Examples - The following code example illustrates an implementation of this interface. - + interface. All the remoting server channels provide constructors that take a as a parameter. + + Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. + + When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers are created at the same time as the channel, during a call. + + After the is generated, .NET Framework searches through the list of registered channels to find one that can process the call. Once an appropriate channel has been found, the channel sink is retrieved from the channel, and the is forwarded to the sink for processing. + + + +## Examples + The following code example illustrates an implementation of this interface. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Sinks/CPP/serversink.cpp" id="Snippet70"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/serversink.cs" id="Snippet70"::: - - See the interface documentation for an example of the corresponding server sink implementation. - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/serversink.cs" id="Snippet70"::: + + See the interface documentation for an example of the corresponding server sink implementation. + ]]> @@ -78,13 +78,13 @@ Creates a sink chain. The first sink of the newly formed channel sink chain, or , which indicates that this provider will not or cannot provide a connection for this endpoint. - The immediate caller does not have infrastructure permission. @@ -120,13 +120,13 @@ A object in which the channel data is to be returned. Returns the channel data for the channel that the current sink is associated with. - The immediate caller does not have infrastructure permission. @@ -163,13 +163,13 @@ Gets or sets the next sink provider in the channel sink provider chain. The next sink provider in the channel sink provider chain. - The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IServerChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/IServerChannelSinkStack.xml index 5220f8d5209..bc97aa5a780 100644 --- a/xml/System.Runtime.Remoting.Channels/IServerChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/IServerChannelSinkStack.xml @@ -94,11 +94,11 @@ Information generated on the request side that is needed on the response side. Pushes the specified sink and information associated with it onto the sink stack. - method on the corresponding sink. - + method on the corresponding sink. + ]]> The immediate caller does not have infrastructure permission. @@ -134,13 +134,13 @@ The status and state of an asynchronous operation on a remote object. Presents a callback delegate to handle a callback after a message has been dispatched asynchronously. - method is intended for use only by the .NET Framework remoting infrastructure. - + method is intended for use only by the .NET Framework remoting infrastructure. + ]]> @@ -177,11 +177,11 @@ The state associated with . Stores a message sink and its associated state for later asynchronous processing. - method is intended for use only by the .NET Framework remoting infrastructure. - + method is intended for use only by the .NET Framework remoting infrastructure. + ]]> @@ -218,13 +218,13 @@ The state associated with . Stores a message sink and its associated state, and then dispatches a message asynchronously, using the sink just stored and any other stored sinks. - method is intended for use only by the .NET Framework remoting infrastructure. - - Also, the method should only be called by a transport sink to complete an asynchronous dispatch. - + method is intended for use only by the .NET Framework remoting infrastructure. + + Also, the method should only be called by a transport sink to complete an asynchronous dispatch. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/IServerResponseChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/IServerResponseChannelSinkStack.xml index ae793042013..f8fe59b7281 100644 --- a/xml/System.Runtime.Remoting.Channels/IServerResponseChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/IServerResponseChannelSinkStack.xml @@ -58,11 +58,11 @@ The stream coming back from the transport sink. Requests asynchronous processing of a method call on the sinks in the current sink stack. - method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see the method. - + method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see the method. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/ServerChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/ServerChannelSinkStack.xml index ca46af2c473..4c128cc8b22 100644 --- a/xml/System.Runtime.Remoting.Channels/ServerChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/ServerChannelSinkStack.xml @@ -36,11 +36,11 @@ Holds the stack of server channel sinks. - @@ -101,11 +101,11 @@ The stream coming back from the transport sink. Requests asynchronous processing of a method call on the sinks in the current sink stack. - method. - + method. + ]]> The current sink stack is empty. @@ -147,11 +147,11 @@ Returns the onto which the specified message is to be serialized. The onto which the specified message is to be serialized. - called with the `msg` and `headers` parameters ( (`msg`, `headers`)) on the top sink in the current sink stack. The top sink in the sink stack remains unchanged. - + called with the `msg` and `headers` parameters ( (`msg`, `headers`)) on the top sink in the current sink stack. The top sink in the sink stack remains unchanged. + ]]> The sink stack is empty. @@ -229,11 +229,11 @@ Information generated on the request side that is needed on the response side. Pushes the specified sink and information associated with it onto the sink stack. - method on the corresponding sink. - + method on the corresponding sink. + ]]> @@ -271,13 +271,13 @@ The status and state of an asynchronous operation on a remote object. Provides a delegate to handle a callback after a message has been dispatched asynchronously. - method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. - + method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. + ]]> @@ -317,17 +317,17 @@ The state associated with . Stores a message sink and its associated state for later asynchronous processing. - method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. - + method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. + ]]> - The current sink stack is empty. - - -or- - + The current sink stack is empty. + + -or- + The specified sink was never pushed onto the current stack. @@ -366,13 +366,13 @@ The state associated with . Stores a message sink and its associated state, and then dispatches a message asynchronously, using the sink just stored and any other stored sinks. - method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. - - The method should be only called by a transport sink to complete an asynchronous dispatch. - + method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. + + The method should be only called by a transport sink to complete an asynchronous dispatch. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSink.xml b/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSink.xml index 2f5b78ee654..98eb719dc0f 100644 --- a/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSink.xml +++ b/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSink.xml @@ -34,7 +34,7 @@ is forwarded to all sinks in the channel sink chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message need to be placed in the sink chain before the formatter. This can be achieved by implementing both the and interfaces. The formatter sink can be placed in the sink chain later. + The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After reaching the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message need to be placed in the sink chain before the formatter. This can be achieved by implementing both the and interfaces. The formatter sink can be placed in the sink chain later. |Property|Description| |--------------|-----------------| diff --git a/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSinkProvider.xml index 546e04521ee..e548120d83a 100644 --- a/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSinkProvider.xml @@ -30,7 +30,7 @@ ## Remarks A creates client formatter sinks that use the to serialize messages for the client channel through which remoting messages flow. - The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After reaching the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. This can be achieved by implementing both the and interfaces. The formatter sink can be placed in the sink chain later. + The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After reaching the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. This can be achieved by implementing both the and interfaces. The formatter sink can be placed in the sink chain later. Formatter sinks use sink configuration properties to configure the channel at run time. Sink properties can be specified in a configuration file, or programmatically, inside of a . In a configuration file all values are represented by strings, but when building a property programmatically, value types can be specified with their native values or with strings. @@ -139,7 +139,7 @@ method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. + When the method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. ]]> diff --git a/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSink.xml b/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSink.xml index 98b6f4ddd87..68f068818f0 100644 --- a/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSink.xml +++ b/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSink.xml @@ -28,7 +28,7 @@ method, which is called by server channels to create the server channel sink chains. When the message reaches the dispatch sink, the dispatch sink passes the message to the remoting infrastructure. + The request stream propagates from the server transport sink through the server channel sinks until it reaches the appropriate formatter sink. The formatter sink deserializes the message and passes it through the pipeline. A special dispatch sink is inserted at the end of the channel sink chain by method, which is called by server channels to create the server channel sink chains. When the message reaches the dispatch sink, the dispatch sink passes the message to the remoting infrastructure. |Property|Description| |--------------|-----------------| diff --git a/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSinkProvider.xml index 50a79343df9..e3fb1e59d83 100644 --- a/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSinkProvider.xml @@ -30,9 +30,9 @@ ## Remarks Channel sinks are connected to a server channel through implementations of the interface. All the remoting server channels provide constructors that take a as a parameter. - Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. + Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. - When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers and the channels are created during the call. + When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers and the channels are created during the call. Formatter sinks use sink configuration properties to configure the channel at run time. Sink properties can be specified in a configuration file, or programmatically, inside of a . In a configuration file all values are represented by strings, but when building a property programmatically, value types can be specified with their native values or with strings. diff --git a/xml/System.Runtime.Remoting.Contexts/Context.xml b/xml/System.Runtime.Remoting.Contexts/Context.xml index 83ba7a4e7c7..b04ae87e0ab 100644 --- a/xml/System.Runtime.Remoting.Contexts/Context.xml +++ b/xml/System.Runtime.Remoting.Contexts/Context.xml @@ -25,17 +25,17 @@ Defines an environment for the objects that are resident inside it and for which a policy can be enforced. - class, which provides the usage rules. Whenever a new object is instantiated, the .NET Framework finds a compatible or creates a new instance of the class for the object. Once an object is placed in a context, it stays in it for life. Classes that can be bound to a context are called context-bound classes. When accessed from another context, such classes are referenced directly by using a proxy. Any call from an object in one context to an object in another context will go through a context proxy and be affected by the policy that the combined context properties enforce. - - A new object's context is generally chosen based on meta-data attributes on the class. This mechanism is extensible through custom attributes. These are known as static-context properties, which are compiled into the class meta-data. Dynamic-context properties (also known as configuration properties) can be applied and configured by administrators. - - For more information on contexts, see [Boundaries: Processes and Application Domains](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kt21t9h7(v=vs.100)). - + class, which provides the usage rules. Whenever a new object is instantiated, the .NET Framework finds a compatible or creates a new instance of the class for the object. Once an object is placed in a context, it stays in it for life. Classes that can be bound to a context are called context-bound classes. When accessed from another context, such classes are referenced directly by using a proxy. Any call from an object in one context to an object in another context will go through a context proxy and be affected by the policy that the combined context properties enforce. + + A new object's context is generally chosen based on meta-data attributes on the class. This mechanism is extensible through custom attributes. These are known as static-context properties, which are compiled into the class meta-data. Dynamic-context properties (also known as configuration properties) can be applied and configured by administrators. + + For more information on contexts, see [Boundaries: Processes and Application Domains](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kt21t9h7(v=vs.100)). + ]]> @@ -95,11 +95,11 @@ Allocates an unnamed data slot. A local data slot. - @@ -136,11 +136,11 @@ Allocates a named data slot. A local data slot object. - @@ -233,11 +233,11 @@ Gets the default context for the current application domain. The default context for the namespace. - @@ -273,11 +273,11 @@ The delegate used to request the callback. Executes code in another context. - method on it by passing in a delegate. The delegate is used to request a callback. The delegate must be a class type. - + method on it by passing in a delegate. The delegate is used to request a callback. The delegate must be a class type. + ]]> @@ -310,11 +310,11 @@ Cleans up the backing objects for the nondefault contexts. - class. - + class. + ]]> @@ -350,11 +350,11 @@ The name of the data slot to free. Frees a named data slot on all the contexts. - @@ -387,11 +387,11 @@ Freezes the context, making it impossible to add or remove context properties from the current context. - The context is already frozen. @@ -463,11 +463,11 @@ Looks up a named data slot. A local data slot. - @@ -543,17 +543,17 @@ if the property was successfully registered; otherwise, . - Either or its name is , or it is not dynamic (it does not implement ). @@ -626,11 +626,11 @@ The actual context property. Sets a specific context property by name. - The context is frozen. diff --git a/xml/System.Runtime.Remoting.Contexts/ContextAttribute.xml b/xml/System.Runtime.Remoting.Contexts/ContextAttribute.xml index e011ae3bb61..dd832c62421 100644 --- a/xml/System.Runtime.Remoting.Contexts/ContextAttribute.xml +++ b/xml/System.Runtime.Remoting.Contexts/ContextAttribute.xml @@ -249,7 +249,7 @@ class is an implementation of an property. The method adds the property to the given class so that when the message is received, the new object can be created in the required context environment. + The class is an implementation of an property. The method adds the property to the given class so that when the message is received, the new object can be created in the required context environment. ]]> @@ -339,7 +339,7 @@ Once all the context properties have been added to the new context, they are all queried as to whether they are okay in the new context. The context property could look at the other context properties in the property of the new context and determine whether it is compatible with these other context properties. > [!NOTE] -> By default, the method returns `true`. +> By default, the method returns `true`. ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IContextAttribute.xml b/xml/System.Runtime.Remoting.Contexts/IContextAttribute.xml index 0c0d0c13c71..5aefe48ce9a 100644 --- a/xml/System.Runtime.Remoting.Contexts/IContextAttribute.xml +++ b/xml/System.Runtime.Remoting.Contexts/IContextAttribute.xml @@ -65,7 +65,7 @@ method can add context properties directly to the property list in the interface. The default implementation in the class will add this to the context property list. Context attributes are free to override and can implement their own behavior. For example, they can add to the list a new class that implements the context property. + The method can add context properties directly to the property list in the interface. The default implementation in the class will add this to the context property list. Context attributes are free to override and can implement their own behavior. For example, they can add to the list a new class that implements the context property. ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IContributeClientContextSink.xml b/xml/System.Runtime.Remoting.Contexts/IContributeClientContextSink.xml index 4b3b59c7a17..1872ba11814 100644 --- a/xml/System.Runtime.Remoting.Contexts/IContributeClientContextSink.xml +++ b/xml/System.Runtime.Remoting.Contexts/IContributeClientContextSink.xml @@ -22,13 +22,13 @@ Contributes an interception sink at the context boundary on the client end of a remoting call. - interface is implemented by context properties in a class that want to contribute an interception sink at the context boundary on the client end of a remoting call. - - The client context chain is composed from those properties in the client context that implement , which contributes to a sink through the method call. This chain is cached for future use. - + interface is implemented by context properties in a class that want to contribute an interception sink at the context boundary on the client end of a remoting call. + + The client context chain is composed from those properties in the client context that implement , which contributes to a sink through the method call. This chain is cached for future use. + ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IContributeEnvoySink.xml b/xml/System.Runtime.Remoting.Contexts/IContributeEnvoySink.xml index d1a80ee3b0d..ba9f790bea6 100644 --- a/xml/System.Runtime.Remoting.Contexts/IContributeEnvoySink.xml +++ b/xml/System.Runtime.Remoting.Contexts/IContributeEnvoySink.xml @@ -22,11 +22,11 @@ Contributes an envoy message sink on the client end. - interface is implemented by context properties in the server class that want to contribute an envoy message sink on the client end. The server envoy chain is composed from those context properties that implement . The envoy chain resides on the client end and acts as a representative of the corresponding message sinks from the server context properties. - + interface is implemented by context properties in the server class that want to contribute an envoy message sink on the client end. The server envoy chain is composed from those context properties that implement . The envoy chain resides on the client end and acts as a representative of the corresponding message sinks from the server context properties. + ]]> @@ -66,11 +66,11 @@ Takes the first sink in the chain of sinks composed so far, and then chains its message sink in front of the chain already formed. The composite sink chain. - method is used as an optimization to create an envoy sink when the destination is a different context in the same application domain and is used by the Wrap operation. - + method is used as an optimization to create an envoy sink when the destination is a different context in the same application domain and is used by the Wrap operation. + ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IContributeServerContextSink.xml b/xml/System.Runtime.Remoting.Contexts/IContributeServerContextSink.xml index e7dc1781081..dda035c80f2 100644 --- a/xml/System.Runtime.Remoting.Contexts/IContributeServerContextSink.xml +++ b/xml/System.Runtime.Remoting.Contexts/IContributeServerContextSink.xml @@ -22,15 +22,15 @@ Contributes an interception sink at the context boundary on the server end of a remoting call. - interface is implemented by context properties in a class that want to contribute an interception sink at the context boundary on the server end of a remoting call. - - The server context chain is composed from those properties in the server context that implement and which contribute a sink by using the method call. - - Serialization is an example of such a context property. In this case, the message sink would involve taking a synchronization primitive lock before processing a call any further. - + interface is implemented by context properties in a class that want to contribute an interception sink at the context boundary on the server end of a remoting call. + + The server context chain is composed from those properties in the server context that implement and which contribute a sink by using the method call. + + Serialization is an example of such a context property. In this case, the message sink would involve taking a synchronization primitive lock before processing a call any further. + ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IDynamicMessageSink.xml b/xml/System.Runtime.Remoting.Contexts/IDynamicMessageSink.xml index 8795b436baf..a1b5c5b7a07 100644 --- a/xml/System.Runtime.Remoting.Contexts/IDynamicMessageSink.xml +++ b/xml/System.Runtime.Remoting.Contexts/IDynamicMessageSink.xml @@ -22,11 +22,11 @@ Indicates that the implementing message sink will be provided by dynamically registered properties. - @@ -66,11 +66,11 @@ A value of if this is an asynchronic call and if it is a synchronic call. Indicates that a call is returning. - method. - + method. + ]]> @@ -110,11 +110,11 @@ A value of if this is an asynchronic call and if it is a synchronic call. Indicates that a call is starting. - method. - + method. + ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/SynchronizationAttribute.xml b/xml/System.Runtime.Remoting.Contexts/SynchronizationAttribute.xml index 40263d45350..a0bf711ba96 100644 --- a/xml/System.Runtime.Remoting.Contexts/SynchronizationAttribute.xml +++ b/xml/System.Runtime.Remoting.Contexts/SynchronizationAttribute.xml @@ -44,26 +44,26 @@ Enforces a synchronization domain for the current context and all contexts that share the same instance. - [!NOTE] -> There are two classes named `SynchronizationAttribute` : one in the namespace, and the other in the namespace. The class supports only synchronous calls, and can be used only with serviced components. The supports both synchronous and asynchronous calls, and can be used only with context bound objects. (For more information on context bound objects, see the class.) - +> There are two classes named `SynchronizationAttribute` : one in the namespace, and the other in the namespace. The class supports only synchronous calls, and can be used only with serviced components. The supports both synchronous and asynchronous calls, and can be used only with context bound objects. (For more information on context bound objects, see the class.) + > [!NOTE] -> This class makes a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). - - - -## Examples - The following code example demonstrates the use of the . For the complete example code, see the example for the class. - +> This class makes a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). + + + +## Examples + The following code example demonstrates the use of the . For the complete example code, see the example for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncResult.NewExamples/CPP/ad.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/IsTransparentProxy/ad.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/RemotingServices/IsTransparentProxy/ad.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/RemotingServices/IsTransparentProxy/ad.vb" id="Snippet2"::: + ]]> @@ -118,11 +118,11 @@ A Boolean value indicating whether reentry is required. Initializes a new instance of the class with a Boolean value indicating whether reentry is required. - to which the current attribute is applied must be intercepted and serialized. - + to which the current attribute is applied must be intercepted and serialized. + ]]> @@ -148,11 +148,11 @@ An integer value indicating the behavior of the object to which this attribute is applied. Initializes a new instance of the class with a flag indicating the behavior of the object to which this attribute is applied. - , , , or . - + , , , or . + ]]> The parameter was not one of the defined flags. @@ -182,11 +182,11 @@ if reentry is required, and callouts must be intercepted and serialized; otherwise, . Initializes a new instance of the class with a flag indicating the behavior of the object to which this attribute is applied, and a Boolean value indicating whether reentry is required. - , , , or . - + , , , or . + ]]> The parameter was not one of the defined flags. @@ -226,11 +226,11 @@ Creates a CallOut sink and chains it in front of the provided chain of sinks at the context boundary on the client end of a remoting call. The composite sink chain with the new CallOut sink. - . - + . + ]]> @@ -305,11 +305,11 @@ Creates a synchronized dispatch sink and chains it in front of the provided chain of sinks at the context boundary on the server end of a remoting call. The composite sink chain with the new synchronized dispatch sink. - . - + . + ]]> @@ -376,11 +376,11 @@ Gets or sets a Boolean value indicating whether reentry is required. A Boolean value indicating whether reentry is required. - to which the current attribute is applied must be intercepted and serialized. - + to which the current attribute is applied must be intercepted and serialized. + ]]> @@ -406,11 +406,11 @@ Gets or sets a Boolean value indicating whether the implementing this instance of is locked. A Boolean value indicating whether the implementing this instance of is locked. - is locked, only the thread currently executing in it has access to objects in the . - + is locked, only the thread currently executing in it has access to objects in the . + ]]> diff --git a/xml/System.Runtime.Remoting.Lifetime/ClientSponsor.xml b/xml/System.Runtime.Remoting.Lifetime/ClientSponsor.xml index d592265e320..956d268aa14 100644 --- a/xml/System.Runtime.Remoting.Lifetime/ClientSponsor.xml +++ b/xml/System.Runtime.Remoting.Lifetime/ClientSponsor.xml @@ -211,7 +211,7 @@ . + For more information, see . @@ -305,7 +305,7 @@ method is called by the distributed garbage collector to renew the lease for the specified object. + The method is called by the distributed garbage collector to renew the lease for the specified object. diff --git a/xml/System.Runtime.Remoting.Lifetime/ILease.xml b/xml/System.Runtime.Remoting.Lifetime/ILease.xml index 712f9c7d704..6265a281a5e 100644 --- a/xml/System.Runtime.Remoting.Lifetime/ILease.xml +++ b/xml/System.Runtime.Remoting.Lifetime/ILease.xml @@ -260,7 +260,7 @@ or the current time plus the renewal time. + The lease time is set to the maximum of the or the current time plus the renewal time. ]]> @@ -301,7 +301,7 @@ to the only if the has dropped below the . Sequential calls therefore do not increase the without bound. Instead, immediately after any call, the is guaranteed to be the or longer. + When you make a call to a remote object, the lifetime service adds the to the only if the has dropped below the . Sequential calls therefore do not increase the without bound. Instead, immediately after any call, the is guaranteed to be the or longer. ]]> @@ -342,7 +342,7 @@ is , then this lease will not take sponsors. + If the is , then this lease will not take sponsors. If a sponsor does not respond to a call to renew a lease within the time-out period, it is assumed to be dead and is removed from the list of sponsors for the current lease. diff --git a/xml/System.Runtime.Remoting.Lifetime/ISponsor.xml b/xml/System.Runtime.Remoting.Lifetime/ISponsor.xml index 1fbc92399ab..89e8acc4d7e 100644 --- a/xml/System.Runtime.Remoting.Lifetime/ISponsor.xml +++ b/xml/System.Runtime.Remoting.Lifetime/ISponsor.xml @@ -22,18 +22,18 @@ Indicates that the implementer wants to be a lifetime lease sponsor. - interface if it needs to request a lease renewal for a particular object. An object that implements the interface can become a sponsor by registering itself with the lease manager. The interface is used by the lifetime service to call back to the sponsor. - - - -## Examples + interface if it needs to request a lease renewal for a particular object. An object that implements the interface can become a sponsor by registering itself with the lease manager. The interface is used by the lifetime service to call back to the sponsor. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ISponsor_Client/CPP/isponsor_client.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.vb" id="Snippet2"::: + ]]> @@ -69,18 +69,18 @@ Requests a sponsoring client to renew the lease for the specified object. The additional lease time for the specified object. - method is called by the distributed garbage collector to renew the lease for the specified object. - - - -## Examples + method is called by the distributed garbage collector to renew the lease for the specified object. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ISponsor_Client/CPP/isponsor_client.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.vb" id="Snippet2"::: + ]]> The immediate caller makes the call through a reference to the interface and does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Lifetime/LifetimeServices.xml b/xml/System.Runtime.Remoting.Lifetime/LifetimeServices.xml index 376af455f4a..150592a42ea 100644 --- a/xml/System.Runtime.Remoting.Lifetime/LifetimeServices.xml +++ b/xml/System.Runtime.Remoting.Lifetime/LifetimeServices.xml @@ -105,7 +105,7 @@ is set to 100 seconds, the lease list is inspected for cleanups and renewals every 100 seconds. + The current property defines the frequency at which the lease manager becomes active to clean up expired leases. For example, if is set to 100 seconds, the lease list is inspected for cleanups and renewals every 100 seconds. The default value of the property is 10 seconds. diff --git a/xml/System.Runtime.Remoting.Messaging/AsyncResult.xml b/xml/System.Runtime.Remoting.Messaging/AsyncResult.xml index 3bbd675a9f8..96e90f8d8b5 100644 --- a/xml/System.Runtime.Remoting.Messaging/AsyncResult.xml +++ b/xml/System.Runtime.Remoting.Messaging/AsyncResult.xml @@ -42,7 +42,7 @@ ## Examples - The following example demonstrates how to use the property to get a , and how to wait for an asynchronous call on a delegate. The is signaled when the asynchronous call completes, and you can wait for it by calling the method. + The following example demonstrates how to use the property to get a , and how to wait for an asynchronous call on a delegate. The is signaled when the asynchronous call completes, and you can wait for it by calling the method. The example consists of two classes, the class that contains the method that's called asynchronously, and the class that contains the `Main` method that makes the call. @@ -147,7 +147,7 @@ method of the interface is not relevant to the class. Implementation by throws a . Instead, obtain an by casting the interface returned by an asynchronous call made using a delegate. + The method of the interface is not relevant to the class. Implementation by throws a . Instead, obtain an by casting the interface returned by an asynchronous call made using a delegate. ]]> @@ -231,15 +231,15 @@ ## Remarks The returned by this method is automatically signaled when the asynchronous operation has completed. - The wait handle is not closed automatically when you call `EndInvoke` on the delegate that was used to make the asynchronous method call. If you release all references to the wait handle, system resources are freed when garbage collection reclaims the wait handle. To free the system resources as soon as you are finished using the wait handle, call the method. Garbage collection works more efficiently when disposable objects are explicitly closed or disposed. + The wait handle is not closed automatically when you call `EndInvoke` on the delegate that was used to make the asynchronous method call. If you release all references to the wait handle, system resources are freed when garbage collection reclaims the wait handle. To free the system resources as soon as you are finished using the wait handle, call the method. Garbage collection works more efficiently when disposable objects are explicitly closed or disposed. > [!CAUTION] -> The contained in the property can be used to block the current thread until the asynchronous call is complete. However the will ignore the , if one was specified during the `BeginInvoke` call. Therefore, a situation can occur where the application shuts down before the has finished executing, even if a is used to block until the asynchronous call completion. For an example of such a situation, see the example for the class, and remove the statement. +> The contained in the property can be used to block the current thread until the asynchronous call is complete. However the will ignore the , if one was specified during the `BeginInvoke` call. Therefore, a situation can occur where the application shuts down before the has finished executing, even if a is used to block until the asynchronous call completion. For an example of such a situation, see the example for the class, and remove the statement. ## Examples - The following example demonstrates how to use the property to get a , and how to wait for an asynchronous call on a delegate. The is signaled when the asynchronous call completes, and you can wait for it by calling the method. + The following example demonstrates how to use the property to get a , and how to wait for an asynchronous call on a delegate. The is signaled when the asynchronous call completes, and you can wait for it by calling the method. The example consists of two classes, the class that contains the method that's called asynchronously, and the class that contains the `Main` method that makes the call. @@ -287,7 +287,7 @@ ## Remarks If it is detected that the `BeginInvoke` call completed synchronously in the delegate, it is probable that the thread that called BeginInvoke is the current thread. Most providers of the interface will not use the capability and will return a default `false`. - Current implementation of always returns `false`. + Current implementation of always returns `false`. ]]> @@ -342,7 +342,7 @@ method can return an object after the method is called. The return value can be cast to an . + The method can return an object after the method is called. The return value can be cast to an . However, you do not need to call either of these methods directly. They are intended for use by the remoting infrastructure of the .NET Framework. @@ -433,7 +433,7 @@ returns `null`. + The current implementation of returns `null`. ]]> @@ -466,7 +466,7 @@ method. + You do not need to call the method. ]]> @@ -509,11 +509,11 @@ method implements the interface. You do not need to call this method directly. It is intended for use by the remoting infrastructure of the .NET Framework. + The method implements the interface. You do not need to call this method directly. It is intended for use by the remoting infrastructure of the .NET Framework. - invokes the consumer code's delegate. It also sets the instance returned by the method. If the `msg` parameter is of type , the same object is returned by . Otherwise, a reply message that contains a remoting exception is returned. + invokes the consumer code's delegate. It also sets the instance returned by the method. If the `msg` parameter is of type , the same object is returned by . Otherwise, a reply message that contains a remoting exception is returned. - also modifies the value returned by the property. + also modifies the value returned by the property. ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/CallContext.xml b/xml/System.Runtime.Remoting.Messaging/CallContext.xml index fbbfd9bae99..f61587bc5b1 100644 --- a/xml/System.Runtime.Remoting.Messaging/CallContext.xml +++ b/xml/System.Runtime.Remoting.Messaging/CallContext.xml @@ -49,7 +49,7 @@ ## Examples - The following code example demonstrates the use of the class to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the `HelloServiceClass` class used in this sample, see the example for the method. To view the code for the server class used in this sample, see the example for the class. + The following code example demonstrates the use of the class to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the `HelloServiceClass` class used in this sample, see the example for the method. To view the code for the server class used in this sample, see the example for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CallContext/CPP/client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/CallContext/Overview/client.cs" id="Snippet1"::: @@ -138,7 +138,7 @@ method to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the client class used in the sample, see the example for the class. To view the code for the server class used in this sample, see the example for the class. + The following code example demonstrates the use of the method to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the client class used in the sample, see the example for the class. To view the code for the server class used in this sample, see the example for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CallContext/CPP/service.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/CallContext/Overview/service.cs" id="Snippet3"::: @@ -326,7 +326,7 @@ method to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the `HelloServiceClass` class used in this sample, see the example for the method. To view the code for the server class used in this sample, see the example for the class. + The following code example demonstrates the use of the method to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the `HelloServiceClass` class used in this sample, see the example for the method. To view the code for the server class used in this sample, see the example for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CallContext/CPP/client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/CallContext/Overview/client.cs" id="Snippet1"::: diff --git a/xml/System.Runtime.Remoting.Messaging/ILogicalThreadAffinative.xml b/xml/System.Runtime.Remoting.Messaging/ILogicalThreadAffinative.xml index 5d941141a0c..72a84855370 100644 --- a/xml/System.Runtime.Remoting.Messaging/ILogicalThreadAffinative.xml +++ b/xml/System.Runtime.Remoting.Messaging/ILogicalThreadAffinative.xml @@ -22,20 +22,20 @@ Marks an object that can propagate outside of an in a . - , the current class generates a that travels along with the call to the remote location. Only objects that expose the interface and are stored in the are propagated outside the . Objects that do not support this interface are not transmitted in instances with remote method calls. - - - -## Examples - The following code example demonstrates the use of the interface to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `HelloServiceClass` class used in the sample, see the example for the method. To view the code for the server class used in this sample, see example for the class. To view the code for the client class used in the sample, see the example for the class. - + , the current class generates a that travels along with the call to the remote location. Only objects that expose the interface and are stored in the are propagated outside the . Objects that do not support this interface are not transmitted in instances with remote method calls. + + + +## Examples + The following code example demonstrates the use of the interface to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `HelloServiceClass` class used in the sample, see the example for the method. To view the code for the server class used in this sample, see example for the class. To view the code for the client class used in the sample, see the example for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CallContext/CPP/service.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/CallContext/Overview/service.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Messaging/CallContext/Overview/service.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Messaging/CallContext/Overview/service.vb" id="Snippet2"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/IMessageSink.xml b/xml/System.Runtime.Remoting.Messaging/IMessageSink.xml index 60e1386fb73..7aac6e844b0 100644 --- a/xml/System.Runtime.Remoting.Messaging/IMessageSink.xml +++ b/xml/System.Runtime.Remoting.Messaging/IMessageSink.xml @@ -22,26 +22,26 @@ Defines the interface for a message sink. - , process, or computer. Two or more message sinks in the chain can interact with each other in regard to each specific action. - - - -## Examples - The following code example shows the implementation of the interface. Note that the sample assumes type definitions and assembly references that must be provided for the sample to compile. - + , process, or computer. Two or more message sinks in the chain can interact with each other in regard to each specific action. + + + +## Examples + The following code example shows the implementation of the interface. Note that the sample assumes type definitions and assembly references that must be provided for the sample to compile. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IMessageSink_Client/CPP/imessagesink_client.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/IMessage/Properties/imessagesink_client.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Messaging/IMessage/Properties/imessagesink_client.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Messaging/IMessage/Properties/imessagesink_client.vb" id="Snippet3"::: + ]]> @@ -82,11 +82,11 @@ Asynchronously processes the given message. An interface that provides a way to control asynchronous messages after they have been dispatched. - The immediate caller makes the call through a reference to the interface and does not have infrastructure permission. @@ -153,11 +153,11 @@ Synchronously processes the given message. A reply message in response to the request. - method is invoked on the message sink by the remoting infrastructure or by a previous sink for synchronous messages. - + method is invoked on the message sink by the remoting infrastructure or by a previous sink for synchronous messages. + ]]> The immediate caller makes the call through a reference to the interface and does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Messaging/IMethodCallMessage.xml b/xml/System.Runtime.Remoting.Messaging/IMethodCallMessage.xml index f56b2d874eb..3226ae95c16 100644 --- a/xml/System.Runtime.Remoting.Messaging/IMethodCallMessage.xml +++ b/xml/System.Runtime.Remoting.Messaging/IMethodCallMessage.xml @@ -184,7 +184,7 @@ property is redundant since the same functionality can be achieved with the and methods, there might be performance optimization available if the implementer understands when all the arguments will be retrieved. + Although the property is redundant since the same functionality can be achieved with the and methods, there might be performance optimization available if the implementer understands when all the arguments will be retrieved. diff --git a/xml/System.Runtime.Remoting.Messaging/IMethodMessage.xml b/xml/System.Runtime.Remoting.Messaging/IMethodMessage.xml index 537d5f16b9b..ef22e72da15 100644 --- a/xml/System.Runtime.Remoting.Messaging/IMethodMessage.xml +++ b/xml/System.Runtime.Remoting.Messaging/IMethodMessage.xml @@ -115,7 +115,7 @@ property is redundant since the same functionality can be achieved through the and , there might be performance optimization available if the implementer understands when all the arguments will be retrieved. + Although the property is redundant since the same functionality can be achieved through the and , there might be performance optimization available if the implementer understands when all the arguments will be retrieved. ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/IMethodReturnMessage.xml b/xml/System.Runtime.Remoting.Messaging/IMethodReturnMessage.xml index 131e6049997..fe89fbdb113 100644 --- a/xml/System.Runtime.Remoting.Messaging/IMethodReturnMessage.xml +++ b/xml/System.Runtime.Remoting.Messaging/IMethodReturnMessage.xml @@ -227,10 +227,10 @@ property is redundant since the same functionality can be achieved through the field and method, there might be performance optimization available if the implementer understands when all the arguments will be retrieved. + Although the property is redundant since the same functionality can be achieved through the field and method, there might be performance optimization available if the implementer understands when all the arguments will be retrieved. > [!WARNING] -> If is not `null`, a exception is thrown when is accessed. +> If is not `null`, a exception is thrown when is accessed. diff --git a/xml/System.Runtime.Remoting.Messaging/LogicalCallContext.xml b/xml/System.Runtime.Remoting.Messaging/LogicalCallContext.xml index 8b5f6bf0306..f9fc4071b50 100644 --- a/xml/System.Runtime.Remoting.Messaging/LogicalCallContext.xml +++ b/xml/System.Runtime.Remoting.Messaging/LogicalCallContext.xml @@ -40,16 +40,16 @@ Provides a set of properties that are carried with the execution code path during remote method calls. - class is a version of the class that is used during method calls to remote application domains. The is a specialized collection object similar to a thread local storage for method calls, and provides data slots that are unique to each logical thread of execution. The slots are not shared across call contexts on other logical threads. Objects can be added to the as it travels down and up the execution code path, and examined by various objects along the path. - - When a remote method call is made to an object in another , the class generates a that travels along with the remote call. Only objects that expose the interface and are stored in the are propagated outside the in a . Objects that do not support this interface are not transmitted in instances with remote method calls. - + class is a version of the class that is used during method calls to remote application domains. The is a specialized collection object similar to a thread local storage for method calls, and provides data slots that are unique to each logical thread of execution. The slots are not shared across call contexts on other logical threads. Objects can be added to the as it travels down and up the execution code path, and examined by various objects along the path. + + When a remote method call is made to an object in another , the class generates a that travels along with the remote call. Only objects that expose the interface and are stored in the are propagated outside the in a . Objects that do not support this interface are not transmitted in instances with remote method calls. + > [!NOTE] -> This class makes a link demand. A SecurityException is thrown if the immediate caller does not have infrastructure permission. See [Link Demands](/dotnet/framework/misc/link-demands) for more information. - +> This class makes a link demand. A SecurityException is thrown if the immediate caller does not have infrastructure permission. See [Link Demands](/dotnet/framework/misc/link-demands) for more information. + ]]> @@ -85,11 +85,11 @@ Creates a new object that is a copy of the current instance. A new object that is a copy of this instance. - method produces a deep copy of the current . - + method produces a deep copy of the current . + ]]> @@ -194,13 +194,13 @@ The contextual information about the source or destination of the serialization. Populates a specified with the data needed to serialize the current . - with all the data needed to recreate the . - - The current method is an implementation of . - + with all the data needed to recreate the . + + The current method is an implementation of . + ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/MethodCall.xml b/xml/System.Runtime.Remoting.Messaging/MethodCall.xml index 3273f107e3e..88e146e0882 100644 --- a/xml/System.Runtime.Remoting.Messaging/MethodCall.xml +++ b/xml/System.Runtime.Remoting.Messaging/MethodCall.xml @@ -473,7 +473,7 @@ method throws a . + The method throws a . ]]> @@ -919,7 +919,7 @@ property is set through the method. + The method belongs to a remote object. The value of the property is set through the method. ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/MethodResponse.xml b/xml/System.Runtime.Remoting.Messaging/MethodResponse.xml index 8791d5145da..28230e9eb05 100644 --- a/xml/System.Runtime.Remoting.Messaging/MethodResponse.xml +++ b/xml/System.Runtime.Remoting.Messaging/MethodResponse.xml @@ -382,7 +382,7 @@ method throws a . + The method throws a . ]]> diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri.xml index d1cde43b3ef..8b89fa56e94 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri.xml @@ -151,7 +151,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapAnyUri/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri/Overview/demo.cs" id="Snippet13"::: @@ -188,7 +188,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapAnyUri/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri/Overview/demo.cs" id="Snippet11"::: @@ -222,7 +222,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapAnyUri/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary.xml index 329598c6b7e..a57edd71d92 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary.xml @@ -151,7 +151,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary/Overview/demo.cs" id="Snippet13"::: @@ -188,7 +188,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary/Overview/demo.cs" id="Snippet11"::: @@ -229,7 +229,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate.xml index efad46f8e57..98b1405a1b6 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate.xml @@ -33,20 +33,20 @@ Wraps an XSD type. - class to wrap an XML `date` type. - + + + +## Examples + The following code example demonstrates using the class to wrap an XML `date` type. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet10"::: + ]]> @@ -78,14 +78,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Initializes a new instance of the class. - @@ -111,14 +111,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht A object to initialize the current instance. Initializes a new instance of the class with a specified object. - @@ -146,19 +146,19 @@ For more information about XSD data types, see the [XML Data Types Reference](ht An integer that indicates whether is positive. Initializes a new instance of the class with a specified object and an integer that indicates whether is a positive or negative value. - @@ -188,14 +188,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Returns the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet13"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet13"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet13"::: + ]]> @@ -225,26 +225,26 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Converts the specified into a object. A object that is obtained from . - method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. - -|Format Pattern|Description|Examples| -|--------------------|-----------------|--------------| -|yyyy|The year in 4-digit format.|1999, 1812| -|MM|The numeric month. Single-digit months have a leading zero.|11, 05| -|dd|The day of the month. Single-digit days have a leading zero.|23, 09| -|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| - - - -## Examples - The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. - + method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. + +|Format Pattern|Description|Examples| +|--------------------|-----------------|--------------| +|yyyy|The year in 4-digit format.|1999, 1812| +|MM|The numeric month. Single-digit months have a leading zero.|11, 05| +|dd|The day of the month. Single-digit days have a leading zero.|23, 09| +|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| + + + +## Examples + The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet11"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet11"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet11"::: + ]]> @@ -272,19 +272,19 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Gets or sets whether the date and time of the current instance is positive or negative. An integer that indicates whether is positive or negative. - . - - - -## Examples - The following code example shows how to use this property. This code example is part of a larger example that is provided for the class. - + . + + + +## Examples + The following code example shows how to use this property. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet15"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet15"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet15"::: + ]]> @@ -311,14 +311,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Returns as a . A that is obtained from in the format "yyyy-MM-dd" or "'-'yyyy-MM-dd" if is negative. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet12"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet12"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet12"::: + ]]> @@ -344,14 +344,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Gets or sets the date and time of the current instance. The object that contains the date and time of the current instance. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet14"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet14"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet14"::: + ]]> @@ -377,14 +377,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Gets the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet16"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet16"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet16"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay.xml index 4773962a1dd..47c469bb2ef 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay.xml @@ -150,7 +150,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDay/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay/Overview/demo.cs" id="Snippet13"::: @@ -187,7 +187,7 @@ method is capable of parsing strings in various formats. The recognizable string formats are "---ddzzz" and "---dd", which are composed out of the following format patterns. + The method is capable of parsing strings in various formats. The recognizable string formats are "---ddzzz" and "---dd", which are composed out of the following format patterns. |Format Pattern|Description|Examples| |--------------------|-----------------|--------------| @@ -197,7 +197,7 @@ ## Examples - The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDay/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay/Overview/demo.cs" id="Snippet11"::: @@ -233,7 +233,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDay/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration.xml index 4d7e368c4ac..010a057a12e 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration.xml @@ -89,7 +89,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDuration/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration/Overview/demo.cs" id="Snippet11"::: @@ -134,7 +134,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDuration/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary.xml index dfdd807ac98..ee5490c6786 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary.xml @@ -151,7 +151,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapHexBinary/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary/Overview/demo.cs" id="Snippet13"::: @@ -188,7 +188,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapHexBinary/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary/Overview/demo.cs" id="Snippet11"::: @@ -222,7 +222,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapHexBinary/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger.xml index da969c5d60a..c30d459f04f 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger.xml @@ -150,7 +150,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger/Overview/demo.cs" id="Snippet13"::: @@ -187,7 +187,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger/Overview/demo.cs" id="Snippet11"::: @@ -221,7 +221,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth.xml index 36e3dc6df81..d9ecc130902 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth.xml @@ -150,7 +150,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonth/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth/Overview/demo.cs" id="Snippet13"::: @@ -187,7 +187,7 @@ method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. + The method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. |Format Pattern|Description|Examples| |--------------------|-----------------|--------------| @@ -197,7 +197,7 @@ ## Examples - The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonth/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth/Overview/demo.cs" id="Snippet11"::: @@ -233,7 +233,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonth/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay.xml index 4353265f553..8ed7e8a9007 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay.xml @@ -150,7 +150,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonthDay/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay/Overview/demo.cs" id="Snippet13"::: @@ -187,7 +187,7 @@ method is capable of parsing strings in various formats. The recognizable string formats are composed out of the format patterns shown in the following table. + The method is capable of parsing strings in various formats. The recognizable string formats are composed out of the format patterns shown in the following table. |Format Pattern|Description|Examples| |--------------------|-----------------|--------------| @@ -198,7 +198,7 @@ ## Examples - The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonthDay/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay/Overview/demo.cs" id="Snippet11"::: @@ -234,7 +234,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonthDay/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger.xml index 3fc17227acd..17cea320c19 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger.xml @@ -152,7 +152,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNegativeInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger/Overview/demo.cs" id="Snippet13"::: @@ -189,7 +189,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNegativeInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger/Overview/demo.cs" id="Snippet11"::: @@ -223,7 +223,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNegativeInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger.xml index 67ccaaf38b2..1795b3ce23b 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger.xml @@ -152,7 +152,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonNegativeInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger/Overview/demo.cs" id="Snippet13"::: @@ -189,7 +189,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonNegativeInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger/Overview/demo.cs" id="Snippet11"::: @@ -223,7 +223,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonNegativeInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger.xml index 59935156678..56a8afbc1c9 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger.xml @@ -152,7 +152,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonPositiveInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger/Overview/demo.cs" id="Snippet13"::: @@ -189,7 +189,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonPositiveInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger/Overview/demo.cs" id="Snippet11"::: @@ -223,7 +223,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonPositiveInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger.xml index a9c706bb264..9babf1826ed 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger.xml @@ -152,7 +152,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapPositiveInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger/Overview/demo.cs" id="Snippet13"::: @@ -189,7 +189,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapPositiveInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger/Overview/demo.cs" id="Snippet11"::: @@ -223,7 +223,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapPositiveInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName.xml index 5e5f0aa1a06..0d1c6dcce82 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName.xml @@ -222,7 +222,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapQName/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName/Overview/demo.cs" id="Snippet13"::: @@ -358,7 +358,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapQName/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName/Overview/demo.cs" id="Snippet11"::: @@ -392,7 +392,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapQName/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime.xml index e26d34e6a1d..01176c1eea4 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime.xml @@ -33,19 +33,19 @@ Wraps an XSD type. - class to wrap an XSD `time` type. - + + + +## Examples + The following code example demonstrates using the class to wrap an XSD `time` type. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet10"::: + ]]> @@ -77,14 +77,14 @@ Initializes a new instance of the class. - @@ -110,14 +110,14 @@ A object to initialize the current instance. Initializes a new instance of the class with a specified object. - @@ -147,14 +147,14 @@ Returns the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet13"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet13"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet13"::: + ]]> @@ -184,29 +184,29 @@ Converts the specified into a object. A object that is obtained from . - method is capable of parsing strings in the HH:mm:ss.fffzzz format. This is composed out of the following format patterns. - -|Format Pattern|Description|Examples| -|--------------------|-----------------|--------------| -|HH|The hour within a 24-hour range. Single-digit hours have a leading zero.|17, 07| -|mm|The minute. Single-digit minutes have a leading zero.|49, 05| -|ss|The second. Single-digit seconds have a leading zero.|32, 02| -|fff|The fraction of a second. A maximum of 7 fraction digits are allowed, and only the first three are parsed.|321635, 4592| -|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, +08:00, Z| - - Only the first 3 fraction digits are parsed because the parsed value is stored as a object, and the type supports precisely 3 fraction digits of accuracy. - - - -## Examples - The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. - + method is capable of parsing strings in the HH:mm:ss.fffzzz format. This is composed out of the following format patterns. + +|Format Pattern|Description|Examples| +|--------------------|-----------------|--------------| +|HH|The hour within a 24-hour range. Single-digit hours have a leading zero.|17, 07| +|mm|The minute. Single-digit minutes have a leading zero.|49, 05| +|ss|The second. Single-digit seconds have a leading zero.|32, 02| +|fff|The fraction of a second. A maximum of 7 fraction digits are allowed, and only the first three are parsed.|321635, 4592| +|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, +08:00, Z| + + Only the first 3 fraction digits are parsed because the parsed value is stored as a object, and the type supports precisely 3 fraction digits of accuracy. + + + +## Examples + The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet11"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet11"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet11"::: + ]]> @@ -235,14 +235,14 @@ Returns as a . A that is obtained from in the format "HH:mm:ss.fffzzz". - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet12"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet12"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet12"::: + ]]> @@ -268,14 +268,14 @@ Gets or sets the date and time of the current instance. The object that contains the date and time of the current instance. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet14"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet14"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet14"::: + ]]> @@ -301,14 +301,14 @@ Gets the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet16"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet16"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet16"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear.xml index a523a916798..e3d774c3545 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear.xml @@ -33,19 +33,19 @@ Wraps an XSD type. - class to wrap the XSD `gYear` type. - + + + +## Examples + The following code example demonstrates using the class to wrap the XSD `gYear` type. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet10"::: + ]]> @@ -77,14 +77,14 @@ Initializes a new instance of the class. - @@ -110,14 +110,14 @@ A object to initialize the current instance. Initializes a new instance of the class with a specified object. - @@ -145,14 +145,14 @@ An integer that indicates whether is positive. Initializes a new instance of the class with a specified object and an integer that indicates whether is a positive or negative value. - @@ -182,14 +182,14 @@ Returns the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet13"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet13"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet13"::: + ]]> @@ -219,24 +219,24 @@ Converts the specified into a object. A object that is obtained from . - method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. - -|Format Pattern|Description|Examples| -|--------------------|-----------------|--------------| -|yyyy|The year in 4-digit format.|1999, 1812| -|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| - - - -## Examples - The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. - + method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. + +|Format Pattern|Description|Examples| +|--------------------|-----------------|--------------| +|yyyy|The year in 4-digit format.|1999, 1812| +|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| + + + +## Examples + The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet11"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet11"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet11"::: + ]]> @@ -264,14 +264,14 @@ Gets or sets whether the date and time of the current instance is positive or negative. An integer that indicates whether is positive or negative. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet15"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet15"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet15"::: + ]]> @@ -298,14 +298,14 @@ Returns as a . A that is obtained from in the format "yyyy" or "-yyyy" if is negative. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet12"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet12"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet12"::: + ]]> @@ -331,14 +331,14 @@ Gets or sets the date and time of the current instance. The object that contains the date and time of the current instance. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet14"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet14"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet14"::: + ]]> @@ -364,14 +364,14 @@ Gets the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet16"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet16"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet16"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth.xml index a48f589ebc9..9dd131d9a38 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth.xml @@ -33,19 +33,19 @@ Wraps an XSD type. - class to wrap the XSD `gYearMonth` type. - + + + +## Examples + The following code example demonstrates using the class to wrap the XSD `gYearMonth` type. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet10"::: + ]]> @@ -77,14 +77,14 @@ Initializes a new instance of the class. - @@ -110,14 +110,14 @@ A object to initialize the current instance. Initializes a new instance of the class with a specified object. - @@ -145,19 +145,19 @@ An integer that indicates whether is positive. Initializes a new instance of the class with a specified object and an integer that indicates whether is a positive or negative value. - @@ -187,14 +187,14 @@ Returns the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet13"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet13"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet13"::: + ]]> @@ -224,25 +224,25 @@ Converts the specified into a object. A object that is obtained from . - method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. - -|Format Pattern|Description|Examples| -|--------------------|-----------------|--------------| -|yyyy|The year in 4-digit format.|1999, 1812| -|MM|The numeric month. Single-digit months have a leading zero.|11, 05| -|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| - - - -## Examples - The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. - + method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. + +|Format Pattern|Description|Examples| +|--------------------|-----------------|--------------| +|yyyy|The year in 4-digit format.|1999, 1812| +|MM|The numeric month. Single-digit months have a leading zero.|11, 05| +|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| + + + +## Examples + The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet11"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet11"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet11"::: + ]]> @@ -270,19 +270,19 @@ Gets or sets whether the date and time of the current instance is positive or negative. An integer that indicates whether is positive or negative. - . - - - -## Examples - The following code example shows how to use this property. This code example is part of a larger example that is provided for the class. - + . + + + +## Examples + The following code example shows how to use this property. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet15"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet15"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet15"::: + ]]> @@ -309,14 +309,14 @@ Returns a as a . A that is obtained from in the format "yyyy-MM" or "'-'yyyy-MM" if is negative. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet12"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet12"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet12"::: + ]]> @@ -342,14 +342,14 @@ Gets or sets the date and time of the current instance. The object that contains the date and time of the current instance. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet14"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet14"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet14"::: + ]]> @@ -375,14 +375,14 @@ Gets the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet16"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet16"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet16"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Metadata/SoapTypeAttribute.xml b/xml/System.Runtime.Remoting.Metadata/SoapTypeAttribute.xml index b0aa39ce631..2ea92187757 100644 --- a/xml/System.Runtime.Remoting.Metadata/SoapTypeAttribute.xml +++ b/xml/System.Runtime.Remoting.Metadata/SoapTypeAttribute.xml @@ -93,7 +93,7 @@ A value indicates the SOAP configuration options that will be used with a attribute. > [!NOTE] -> The enumeration has no effect on serialization of objects with the . +> The enumeration has no effect on serialization of objects with the . ]]> diff --git a/xml/System.Runtime.Remoting.MetadataServices/MetaData.xml b/xml/System.Runtime.Remoting.MetadataServices/MetaData.xml index 24ba3cdb460..3a4d6813956 100644 --- a/xml/System.Runtime.Remoting.MetadataServices/MetaData.xml +++ b/xml/System.Runtime.Remoting.MetadataServices/MetaData.xml @@ -18,11 +18,11 @@ Provides methods that allow you to work with XML schema. - class provides methods that allow you to generate Web Services Description Language (WSDL) from type information, convert an XML Schema into a code stream, and compile the code stream into an assembly. This functionality is also present in the [Soapsuds Tool (Soapsuds.exe)](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/xd176a6c(v=vs.100)). - + class provides methods that allow you to generate Web Services Description Language (WSDL) from type information, convert an XML Schema into a code stream, and compile the code stream into an assembly. This functionality is also present in the [Soapsuds Tool (Soapsuds.exe)](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/xd176a6c(v=vs.100)). + ]]> @@ -74,23 +74,23 @@ The strong name to compile into the new assembly. Can be . Compiles a specified code source file into a runtime assembly file. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - - - -## Examples - The following code example demonstrates the use of the method to write the schema definition of the specified types to a runtime assembly with the specified name. The `CsSource.cs` file converted here contains C# source code. - +> If a file with the specified name already exists, it is overwritten. + + + +## Examples + The following code example demonstrates the use of the method to write the schema definition of the specified types to a runtime assembly with the specified name. The `CsSource.cs` file converted here contains C# source code. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/MetaData.ConvertCodeSourceFileToAssemblyFile/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.MetadataServices/MetaData/ConvertCodeSourceFileToAssemblyFile/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertCodeSourceFileToAssemblyFile/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertCodeSourceFileToAssemblyFile/source.vb" id="Snippet1"::: + ]]> @@ -123,14 +123,14 @@ The strong name to compile into the new run-time assembly. Can be . Compiles specified code source streams into a run-time assembly file. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - +> If a file with the specified name already exists, it is overwritten. + ]]> @@ -174,13 +174,13 @@ The list of file names for the code streams that are generated. Note that the method can create multiple source code streams. Converts the specified schema definition into C# proxy source code. - [!NOTE] -> If files with the specified names already exist, they are overwritten. - +> If files with the specified names already exist, they are overwritten. + ]]> @@ -217,13 +217,13 @@ The URL where the target remote object that is represented by the new proxy will be located. Converts the specified schema definition into C# proxy source code for a remote object that is located at the specified URL. - [!NOTE] -> If files with the specified names already exist, they are overwritten. - +> If files with the specified names already exist, they are overwritten. + ]]> @@ -262,13 +262,13 @@ The namespace of the newly created proxy. Converts the specified schema definition into C# proxy source code for a remote object that is located at the specified URL and in the provided class namespace. - [!NOTE] -> If files with the specified names already exist, they are overwritten. - +> If files with the specified names already exist, they are overwritten. + ]]> @@ -310,14 +310,14 @@ The path of the XML file. Converts the specified service types to XML schema, and writes it to a file that is specified by name. - instance allows you to associate a URL with an object . - + instance allows you to associate a URL with an object . + > [!NOTE] -> If a file with the specified name already exists, it is overwritten. - +> If a file with the specified name already exists, it is overwritten. + ]]> @@ -350,22 +350,22 @@ The path of the XML file. Converts the specified object types to XML schema, and writes it to a file that is specified by name. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - - - -## Examples - The following code example demonstrates the use of the method to write the schema definition of the specified types to a file. - +> If a file with the specified name already exists, it is overwritten. + + + +## Examples + The following code example demonstrates the use of the method to write the schema definition of the specified types to a file. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/MetaData.ConvertTypesToSchemaToFile/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToFile/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToFile/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToFile/source.vb" id="Snippet1"::: + ]]> @@ -407,11 +407,11 @@ The that the schema is written to. Converts the specified service types to XML schema, and writes it to a specified stream. - instance allows you to associate a URL with an object . - + instance allows you to associate a URL with an object . + ]]> @@ -444,15 +444,15 @@ The that the schema is written to. Converts the specified object types to XML schema, and writes it to a specified stream. - method to write the schema definition of the specified types to a stream. - + method to write the schema definition of the specified types to a stream. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/MetaData.ConvertTypesToSchemaToStream/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToStream/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToStream/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToStream/source.vb" id="Snippet1"::: + ]]> @@ -483,13 +483,13 @@ The path of the file that the schema is written to. Downloads the XML schema from a URL, and writes it to the specified file. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - +> If a file with the specified name already exists, it is overwritten. + ]]> @@ -548,13 +548,13 @@ The file that the input stream is written to. Saves the input stream to a file with the specified name. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - +> If a file with the specified name already exists, it is overwritten. + ]]> diff --git a/xml/System.Runtime.Remoting.MetadataServices/SdlChannelSink.xml b/xml/System.Runtime.Remoting.MetadataServices/SdlChannelSink.xml index 45551c12865..f205a59e289 100644 --- a/xml/System.Runtime.Remoting.MetadataServices/SdlChannelSink.xml +++ b/xml/System.Runtime.Remoting.MetadataServices/SdlChannelSink.xml @@ -217,9 +217,9 @@ interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together, which means that every message sink is responsible for calling on the next message sink after it has performed its work. For instance, a synchronization-related message sink might cause a lock to be acquired or released and delegated to the downstream message sink. + The proxy's job is to convert a method call that is invoked on it into a message object. The Message object, which implements the interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together, which means that every message sink is responsible for calling on the next message sink after it has performed its work. For instance, a synchronization-related message sink might cause a lock to be acquired or released and delegated to the downstream message sink. - When the formatter channel sink gets a message that needs to be sent over the channel, it calls , passing the message as a parameter. The formatter sink then creates the transport header array and calls on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that is passed back to the formatter sink. After this call returns, the message is serialized, is called on the first chain in the sink chain, and the message is passed to the channel sinks. + When the formatter channel sink gets a message that needs to be sent over the channel, it calls , passing the message as a parameter. The formatter sink then creates the transport header array and calls on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that is passed back to the formatter sink. After this call returns, the message is serialized, is called on the first chain in the sink chain, and the message is passed to the channel sinks. After the channel sinks get the message, they can write data to the stream, add headers to the header array, and add themselves to the sink stack before forwarding the call to the next sink. When the call reaches the transport sink at the end of the chain, the transport sink sends the headers and serialized message over the channel to the server, where the process is reversed. diff --git a/xml/System.Runtime.Remoting.Proxies/RealProxy.xml b/xml/System.Runtime.Remoting.Proxies/RealProxy.xml index f0118cbbeae..6ed99b591d2 100644 --- a/xml/System.Runtime.Remoting.Proxies/RealProxy.xml +++ b/xml/System.Runtime.Remoting.Proxies/RealProxy.xml @@ -126,7 +126,7 @@ method. + The current method creates a transparent proxy, which can be accessed through the method. A client that uses an object across any kind of a remoting boundary is actually using a transparent proxy for the object. The transparent proxy gives the impression that the actual object resides in the client's space. It achieves this by forwarding calls made on it to the real object using the remoting infrastructure. @@ -329,7 +329,7 @@ method, then that instance is returned; otherwise, a new instance is returned. + If the proxy is requested for marshaling, then an `IUnknown` interface for the object represented by the current proxy instance is returned. If an `IUnknown` was previously cached by the method, then that instance is returned; otherwise, a new instance is returned. If the proxy is requested not for marshaling but for communication with unmanaged objects in the current process, then a [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper) (CCW), which can be used in the current process for communication through COM, is returned. @@ -540,7 +540,7 @@ method is used in scenarios involving an external in the same . + The method is used in scenarios involving an external in the same . ]]> @@ -585,7 +585,7 @@ method calls the parameterless constructor for the new instance of the remote object that is represented by the current . + If the `ctorMsg` parameter is `null`, then the method calls the parameterless constructor for the new instance of the remote object that is represented by the current . @@ -627,7 +627,7 @@ is called, it delegates the calls to the method. The method transforms the message in the `msg` parameter into a , and sends it to the remote object that is represented by the current instance of . + When the transparent proxy that is backed by the is called, it delegates the calls to the method. The method transforms the message in the `msg` parameter into a , and sends it to the remote object that is represented by the current instance of . The parameter provides a dictionary through the property. The dictionary contains name/value pairs of information about the method call, such as the name of the method called and its parameters. @@ -761,7 +761,7 @@ method allows the current proxy instance to implement additional COM interfaces on behalf of the server object that the current instance represents. The current method generates the requested interface and returns a pointer to it. The types of COM interfaces that can be generated by this method depend on the proxy type, which in turn might depend on the type of the server object that the current proxy instance represents. + The method allows the current proxy instance to implement additional COM interfaces on behalf of the server object that the current instance represents. The current method generates the requested interface and returns a pointer to it. The types of COM interfaces that can be generated by this method depend on the proxy type, which in turn might depend on the type of the server object that the current proxy instance represents. For more information, see . diff --git a/xml/System.Runtime.Remoting.Services/EnterpriseServicesHelper.xml b/xml/System.Runtime.Remoting.Services/EnterpriseServicesHelper.xml index 7fed8219cfd..883b742ce1f 100644 --- a/xml/System.Runtime.Remoting.Services/EnterpriseServicesHelper.xml +++ b/xml/System.Runtime.Remoting.Services/EnterpriseServicesHelper.xml @@ -172,7 +172,7 @@ method is similar to the method, but does not attempt to maintain the identity of the unmanaged object. For example, two calls with the same `IUnknown` to the current method return two different RCWs, but two calls to the method with the same `IUnknown` return the same RCW. + The method is similar to the method, but does not attempt to maintain the identity of the unmanaged object. For example, two calls with the same `IUnknown` to the current method return two different RCWs, but two calls to the method with the same `IUnknown` return the same RCW. ]]> diff --git a/xml/System.Runtime.Remoting/ActivatedClientTypeEntry.xml b/xml/System.Runtime.Remoting/ActivatedClientTypeEntry.xml index 3d47d02d1a8..a235a842261 100644 --- a/xml/System.Runtime.Remoting/ActivatedClientTypeEntry.xml +++ b/xml/System.Runtime.Remoting/ActivatedClientTypeEntry.xml @@ -28,9 +28,9 @@ and it must be registered on the client by using the method. To obtain a proxy for a new instance of the client-activated object the client must first register a channel with and then activate the object by calling `new`. + To create an instance of a client-activated object on the client, you must know its and it must be registered on the client by using the method. To obtain a proxy for a new instance of the client-activated object the client must first register a channel with and then activate the object by calling `new`. - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client using the method. By calling you are giving the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server on which you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client using the method. By calling you are giving the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server on which you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client activated objects and remote object activation see [Activation of Remote Objects](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/cbzcxy2s(v=vs.100)). @@ -276,7 +276,7 @@ method. + The following code example shows a use of the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.ActivatedClientTypeEntry/CPP/activatedclienttypeentry_client.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ActivatedClientTypeEntry/Overview/activatedclienttypeentry_client.cs" id="Snippet5"::: diff --git a/xml/System.Runtime.Remoting/ActivatedServiceTypeEntry.xml b/xml/System.Runtime.Remoting/ActivatedServiceTypeEntry.xml index 2a45699ac7e..22efe711c18 100644 --- a/xml/System.Runtime.Remoting/ActivatedServiceTypeEntry.xml +++ b/xml/System.Runtime.Remoting/ActivatedServiceTypeEntry.xml @@ -28,11 +28,11 @@ method, which is the server-side counterpart of the method. The method is used on the server to allow remote activation by clients of specified object types. + The current class is used by the method, which is the server-side counterpart of the method. The method is used on the server to allow remote activation by clients of specified object types. - To create a client-activated object on the server, you must know its , and it must be registered on the server end by using the method. To obtain a proxy for a new client-activated object, the client must first register a channel with and then activate the object by calling `new` or . + To create a client-activated object on the server, you must know its , and it must be registered on the server end by using the method. To obtain a proxy for a new client-activated object, the client must first register a channel with and then activate the object by calling `new` or . - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client using the method. By calling you are giving the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client is necessary. To supply the method with the URL of the server on which you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client using the method. By calling you are giving the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client is necessary. To supply the method with the URL of the server on which you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client-activated objects and remote object activation, see [Activation of Remote Objects](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/cbzcxy2s(v=vs.100)). diff --git a/xml/System.Runtime.Remoting/IChannelInfo.xml b/xml/System.Runtime.Remoting/IChannelInfo.xml index 32045493bc5..5d1e6fa56a5 100644 --- a/xml/System.Runtime.Remoting/IChannelInfo.xml +++ b/xml/System.Runtime.Remoting/IChannelInfo.xml @@ -27,7 +27,7 @@ ## Remarks This interface is implemented by the property. It provides access to transport specific information contributed by the channels that are able to receive calls in the process or application domain where the object lives. This interface might also be used when building custom classes. - When an existing object instance is marshaled to produce a , the is copied from the channel (see ) for each registered channel and stored in the . When the is unmarshaled at its destination, the provided through the interface can be examined and used by corresponding channels in that process or application domain to create a transport message sink that manages the communication between the proxy and the server object. + When an existing object instance is marshaled to produce a , the is copied from the channel (see ) for each registered channel and stored in the . When the is unmarshaled at its destination, the provided through the interface can be examined and used by corresponding channels in that process or application domain to create a transport message sink that manages the communication between the proxy and the server object. ]]> diff --git a/xml/System.Runtime.Remoting/ObjRef.xml b/xml/System.Runtime.Remoting/ObjRef.xml index ea1ffcab202..19cbe6fb2f6 100644 --- a/xml/System.Runtime.Remoting/ObjRef.xml +++ b/xml/System.Runtime.Remoting/ObjRef.xml @@ -40,30 +40,30 @@ Stores all relevant information required to generate a proxy in order to communicate with a remote object. - is a serializable representation of an object that extends (MBR). A is used to transfer an object reference across a boundary. Creating a for an object is known as marshaling. You can create a (marshal a ) either explicitly, by registering the MBR object with the remoting infrastructure (see and ), or implicitly, by passing an MBR object as a parameter when calling a remote object. Remoting uses objects to store and transmit all the relevant information about the being remoted. - - The contains information that describes the and class of the object being marshaled, its exact location, and communication-related information on how to reach the remoting subdivision where the object is located. - - After a class implementing is marshaled, the that represents it is transferred through a channel into another application domain, possibly in another process or computer. When the is deserialized (see [XML and SOAP Serialization](/dotnet/standard/serialization/xml-and-soap-serialization)) in the target application domain, it is parsed to create a transparent proxy for the remote MBR object. This operation is known as unmarshaling. - - A transparent proxy is an object that provides the illusion that the actual object resides in the client's space. It achieves this by forwarding calls made on it to the real object using the remoting infrastructure. The transparent proxy is itself housed by an instance of a managed run-time class of type . The implements a part of the functionality needed to forward the operations from the transparent proxy. - - A proxy object can be used without regard to any remoting subdivisions within a . Applications need not distinguish between proxy references and object references. However, service providers dealing with issues such as activation, lifetime management, and transactions need to make such distinctions. - - This class makes a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). - - - -## Examples - The following code example demonstrates the use of a custom . To view the activation code that tests the custom , see the example for the method. - + is a serializable representation of an object that extends (MBR). A is used to transfer an object reference across a boundary. Creating a for an object is known as marshaling. You can create a (marshal a ) either explicitly, by registering the MBR object with the remoting infrastructure (see and ), or implicitly, by passing an MBR object as a parameter when calling a remote object. Remoting uses objects to store and transmit all the relevant information about the being remoted. + + The contains information that describes the and class of the object being marshaled, its exact location, and communication-related information on how to reach the remoting subdivision where the object is located. + + After a class implementing is marshaled, the that represents it is transferred through a channel into another application domain, possibly in another process or computer. When the is deserialized (see [XML and SOAP Serialization](/dotnet/standard/serialization/xml-and-soap-serialization)) in the target application domain, it is parsed to create a transparent proxy for the remote MBR object. This operation is known as unmarshaling. + + A transparent proxy is an object that provides the illusion that the actual object resides in the client's space. It achieves this by forwarding calls made on it to the real object using the remoting infrastructure. The transparent proxy is itself housed by an instance of a managed run-time class of type . The implements a part of the functionality needed to forward the operations from the transparent proxy. + + A proxy object can be used without regard to any remoting subdivisions within a . Applications need not distinguish between proxy references and object references. However, service providers dealing with issues such as activation, lifetime management, and transactions need to make such distinctions. + + This class makes a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). + + + +## Examples + The following code example demonstrates the use of a custom . To view the activation code that tests the custom , see the example for the method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef2/CPP/example.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/Overview/example.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjRef/Overview/example.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjRef/Overview/example.vb" id="Snippet1"::: + ]]> @@ -130,12 +130,12 @@ The of the object that the new instance will reference. Initializes a new instance of the class to reference a specified of a specified . - @@ -169,17 +169,17 @@ The contextual information about the source or destination of the exception. Initializes a new instance of the class from serialized data. - . - - - -## Examples + . + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: + ]]> @@ -211,17 +211,17 @@ Gets or sets the for the . The interface for the . - is created (see for details on marshaling). This information can be used by the channels in other processes or application domains to decide whether or not to create a transport sink to communicate with the object represented by the current instance. - - - -## Examples + is created (see for details on marshaling). This information can be used by the channels in other processes or application domains to decide whether or not to create a transport sink to communicate with the object represented by the current instance. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: + ]]> @@ -248,11 +248,11 @@ Gets or sets the for the . The interface for the . - bound object types only, and represents the groups of objects that provide such run-time services as transactions. - + bound object types only, and represents the groups of objects that provide such run-time services as transactions. + ]]> @@ -293,19 +293,19 @@ The contextual information about the source or destination of the serialization. Populates a specified with the data needed to serialize the current instance. - with all the data needed to recreate the . - - The current method is an implementation of . - - - -## Examples + with all the data needed to recreate the . + + The current method is an implementation of . + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: + ]]> The parameter is . @@ -346,17 +346,17 @@ Returns a reference to the remote object that the describes. A reference to the remote object that the describes. - The immediate caller does not have serialization formatter permission. @@ -391,12 +391,12 @@ Returns a Boolean value that indicates whether the current instance references an object located in the current . A Boolean value that indicates whether the current instance references an object located in the current . - @@ -433,12 +433,12 @@ Returns a Boolean value that indicates whether the current instance references an object located in the current process. A Boolean value that indicates whether the current instance references an object located in the current process. - @@ -464,17 +464,17 @@ Gets or sets the for the object that the describes. The for the object that the describes. - contains detailed information about the type of remote object represented by the current . The current property contains a list of interfaces that the type implements, as well as the type hierarchy. This information might be used to refine the proxy incrementally to adjust to the client's view of the remote object's type. - - - -## Examples + contains detailed information about the type of remote object represented by the current . The current property contains a list of interfaces that the type implements, as well as the type hierarchy. This information might be used to refine the proxy incrementally to adjust to the client's view of the remote object's type. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: + ]]> @@ -500,17 +500,17 @@ Gets or sets the URI of the specific object instance. The URI of the specific object instance. - diff --git a/xml/System.Runtime.Remoting/ObjectHandle.xml b/xml/System.Runtime.Remoting/ObjectHandle.xml index cec1f9af215..4899cafb437 100644 --- a/xml/System.Runtime.Remoting/ObjectHandle.xml +++ b/xml/System.Runtime.Remoting/ObjectHandle.xml @@ -54,20 +54,20 @@ Wraps marshal-by-value object references, allowing them to be returned through an indirection. - class is used to pass an object (in a wrapped state) between multiple application domains without loading the metadata for the wrapped object in each through which the travels. Thus, the class gives the caller control of when the of the remote object is loaded into a domain. - - - -## Examples - The following code example shows how to create an object in another , and retrieve a proxy to the object from a . In this example, you can assume that the code of the `MyType` class is compiled into an assembly called "ObjectHandleAssembly". - + class is used to pass an object (in a wrapped state) between multiple application domains without loading the metadata for the wrapped object in each through which the travels. Thus, the class gives the caller control of when the of the remote object is loaded into a domain. + + + +## Examples + The following code example shows how to create an object in another , and retrieve a proxy to the object from a . In this example, you can assume that the code of the `MyType` class is compiled into an assembly called "ObjectHandleAssembly". + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ObjectHandle/CPP/objecthandleassembly.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.vb" id="Snippet1"::: + ]]> @@ -184,15 +184,15 @@ Returns the wrapped object. The wrapped object. - , retrieve a proxy to it with the method, and use the proxy to access the remote object. - + , retrieve a proxy to it with the method, and use the proxy to access the remote object. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ObjectHandle/CPP/objecthandleassembly.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.vb" id="Snippet2"::: + ]]> diff --git a/xml/System.Runtime.Remoting/RemotingConfiguration.xml b/xml/System.Runtime.Remoting/RemotingConfiguration.xml index 1037d46d222..eac025ec91d 100644 --- a/xml/System.Runtime.Remoting/RemotingConfiguration.xml +++ b/xml/System.Runtime.Remoting/RemotingConfiguration.xml @@ -102,7 +102,7 @@ ## Examples - The following code example demonstrates the use of the property to indicate the name of the remoting application. For the full example code, see examples for the and methods. + The following code example demonstrates the use of the property to indicate the name of the remoting application. For the full example code, see examples for the and methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ServerActivation1/CPP/server.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/ApplicationName/server.cs" id="Snippet2"::: @@ -156,14 +156,14 @@ [!NOTE] -> is obsolete. Please use instead. +> is obsolete. Please use instead. Passing `null` as the `filename` parameter will cause default remoting initialization without requiring the existence of a configuration file. For configuration file syntax, see [Remoting Settings Schema](/previous-versions/dotnet/netframework-4.0/z415cf9a(v=vs.100)). > [!NOTE] -> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](/previous-versions/dotnet/netframework-4.0/23bk23zc(v=vs.100)). +> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](/previous-versions/dotnet/netframework-4.0/23bk23zc(v=vs.100)). ]]> @@ -209,7 +209,7 @@ For configuration file syntax, see [Remoting Settings Schema](https://msdn.microsoft.com/library/dc2d1e62-9af7-4ca1-99fd-98b93bb4db9e). > [!NOTE] -> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](https://msdn.microsoft.com/library/c72d561c-1266-4c8b-b258-2c168c08da9a). +> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](https://msdn.microsoft.com/library/c72d561c-1266-4c8b-b258-2c168c08da9a). ]]> @@ -818,9 +818,9 @@ and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new`. + To create an instance of a client-activated object on the server, you must know its and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new`. - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client-activated objects, see [Client Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/w93betdk(v=vs.100)). @@ -866,12 +866,12 @@ and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new`. + To create an instance of a client-activated object on the server, you must know its and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new`. - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. ## Examples - The following code example demonstrates registration of an object type on the client end as a type that can be activated on the server. For the server code that corresponds to the presented client code, see the example for the method. + The following code example demonstrates registration of an object type on the client end as a type that can be activated on the server. For the server code that corresponds to the presented client code, see the example for the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ClientActivation/CPP/client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/RegisterActivatedClientType/client.cs" id="Snippet1"::: @@ -928,9 +928,9 @@ and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new` or . + To create an instance of a client-activated object on the server, you must know its and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new` or . - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application, where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application, where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client-activated objects, see [Client Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/w93betdk(v=vs.100)). @@ -974,16 +974,16 @@ and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new` or . + To create an instance of a client-activated object on the server, you must know its and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new` or . - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application, where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application, where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client-activated objects, see [Client Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/w93betdk(v=vs.100)). ## Examples - The following code example demonstrates registration of an object type on the server as a type that can be activated by the client. For the client code that corresponds to the presented server code, see the example for the method. + The following code example demonstrates registration of an object type on the server as a type that can be activated by the client. For the client code that corresponds to the presented server code, see the example for the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ClientActivation/CPP/server.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/RegisterActivatedClientType/server.cs" id="Snippet2"::: @@ -1045,7 +1045,7 @@ , and activating the object by calling `new` or . To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. + Any client that knows the URI of a registered well-known object can obtain a proxy for the object by registering the channel it prefers with , and activating the object by calling `new` or . To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. For a detailed description of well-known objects, see [Server Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/y0h540a7(v=vs.100)). @@ -1091,14 +1091,14 @@ , and activating the object by calling `new` or . To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. + Any client that knows the URI of a registered well-known object can obtain a proxy for the object by registering the channel it prefers with , and activating the object by calling `new` or . To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. For a detailed description of well-known objects, see [Server Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/y0h540a7(v=vs.100)). ## Examples - The following code example demonstrates registration of an object type on the client end as a well-known type. For the server code that corresponds to the presented client code, see the example for the method. + The following code example demonstrates registration of an object type on the client end as a well-known type. For the server code that corresponds to the presented client code, see the example for the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ServerActivation1/CPP/client.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/ApplicationName/client.cs" id="Snippet5"::: @@ -1160,9 +1160,9 @@ , and activating the object by calling `new` or the method. To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. + Any client that knows the URI of a registered well-known object can obtain a proxy for the object by registering the channel it prefers with , and activating the object by calling `new` or the method. To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. - When the call arrives at the server, the .NET Framework extracts the URI from the message, examines the remoting tables to locate the reference for the object that matches the URI, and then instantiates the object if necessary, forwarding the method call to the object. If the object is registered as , it is destroyed after the method call is completed. A new instance of the object is created for each method called. The only difference between and `new` is that the former allows you to specify a URL as a parameter, and the latter obtains the URL from the configuration. + When the call arrives at the server, the .NET Framework extracts the URI from the message, examines the remoting tables to locate the reference for the object that matches the URI, and then instantiates the object if necessary, forwarding the method call to the object. If the object is registered as , it is destroyed after the method call is completed. A new instance of the object is created for each method called. The only difference between and `new` is that the former allows you to specify a URL as a parameter, and the latter obtains the URL from the configuration. The remote object itself is not instantiated by the registration process. This only happens when a client attempts to call a method on the object or activates the object from the client side. @@ -1219,9 +1219,9 @@ , and activating the object by calling `new` or the method. To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. + Any client that knows the URI of a registered well-known object can obtain a proxy for the object by registering the channel it prefers with , and activating the object by calling `new` or the method. To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. - When the call arrives at the server, the .NET Framework extracts the URI from the message, examines the remoting tables to locate the reference for the object that matches the URI, and then instantiates the object if necessary, forwarding the method call to the object. If the object is registered as , it is destroyed after the method call is completed. A new instance of the object is created for each method called. The only difference between and `new` is that the former allows you to specify a URL as a parameter, and the latter obtains the URL from the configuration. + When the call arrives at the server, the .NET Framework extracts the URI from the message, examines the remoting tables to locate the reference for the object that matches the URI, and then instantiates the object if necessary, forwarding the method call to the object. If the object is registered as , it is destroyed after the method call is completed. A new instance of the object is created for each method called. The only difference between and `new` is that the former allows you to specify a URL as a parameter, and the latter obtains the URL from the configuration. The remote object itself is not instantiated by the registration process. This only happens when a client attempts to call a method on the object or activates the object from the client side. @@ -1230,7 +1230,7 @@ ## Examples - The following code example demonstrates registration of an object type on the server as a well-known object type. For the client code that corresponds to the presented server code, see the example for the method. + The following code example demonstrates registration of an object type on the server as a well-known object type. For the client code that corresponds to the presented server code, see the example for the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ServerActivation1/CPP/server.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/ApplicationName/server.cs" id="Snippet1"::: diff --git a/xml/System.Runtime.Remoting/RemotingException.xml b/xml/System.Runtime.Remoting/RemotingException.xml index 93a7d0362f3..f8323f6bcda 100644 --- a/xml/System.Runtime.Remoting/RemotingException.xml +++ b/xml/System.Runtime.Remoting/RemotingException.xml @@ -34,7 +34,7 @@ ## Remarks uses the HRESULT COR_E_REMOTING, which has the value 0x8013150B. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. For a list of initial property values for an instance of , see the constructors. @@ -78,8 +78,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("")| +||`null`| +||The empty string ("")| ]]> @@ -114,8 +114,8 @@ |Property Type|Condition| |-------------------|---------------| -||`null`| -||The `message` string| +||`null`| +||The `message` string| ]]> @@ -193,8 +193,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.Remoting/RemotingServices.xml b/xml/System.Runtime.Remoting/RemotingServices.xml index 81f351e665f..0723eeb8c4f 100644 --- a/xml/System.Runtime.Remoting/RemotingServices.xml +++ b/xml/System.Runtime.Remoting/RemotingServices.xml @@ -94,7 +94,7 @@ ## Examples - The following code example demonstrates how to use the method to create a proxy to a well-known object. + The following code example demonstrates how to use the method to create a proxy to a well-known object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.BasicSample/CPP/basicclient.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/Connect/basicclient.cs" id="Snippet1"::: @@ -149,7 +149,7 @@ ## Remarks The returned proxy object points to an endpoint served by the specified well-known object. No messages are sent over the network until a method is called on the proxy. - The `data` object is used to communicate information to the channel, and is passed to the method. + The `data` object is used to communicate information to the channel, and is passed to the method. ]]> @@ -191,7 +191,7 @@ method to disconnect an object from the remoting channels. + The following code example demonstrates how to use the method to disconnect an object from the remoting channels. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.BasicSample/CPP/manualserver.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/Connect/manualserver.cs" id="Snippet2"::: @@ -245,7 +245,7 @@ ## Examples - The following code example demonstrates how to use the method to forward method calls to remote objects. + The following code example demonstrates how to use the method to forward method calls to remote objects. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.ExecuteMessage/CPP/serviceclass.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/ExecuteMessage/serviceclass.cs" id="Snippet1"::: @@ -339,7 +339,7 @@ ## Examples - The following code example demonstrates how to use the method to get a lifetime lease for the specified object. + The following code example demonstrates how to use the method to get a lifetime lease for the specified object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.TimerSample/CPP/timerclient.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/GetLifetimeService/timerclient.cs" id="Snippet1"::: @@ -396,7 +396,7 @@ , , and properties of and is used by classes implementing the interface. Consumers of classes should reference the property. + This determines the method base from the , , and properties of and is used by classes implementing the interface. Consumers of classes should reference the property. ]]> @@ -622,7 +622,7 @@ method is very useful in the pluggable parts of the remoting infrastructure (for example, channel sinks, dynamic sinks, and context sinks) that use objects, because the current method will return the associated type object from the URI. + Because remoting identifies endpoints using URIs, the method is very useful in the pluggable parts of the remoting infrastructure (for example, channel sinks, dynamic sinks, and context sinks) that use objects, because the current method will return the associated type object from the URI. @@ -911,7 +911,7 @@ ## Examples - The following code example demonstrates the use of the method to determine whether an object is a proxy or a real object. For the complete example code, see the example for the class. + The following code example demonstrates the use of the method to determine whether an object is a proxy or a real object. For the complete example code, see the example for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncResult.NewExamples/CPP/ad.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/IsTransparentProxy/ad.cs" id="Snippet6"::: @@ -1018,7 +1018,7 @@ A contains information that describes the and class of the object being marshaled, a URI that uniquely identifies the specific object instance, and communication related information about how to reach the remoting subdivision where the object is located. - During marshaling, the context from the current thread is used, not the context that was active when the object was created. If a URI was not explicitly set by the method, it is automatically generated by the remoting identity infrastructure. + During marshaling, the context from the current thread is used, not the context that was active when the object was created. If a URI was not explicitly set by the method, it is automatically generated by the remoting identity infrastructure. You cannot associate a URI with a proxy for one of two reasons: either the URI was generated at the server side for the object it represents, or the object is well known, in which case the URI is known. For this reason, if the `Obj` parameter is a proxy, an exception will be thrown. For custom proxies this restriction is relaxed because the transparent proxy is treated as the server object. @@ -1079,7 +1079,7 @@ ## Examples - The following code example demonstrates how to use the current method to marshal a specified object. + The following code example demonstrates how to use the current method to marshal a specified object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.BasicSample/CPP/manualserver.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/Connect/manualserver.cs" id="Snippet2"::: @@ -1138,7 +1138,7 @@ A contains information that describes the and class of the object being marshaled, a URI that uniquely identifies the specific object instance, and communication related information about how to reach the remoting subdivision where the object is located. - The specified is used by the remoting infrastructure to limit the scope of the exposed type hierarchy. For example, if object A derives from object B, which derives from object C, and is called, then the client can cast the proxy between C and B but not to A. + The specified is used by the remoting infrastructure to limit the scope of the exposed type hierarchy. For example, if object A derives from object B, which derives from object C, and is called, then the client can cast the proxy between C and B but not to A. During marshaling, the context from the current thread is used, not the context that was active when the object was created. @@ -1199,7 +1199,7 @@ ## Examples - The following code example demonstrates how to set the URI that will be used by the method when marshaling the specified object. + The following code example demonstrates how to set the URI that will be used by the method when marshaling the specified object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RemotingServices.SetObjectUriForMarshal/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System/MarshalByRefObject/Overview/source.cs" id="Snippet1"::: diff --git a/xml/System.Runtime.Remoting/RemotingTimeoutException.xml b/xml/System.Runtime.Remoting/RemotingTimeoutException.xml index 604c1991e6a..207e2f48b23 100644 --- a/xml/System.Runtime.Remoting/RemotingTimeoutException.xml +++ b/xml/System.Runtime.Remoting/RemotingTimeoutException.xml @@ -36,7 +36,7 @@ uses the HRESULT COR_E_REMOTING, which has the value 0x8013150B. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. For a list of initial property values for an instance of , see the constructors. @@ -80,8 +80,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||Localized error message for | +||`null`| +||Localized error message for | ]]> @@ -115,8 +115,8 @@ |Property Type|Condition| |-------------------|---------------| -||`null`| -||The `message` string| +||`null`| +||The `message` string| ]]> @@ -154,8 +154,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference| -||The error message string| +||The inner exception reference| +||The error message string| ]]> diff --git a/xml/System.Runtime.Remoting/ServerException.xml b/xml/System.Runtime.Remoting/ServerException.xml index e3f8d91726a..9dc74e3f9c0 100644 --- a/xml/System.Runtime.Remoting/ServerException.xml +++ b/xml/System.Runtime.Remoting/ServerException.xml @@ -34,7 +34,7 @@ ## Remarks uses the HRESULT COR_E_SERVER, which has the value 0x8013150E. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. For a list of initial property values for an instance of , see the constructors. @@ -78,8 +78,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("")| +||`null`| +||The empty string ("")| ]]> @@ -114,8 +114,8 @@ |Property Type|Condition| |-------------------|---------------| -||`null`| -||The `message` string| +||`null`| +||The `message` string| ]]> @@ -154,8 +154,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference| -||The error message string| +||The inner exception reference| +||The error message string| ]]> diff --git a/xml/System.Runtime.Remoting/SoapServices.xml b/xml/System.Runtime.Remoting/SoapServices.xml index df30dfeb19c..3bb08ca4bb6 100644 --- a/xml/System.Runtime.Remoting/SoapServices.xml +++ b/xml/System.Runtime.Remoting/SoapServices.xml @@ -291,7 +291,7 @@ and . + The current method returns values set up through and . @@ -342,7 +342,7 @@ and . + The current method returns values set up through and . @@ -391,7 +391,7 @@ has not been registered with any SOAPAction value, the method returns the SOAPAction automatically cached with the . + If the given has not been registered with any SOAPAction value, the method returns the SOAPAction automatically cached with the . diff --git a/xml/System.Runtime.Remoting/WellKnownClientTypeEntry.xml b/xml/System.Runtime.Remoting/WellKnownClientTypeEntry.xml index e7e1b3fcea4..3b154bd8302 100644 --- a/xml/System.Runtime.Remoting/WellKnownClientTypeEntry.xml +++ b/xml/System.Runtime.Remoting/WellKnownClientTypeEntry.xml @@ -30,7 +30,7 @@ ## Remarks Server-activated types can be either single call or singleton. If a class is registered as a single call type, a new instance is created each time a call from the client arrives. All calls to a singleton object are handled by one instance of that object, unless that object has been collected. - Any client that knows the URI of a registered server-activated object can obtain a proxy for this object by registering the channel it prefers with and activating the object by calling `new` or . To activate a server-activated object with `new`, you must first register the server-activated object type on the client using the method. By calling , you are giving the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate a server-activated object, you must supply it with the object's URL as an argument, so no prior registration on the client is necessary. + Any client that knows the URI of a registered server-activated object can obtain a proxy for this object by registering the channel it prefers with and activating the object by calling `new` or . To activate a server-activated object with `new`, you must first register the server-activated object type on the client using the method. By calling , you are giving the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate a server-activated object, you must supply it with the object's URL as an argument, so no prior registration on the client is necessary. For a detailed description of server-activated objects and remote object activation, see [Activation of Remote Objects](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/cbzcxy2s(v=vs.100)). @@ -216,7 +216,7 @@ is not `null`, it is returned at the end of the string. + If is not `null`, it is returned at the end of the string. ]]> diff --git a/xml/System.Runtime.Remoting/WellKnownObjectMode.xml b/xml/System.Runtime.Remoting/WellKnownObjectMode.xml index 08bdabee479..37b24eee498 100644 --- a/xml/System.Runtime.Remoting/WellKnownObjectMode.xml +++ b/xml/System.Runtime.Remoting/WellKnownObjectMode.xml @@ -28,11 +28,11 @@ Defines how well-known objects are activated. - method on the server side. - + method on the server side. + ]]> diff --git a/xml/System.Runtime.Remoting/WellKnownServiceTypeEntry.xml b/xml/System.Runtime.Remoting/WellKnownServiceTypeEntry.xml index 48bfb308791..5383555773d 100644 --- a/xml/System.Runtime.Remoting/WellKnownServiceTypeEntry.xml +++ b/xml/System.Runtime.Remoting/WellKnownServiceTypeEntry.xml @@ -30,7 +30,7 @@ ## Remarks Server-activated object types can be either single call or singleton. If an object type is single call, a new instance of it is created each time a call from the client comes in. All calls to a singleton object are handled by one instance of that object. - Any client that knows the URI of this object can obtain a proxy for this object by registering the channel it prefers with and activating the object by calling `new` or . + Any client that knows the URI of this object can obtain a proxy for this object by registering the channel it prefers with and activating the object by calling `new` or . It is important to note that the remote object itself is not created by the registration process. This only happens when a client attempts to call a method on the object or activates the object from the client side. diff --git a/xml/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.xml b/xml/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.xml index 61f9beb77b1..2087d015db4 100644 --- a/xml/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.xml +++ b/xml/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.xml @@ -128,8 +128,8 @@ This constructor sets the properties of the |`null`| -||A with a value that indicates that serialized data can be transmitted to or received from any of the other contexts. ()| +||`null`| +||A with a value that indicates that serialized data can be transmitted to or received from any of the other contexts. ()| ]]> diff --git a/xml/System.Runtime.Serialization.Formatters.Soap/SoapFormatter.xml b/xml/System.Runtime.Serialization.Formatters.Soap/SoapFormatter.xml index 93d90c69c68..189c0f3d8c9 100644 --- a/xml/System.Runtime.Serialization.Formatters.Soap/SoapFormatter.xml +++ b/xml/System.Runtime.Serialization.Formatters.Soap/SoapFormatter.xml @@ -35,7 +35,7 @@ The and interface allows the specification of two separate object graphs: the graph of objects to serialize, and an additional graph that contains an array of header objects that convey information about the remote function call (for example, transaction ID or a method signature). For proper serialization, the root object of the first graph must be an object that implements either the interface or the interface. -During deserialization of an RPC, a delegate is specified to the method of the formatter. The remoting infrastructure uses the delegate to produce an object that supports the interface. This object contains the information stored in the headers, and becomes the root of the graph returned by the deserializer. +During deserialization of an RPC, a delegate is specified to the method of the formatter. The remoting infrastructure uses the delegate to produce an object that supports the interface. This object contains the information stored in the headers, and becomes the root of the graph returned by the deserializer. The can also handle RPCs that are produced with objects that implement the interface. To create an RPC without using the functionality, place an object that supports the interface at the root of a graph being serialized. To deserialize an RPC created in this manner the property must be set to another object that supports the interface, and contains the relevant remote call information. @@ -84,8 +84,8 @@ TimeSpan objects are serialized according to the ISO 8601: 1998 section 5.5.3.2. |Property|Value| |--------------|-----------| -||`null`| -||A new initialized to specify that the serialized data can be transmitted to or received from any of the other contexts| +||`null`| +||A new initialized to specify that the serialized data can be transmitted to or received from any of the other contexts| diff --git a/xml/System.Runtime.Serialization.Json/DataContractJsonSerializer.xml b/xml/System.Runtime.Serialization.Json/DataContractJsonSerializer.xml index 75061ece293..9341dfb65e2 100644 --- a/xml/System.Runtime.Serialization.Json/DataContractJsonSerializer.xml +++ b/xml/System.Runtime.Serialization.Json/DataContractJsonSerializer.xml @@ -972,7 +972,7 @@ determines whether it can read a object by checking that it is positioned on an XML element. It also examines the name and namespace of the XML element that the reader is positioned at and compares the values to the expected name and namespace. The expected name can be set with the `rootName` value passed into the constructor (if present), or is "root" if absent. The expected namespace is the empty string. + The determines whether it can read a object by checking that it is positioned on an XML element. It also examines the name and namespace of the XML element that the reader is positioned at and compares the values to the expected name and namespace. The expected name can be set with the `rootName` value passed into the constructor (if present), or is "root" if absent. The expected namespace is the empty string. Note that this method is intended for advanced scenarios when working with XML mapped from JSON. @@ -1134,9 +1134,9 @@ . + This property can be set using a constructor. For a list, see . - The property specifies the maximum number of objects that the serializer serializes or deserializes in a single or method call. The method always reads one root object, but this object may have other objects in its data members. Those objects may have other objects. The default is . Note that when serializing or deserializing arrays, every array entry counts as a separate object. Also, note that some objects may have a large memory representation, so this quota alone may not be sufficient to prevent Denial of Service attacks. For more information, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). If you need to increase this quota beyond its default value, it is important to do so both on the sending (serializing) and receiving (deserializing) sides. It applies both when reading and writing data. + The property specifies the maximum number of objects that the serializer serializes or deserializes in a single or method call. The method always reads one root object, but this object may have other objects in its data members. Those objects may have other objects. The default is . Note that when serializing or deserializing arrays, every array entry counts as a separate object. Also, note that some objects may have a large memory representation, so this quota alone may not be sufficient to prevent Denial of Service attacks. For more information, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). If you need to increase this quota beyond its default value, it is important to do so both on the sending (serializing) and receiving (deserializing) sides. It applies both when reading and writing data. ]]> diff --git a/xml/System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.xml b/xml/System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.xml index cc938c85d0b..f888d08d8ae 100644 --- a/xml/System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.xml +++ b/xml/System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.xml @@ -52,11 +52,11 @@ Specifies the interface for initializing a JavaScript Object Notation (JSON) reader when reusing them to read from a particular stream or buffer. - objects created by one of the methods implement this interface and are initialized ready to read JSON-encoded data. But if a user wants to reuse the same object to read other JSON-encoded data, then the reader must be initialized to the second dataset to be read by using one of the methods. - + objects created by one of the methods implement this interface and are initialized ready to read JSON-encoded data. But if a user wants to reuse the same object to read other JSON-encoded data, then the reader must be initialized to the second dataset to be read by using one of the methods. + ]]> @@ -70,13 +70,13 @@ Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified stream or buffer that contains JSON-encoded data. - objects created by one of the methods implement this interface and are ready to read JSON-encoded data. But if a user wants to reuse the same object to read other JSON-encoded data, then the reader must be initialized to the second dataset to be read by using the one of the methods. - - The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. - + objects created by one of the methods implement this interface and are ready to read JSON-encoded data. But if a user wants to reuse the same object to read other JSON-encoded data, then the reader must be initialized to the second dataset to be read by using the one of the methods. + + The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. + ]]> @@ -147,15 +147,15 @@ Delegate to call when the reader is closed. Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified stream that contains JSON-encoded data. - object that reads JSON-encoded streams can be reused by calling the method to reinitialize it. - - The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if `null` is passed. - - The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. - + object that reads JSON-encoded streams can be reused by calling the method to reinitialize it. + + The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if `null` is passed. + + The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. + ]]> @@ -229,15 +229,15 @@ The delegate to call when the reader is closed. Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified buffer that contains JSON-encoded data. - object that reads a JSON-encoded buffered can be reused by calling the method to reinitialize it. - - The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if `null` is passed. - - The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. - + object that reads a JSON-encoded buffered can be reused by calling the method to reinitialize it. + + The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if `null` is passed. + + The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. + ]]> diff --git a/xml/System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.xml b/xml/System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.xml index d72235ad5bb..b5a0a923cf7 100644 --- a/xml/System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.xml +++ b/xml/System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.xml @@ -52,11 +52,11 @@ Specifies the interface for initializing a JavaScript Object Notation (JSON) writer when reusing them to write to a particular output stream. - objects created by the methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the method. - + objects created by the methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the method. + ]]> @@ -109,13 +109,13 @@ If , the output stream is closed by the writer when done; otherwise . Initializes (or reinitializes) a JavaScript Object Notation (JSON) writer to a specified output stream with specified character encoding. - objects created by the methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the method. - - The writers created by can handle the UTF-8 and the UTF-16 (big- or little-endian) encodings. - + objects created by the methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the method. + + The writers created by can handle the UTF-8 and the UTF-16 (big- or little-endian) encodings. + ]]> diff --git a/xml/System.Runtime.Serialization.Json/JsonReaderWriterFactory.xml b/xml/System.Runtime.Serialization.Json/JsonReaderWriterFactory.xml index 17a29a10444..209ef9c0131 100644 --- a/xml/System.Runtime.Serialization.Json/JsonReaderWriterFactory.xml +++ b/xml/System.Runtime.Serialization.Json/JsonReaderWriterFactory.xml @@ -58,11 +58,11 @@ Produces instances of that can read data encoded with JavaScript Object Notation (JSON) from a stream or buffer and map it to an XML Infoset and instances of that can map an XML Infoset to JSON and write JSON-encoded data to a stream. - class can be used to create the necessary XML readers and writers. Note that not every XML Infoset element can be mapped to JSON. For more information about mapping, see [How to: Serialize and Deserialize JSON Data](/dotnet/framework/wcf/feature-details/how-to-serialize-and-deserialize-json-data). - + class can be used to create the necessary XML readers and writers. Note that not every XML Infoset element can be mapped to JSON. For more information about mapping, see [How to: Serialize and Deserialize JSON Data](/dotnet/framework/wcf/feature-details/how-to-serialize-and-deserialize-json-data). + ]]> @@ -76,11 +76,11 @@ Creates an that can map - streams or buffers encoded with JavaScript Object Notation (JSON) to an XML Infoset. - to prevent Denial of Service (DoS) attacks when reading untrusted data. For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + to prevent Denial of Service (DoS) attacks when reading untrusted data. For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -132,13 +132,13 @@ Creates an that can map buffers encoded with JavaScript Object Notation (JSON) to an XML Infoset. An that can process JavaScript Object Notation (JSON) data. - parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. - - For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. + + For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -190,13 +190,13 @@ Creates an that can map streams encoded with JavaScript Object Notation (JSON) to an XML Infoset. An that can read JavaScript Object Notation (JSON). - parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. - - For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. + + For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -252,13 +252,13 @@ Creates an that can map buffers encoded with JavaScript Object Notation (JSON), of a specified size and offset, to an XML Infoset. An that can read JavaScript Object Notation (JSON). - parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. - - For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. + + For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -329,11 +329,11 @@ Creates an that can map streams encoded with JavaScript Object Notation (JSON), of a specified size and offset, to an XML Infoset. An that can read JavaScript Object Notation (JSON). - to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -408,11 +408,11 @@ Creates an that can map buffers encoded with JavaScript Object Notation (JSON), with a specified size and offset and character encoding, to an XML Infoset. An that can read JavaScript Object Notation (JSON). - to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -426,11 +426,11 @@ Creates an that writes data encoded with JSON to a stream. - static method returns an instance of an that can map an XML Infoset to a JSON stream. The is not guaranteed to produce valid JSON. If it is used in a way not supported by the JSON-XML mapping, it may either throw an exception or write an invalid JSON document. - + static method returns an instance of an that can map an XML Infoset to a JSON stream. The is not guaranteed to produce valid JSON. If it is used in a way not supported by the JSON-XML mapping, it may either throw an exception or write an invalid JSON document. + ]]> @@ -480,11 +480,11 @@ Creates an that writes data encoded with JSON to a stream. An that writes data encoded with JSON to the stream based on an XML Infoset. - @@ -536,11 +536,11 @@ Creates an that writes data encoded with JSON to a stream with a specified character encoding. An that writes data encoded with JSON to the stream based on an XML Infoset. - diff --git a/xml/System.Runtime.Serialization/CollectionDataContractAttribute.xml b/xml/System.Runtime.Serialization/CollectionDataContractAttribute.xml index d5af14ad151..f8eb505dcb9 100644 --- a/xml/System.Runtime.Serialization/CollectionDataContractAttribute.xml +++ b/xml/System.Runtime.Serialization/CollectionDataContractAttribute.xml @@ -63,19 +63,19 @@ ## Remarks The is intended to ease interoperability when working with data from non-WCF providers and to control the exact shape of serialized instances. To this end, the property enables you to control the names of the repeating items inside a collection. This is especially useful when the provider does not use the XML element type name as the array item name, for example, if a provider uses "String" as an element type name instead of the XSD type name "string". - The is also intended to be used with dictionary types to handle keyed collections. Dictionary types are classes that implement either the or the interface, for example, the . Use the and properties to set custom names when using the class. + The is also intended to be used with dictionary types to handle keyed collections. Dictionary types are classes that implement either the or the interface, for example, the . Use the and properties to set custom names when using the class. For more information about using the , see [Using Data Contracts](/dotnet/framework/wcf/feature-details/using-data-contracts). ## Examples - The following example applies the to a class that inherits from the class. The code sets the and properties to custom values. + The following example applies the to a class that inherits from the class. The code sets the and properties to custom values. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/collectiondatacontractattribute/cs/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/collectiondatacontractattribute/vb/source.vb" id="Snippet1"::: - When the [ServiceModel Metadata Utility Tool (Svcutil.exe)](/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe) is used to generate code for the client, the code resembles the following example. Notice that the name of the class is changed, as well as the . When using generics, the type parameter name is used to create the resulting type name. + When the [ServiceModel Metadata Utility Tool (Svcutil.exe)](/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe) is used to generate code for the client, the code resembles the following example. Notice that the name of the class is changed, as well as the . When using generics, the type parameter name is used to create the resulting type name. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/collectiondatacontractattribute/cs/source.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/collectiondatacontractattribute/vb/source.vb" id="Snippet2"::: diff --git a/xml/System.Runtime.Serialization/DataContractAttribute.xml b/xml/System.Runtime.Serialization/DataContractAttribute.xml index 22045702da8..bf97a651270 100644 --- a/xml/System.Runtime.Serialization/DataContractAttribute.xml +++ b/xml/System.Runtime.Serialization/DataContractAttribute.xml @@ -60,7 +60,7 @@ For more information about this API, see Supplemental API remarks for DataContractAttribute. has been applied. Note that the and properties have been set to values that override the default settings. +The following example serializes and deserializes a class named `Person` to which the has been applied. Note that the and properties have been set to values that override the default settings. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractattribute/cs/overview.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractattribute/vb/overview.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.Serialization/DataContractResolver.xml b/xml/System.Runtime.Serialization/DataContractResolver.xml index 20754042e9a..c7f1def684d 100644 --- a/xml/System.Runtime.Serialization/DataContractResolver.xml +++ b/xml/System.Runtime.Serialization/DataContractResolver.xml @@ -53,21 +53,21 @@ Provides a mechanism for dynamically mapping types to and from representations during serialization and deserialization. - [!WARNING] -> Only use if you are completely sure of what information is being serialized. Malicious types can cause unexpected behavior. - - - -## Examples - The following example shows how to derive a class from . For a working sample, see [DataContractResolver](/dotnet/framework/wcf/samples/datacontractresolver). - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet2"::: - +> Only use if you are completely sure of what information is being serialized. Malicious types can cause unexpected behavior. + + + +## Examples + The following example shows how to derive a class from . For a working sample, see [DataContractResolver](/dotnet/framework/wcf/samples/datacontractresolver). + + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet2"::: + ]]> @@ -185,18 +185,18 @@ Override this method to map the specified name and namespace to a data contract type during deserialization. The type the name and namespace is mapped to. - method. - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet0"::: - + method. + + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet0"::: + ]]> @@ -279,18 +279,18 @@ if mapping succeeded; otherwise, . - method. - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet1"::: - + method. + + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.Serialization/DataContractSerializer.xml b/xml/System.Runtime.Serialization/DataContractSerializer.xml index e681953e3c9..56e119fabf0 100644 --- a/xml/System.Runtime.Serialization/DataContractSerializer.xml +++ b/xml/System.Runtime.Serialization/DataContractSerializer.xml @@ -416,7 +416,7 @@ that specifies the type to serialize or deserialize as well as the XML name and namespace to read from or write to the XML document. The code also creates an instance of a to contain the known types used during serialization or deserialization. + The following example creates an instance of the that specifies the type to serialize or deserialize as well as the XML name and namespace to read from or write to the XML document. The code also creates an instance of a to contain the known types used during serialization or deserialization. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet12"::: @@ -485,7 +485,7 @@ that specifies the type to serialize or deserialize as well as the XML name and namespace (as objects) to read from or write to the XML document. The code also creates an instance of a to contain the known types used during serialization or deserialization. + The following example creates an instance of the that specifies the type to serialize or deserialize as well as the XML name and namespace (as objects) to read from or write to the XML document. The code also creates an instance of a to contain the known types used during serialization or deserialization. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet13"::: @@ -537,7 +537,7 @@ that specifies the type to serialize or deserialize and an instance of a to contain the known types used during serialization or deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. + The following example creates an instance of the that specifies the type to serialize or deserialize and an instance of a to contain the known types used during serialization or deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet14"::: @@ -649,7 +649,7 @@ that specifies the type to serialize or deserialize, the root XML element and namespace, and an instance of a that contains the types used during deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. + The following example creates an instance of the that specifies the type to serialize or deserialize, the root XML element and namespace, and an instance of a that contains the types used during deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet15"::: @@ -711,7 +711,7 @@ that specifies the type to serialize or deserialize, the root XML element and namespace (as parameters), and an instance of a that contains the types used during deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. + The following example creates an instance of the that specifies the type to serialize or deserialize, the root XML element and namespace (as parameters), and an instance of a that contains the types used during deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet16"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet16"::: @@ -1032,7 +1032,7 @@ determines whether it can read an object by checking that it is positioned on an XML element. It also examines the name and namespace of the XML element that the reader is positioned at and compares the values to the expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). + The determines whether it can read an object by checking that it is positioned on an XML element. It also examines the name and namespace of the XML element that the reader is positioned at and compares the values to the expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). @@ -1148,7 +1148,7 @@ property provides the set of known types that are used for serialization and deserialization. For example, if an instance of the class contains instances of a `Person` class, add the `Person` type to an instance of the class and use the instance to construct an instance of the . If you know of other types to add to the , then add those types to the collection. + The property provides the set of known types that are used for serialization and deserialization. For example, if an instance of the class contains instances of a `Person` class, add the `Person` type to an instance of the class and use the instance to construct an instance of the . If you know of other types to add to the , then add those types to the collection. ]]> @@ -1216,7 +1216,7 @@ OperationDescription operation = host.Description.Endpoints[0].Contract.Operatio operation.Behaviors.Find().MaxItemsInObjectGraph = 3; ``` - The property specifies the maximum number of objects that the serializer serializes or deserializes in a single method call. (The method always reads one root object, but this object may have other objects in its data members. Those objects may have other objects, and so on.) The default is . Note that when serializing or deserializing arrays, every array entry counts as a separate object. Also, note that some objects may have a large memory representation and so this quota alone may not be sufficient to prevent Denial of Service attacks. For more information, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). If you need to increase this quota beyond its default value, it is important to do so both on the sending (serializing) and receiving (deserializing) sides. It applies both when reading and writing data. + The property specifies the maximum number of objects that the serializer serializes or deserializes in a single method call. (The method always reads one root object, but this object may have other objects in its data members. Those objects may have other objects, and so on.) The default is . Note that when serializing or deserializing arrays, every array entry counts as a separate object. Also, note that some objects may have a large memory representation and so this quota alone may not be sufficient to prevent Denial of Service attacks. For more information, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). If you need to increase this quota beyond its default value, it is important to do so both on the sending (serializing) and receiving (deserializing) sides. It applies both when reading and writing data. ]]> @@ -1646,7 +1646,7 @@ operation.Behaviors.Find().MaxItemsInOb , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. Making these calls is equivalent to making a single call of the method. For example, a user might make the calls separately to insert additional XML attributes into the XML after calling the method. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. Making these calls is equivalent to making a single call of the method. For example, a user might make the calls separately to insert additional XML attributes into the XML after calling the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet7"::: @@ -1935,7 +1935,7 @@ operation.Behaviors.Find().MaxItemsInOb , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet7"::: @@ -2091,7 +2091,7 @@ operation.Behaviors.Find().MaxItemsInOb , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet7"::: diff --git a/xml/System.Runtime.Serialization/ExtensionDataObject.xml b/xml/System.Runtime.Serialization/ExtensionDataObject.xml index d11abb6f659..bbae92ae7fa 100644 --- a/xml/System.Runtime.Serialization/ExtensionDataObject.xml +++ b/xml/System.Runtime.Serialization/ExtensionDataObject.xml @@ -53,7 +53,7 @@ ## Examples - The following code serializes an instance of a type (`PersonVersion2`) that is the second version of the serializable type (`Person`). The second version contains extra data (`ID` field) that is not present in the first version. The code then deserializes the XML document into a `Person` object, then immediately reserializes the object including the extra data. Finally, the code deserializes the new XML into a `PersonVersion2` object and writes the complete data to the console, proving that the data has made a round trip to and from an older version of the type. Note that the attribute must be applied with the and properties set to the same name and namespace as the original class. + The following code serializes an instance of a type (`PersonVersion2`) that is the second version of the serializable type (`Person`). The second version contains extra data (`ID` field) that is not present in the first version. The code then deserializes the XML document into a `Person` object, then immediately reserializes the object including the extra data. Finally, the code deserializes the new XML into a `PersonVersion2` object and writes the complete data to the console, proving that the data has made a round trip to and from an older version of the type. Note that the attribute must be applied with the and properties set to the same name and namespace as the original class. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/iunknownserializationdata/cs/iunknownserialization.cs" id="Snippet0"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/iunknownserializationdata/vb/iunknownserialization.vb" id="Snippet0"::: diff --git a/xml/System.Runtime.Serialization/Formatter.xml b/xml/System.Runtime.Serialization/Formatter.xml index 757bc903908..4ef660f817f 100644 --- a/xml/System.Runtime.Serialization/Formatter.xml +++ b/xml/System.Runtime.Serialization/Formatter.xml @@ -72,60 +72,60 @@ Provides base functionality for the common language runtime serialization formatters. - is the `abstract` base class for all runtime serialization formatters, and provides some helper methods for implementing the interface. The also manages queuing objects for serialization and generating IDs on a per-object basis. - + is the `abstract` base class for all runtime serialization formatters, and provides some helper methods for implementing the interface. The also manages queuing objects for serialization and generating IDs on a per-object basis. + ]]> - When you inherit from , you must override the following members: - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - + When you inherit from , you must override the following members: + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + - @@ -167,11 +167,11 @@ Initializes a new instance of the class. - for objects to serialize and a to generate IDs for them. - + for objects to serialize and a to generate IDs for them. + ]]> @@ -226,11 +226,11 @@ When overridden in a derived class, gets or sets the used with the current formatter. The used with the current formatter. - performs lookups for types from the type names passed during deserialization. If no is set, a default is used. - + performs lookups for types from the type names passed during deserialization. If no is set, a default is used. + ]]> @@ -280,11 +280,11 @@ When overridden in a derived class, gets or sets the used for the current serialization. The used for the current serialization. - is an indication of either the source of the bits being deserialized or the destination of the bits being serialized. It has no impact on default serialization, but is passed as an argument to and . - + is an indication of either the source of the bits being deserialized or the destination of the bits being serialized. It has no impact on default serialization, but is passed as an argument to and . + ]]> @@ -406,11 +406,11 @@ Returns the next object to serialize, from the formatter's internal work queue. The next object to serialize. - . The ID of the object is put into the `objID` parameter and the object is returned from the function. - + . The ID of the object is put into the `objID` parameter and the object is returned from the function. + ]]> The next object retrieved from the work queue did not have an assigned ID. @@ -459,11 +459,11 @@ Contains the used with the current formatter. - maintains a list of the objects that have been identified and the IDs that they were given. - + maintains a list of the objects that have been identified and the IDs that they were given. + ]]> @@ -510,11 +510,11 @@ Contains a of the objects left to serialize. - method are pushed on the queue. - + method are pushed on the queue. + ]]> @@ -564,11 +564,11 @@ Schedules an object for later serialization. The object ID assigned to the object. - obtains an ID for the object and puts it on the queue for later serialization if this is a new object ID. The schedule is a work queue of objects to serialize, and is held inside the formatter. If the object is already on the work queue, it will not be added a second time, but an exception will not be thrown either. - + obtains an ID for the object and puts it on the queue for later serialization if this is a new object ID. The schedule is a work queue of objects to serialize, and is held inside the formatter. If the object is already on the work queue, it will not be added a second time, but an exception will not be thrown either. + ]]> @@ -690,13 +690,13 @@ When overridden in a derived class, gets or sets the used with the current formatter. The used with the current formatter. - to look up implementations of that control the serialization of a particular type. - - If an object type has a matching surrogate, then serialization and deserialization are handed off to the surrogate even if the type implements the interface. - + to look up implementations of that control the serialization of a particular type. + + If an object type has a matching surrogate, then serialization and deserialization are handed off to the surrogate even if the type implements the interface. + ]]> @@ -1250,11 +1250,11 @@ The object to write to the stream attached to the formatter. Inspects the type of data received, and calls the appropriate method to perform the write to the stream already attached to the formatter. - method, method, method, and so on) should have the appropriate functionality. - + method, method, method, and so on) should have the appropriate functionality. + ]]> @@ -1313,11 +1313,11 @@ The type of object the reference points to. When overridden in a derived class, writes an object reference to the stream already attached to the formatter. - diff --git a/xml/System.Runtime.Serialization/FormatterConverter.xml b/xml/System.Runtime.Serialization/FormatterConverter.xml index efbde7226c7..d41f6cec504 100644 --- a/xml/System.Runtime.Serialization/FormatterConverter.xml +++ b/xml/System.Runtime.Serialization/FormatterConverter.xml @@ -260,11 +260,11 @@ Converts a value to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and .) - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and .) + ]]> The parameter is . @@ -316,11 +316,11 @@ Converts a value to an 8-bit unsigned integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , and . + ]]> The parameter is . @@ -372,11 +372,11 @@ Converts a value to a Unicode character. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -428,11 +428,11 @@ Converts a value to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -484,11 +484,11 @@ Converts a value to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -540,11 +540,11 @@ Converts a value to a double-precision floating-point number. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -596,11 +596,11 @@ Converts a value to a 16-bit signed integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -652,11 +652,11 @@ Converts a value to a 32-bit signed integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -708,11 +708,11 @@ Converts a value to a 64-bit signed integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -770,11 +770,11 @@ Converts a value to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -826,11 +826,11 @@ Converts a value to a single-precision floating-point number. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -889,11 +889,11 @@ Converts the specified object to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -951,11 +951,11 @@ Converts a value to a 16-bit unsigned integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -1013,11 +1013,11 @@ Converts a value to a 32-bit unsigned integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -1075,11 +1075,11 @@ Converts a value to a 64-bit unsigned integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . diff --git a/xml/System.Runtime.Serialization/FormatterServices.xml b/xml/System.Runtime.Serialization/FormatterServices.xml index 47933ddbaca..25574513bf1 100644 --- a/xml/System.Runtime.Serialization/FormatterServices.xml +++ b/xml/System.Runtime.Serialization/FormatterServices.xml @@ -187,7 +187,7 @@ method extracts the value associated with the `obj` object, and returns it. The length of the returned array is the same as the length of the `members` array. + For each supplied member of the `members` array the method extracts the value associated with the `obj` object, and returns it. The length of the returned array is the same as the length of the `members` array. ]]> @@ -256,9 +256,9 @@ should only be used for deserialization when the user intends to immediately populate all fields. It does not create an uninitialized string, since creating an empty instance of an immutable type serves no purpose. + Because the new instance of the object is initialized to zero and no constructors are run, the object might not represent a state that is regarded as valid by that object. should only be used for deserialization when the user intends to immediately populate all fields. It does not create an uninitialized string, since creating an empty instance of an immutable type serves no purpose. - converts all class level [Link Demands](/dotnet/framework/misc/link-demands) to [Demands](https://msdn.microsoft.com/library/e5283e28-2366-4519-b27d-ef5c1ddc1f48) to ensure that all direct and indirect callers have the permissions that the demand specifies. Use to increase the level of security when deserializing from a partially trusted source. For better performance in full trust scenarios, use . + converts all class level [Link Demands](/dotnet/framework/misc/link-demands) to [Demands](https://msdn.microsoft.com/library/e5283e28-2366-4519-b27d-ef5c1ddc1f48) to ensure that all direct and indirect callers have the permissions that the demand specifies. Use to increase the level of security when deserializing from a partially trusted source. For better performance in full trust scenarios, use . ]]> @@ -338,7 +338,7 @@ ## Remarks Generally, the serializable members of a class are non-transient, non-static members such as fields and properties. To be included, properties must have both a getter and a setter. A class that implements the interface or has a serialization surrogate does not have to serialize all these members, or can serialize additional members. -Because the `GetSerializableMembers` method calls the method, it does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned. +Because the `GetSerializableMembers` method calls the method, it does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned. ]]> @@ -414,7 +414,7 @@ Because the `GetSerializableMembers` method calls the enumeration value, transient fields are also included in the array returned by this method. -Because the `GetSerializableMembers` method calls the method, it does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned. +Because the `GetSerializableMembers` method calls the method, it does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned. ]]> @@ -608,7 +608,7 @@ Because the `GetSerializableMembers` method calls the [!NOTE] -> You cannot use the method to create instances of types that derive from the class. +> You cannot use the method to create instances of types that derive from the class. ]]> @@ -680,7 +680,7 @@ Because the `GetSerializableMembers` method calls the does not write anything to that field. + If an element in `data` is `null`, does not write anything to that field. ]]> diff --git a/xml/System.Runtime.Serialization/IDataContractSurrogate.xml b/xml/System.Runtime.Serialization/IDataContractSurrogate.xml index b576c1034d2..4125a265ab6 100644 --- a/xml/System.Runtime.Serialization/IDataContractSurrogate.xml +++ b/xml/System.Runtime.Serialization/IDataContractSurrogate.xml @@ -135,7 +135,7 @@ method. + The following example shows an implementation of the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/idatacontractsurrogate/cs/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/idatacontractsurrogate/vb/source.vb" id="Snippet1"::: @@ -178,7 +178,7 @@ ## Examples - The following example shows an implementation of the method. + The following example shows an implementation of the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/idatacontractsurrogate/cs/source.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/idatacontractsurrogate/vb/source.vb" id="Snippet3"::: @@ -213,7 +213,7 @@ method. + This method is required during schema export or schema import only if annotations are inserted into the schema using the method. ]]> @@ -253,7 +253,7 @@ ## Examples - The following example shows an implementation of the method. + The following example shows an implementation of the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/idatacontractsurrogate/cs/source.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/idatacontractsurrogate/vb/source.vb" id="Snippet2"::: @@ -298,7 +298,7 @@ ## Examples - The following example shows an implementation of the method. + The following example shows an implementation of the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/idatacontractsurrogate/cs/source.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/idatacontractsurrogate/vb/source.vb" id="Snippet4"::: diff --git a/xml/System.Runtime.Serialization/IFormatter.xml b/xml/System.Runtime.Serialization/IFormatter.xml index faacfbda3d0..fa37c526c14 100644 --- a/xml/System.Runtime.Serialization/IFormatter.xml +++ b/xml/System.Runtime.Serialization/IFormatter.xml @@ -53,13 +53,13 @@ Provides functionality for formatting serialized objects. - architecture. - - Objects controlling their own serialization can do so by implementing the interface. In order for an object to be serialized, you must mark that object as being serializable. You can do this by applying the serializable attribute to a class. If any object in the graph is not serializable, serialization will fail. - + architecture. + + Objects controlling their own serialization can do so by implementing the interface. In order for an object to be serialized, you must mark that object as being serializable. You can do this by applying the serializable attribute to a class. If any object in the graph is not serializable, serialization will fail. + ]]> @@ -110,13 +110,13 @@ Gets or sets the that performs type lookups during deserialization. The that performs type lookups during deserialization. - method on the . This method resolves these parameters to a object. The binder can find a at deserialization time that is in a different assembly than it was at serialization time. - - Setting this property has no effect during serialization. - + method on the . This method resolves these parameters to a object. The binder can find a at deserialization time that is in a different assembly than it was at serialization time. + + Setting this property has no effect during serialization. + ]]> @@ -160,11 +160,11 @@ Gets or sets the used for serialization and deserialization. The used for serialization and deserialization. - or . The indicates the destination (during serialization) or the source (during deserialization) of the data. An object implementing can alter the data that it transmits depending on value of the . - + or . The indicates the destination (during serialization) or the source (during deserialization) of the data. An object implementing can alter the data that it transmits depending on value of the . + ]]> @@ -230,13 +230,13 @@ Deserializes the data on the provided stream and reconstitutes the graph of objects. The top object of the deserialized graph. - method reads graph information from the stream and reconstructs a clone of the original graph. The topology of the graph is preserved. - - The deserialization process allocates an empty object of the appropriate type and repopulates its fields from the data transmitted in the `serializationStream` stream. It is important to note that no constructor is ever called on the object during deserialization. - + method reads graph information from the stream and reconstructs a clone of the original graph. The topology of the graph is preserved. + + The deserialization process allocates an empty object of the appropriate type and repopulates its fields from the data transmitted in the `serializationStream` stream. It is important to note that no constructor is ever called on the object during deserialization. + ]]> XML and SOAP Serialization @@ -300,13 +300,13 @@ The object, or root of the object graph, to serialize. All child objects of this root object are automatically serialized. Serializes an object, or graph of objects with the given root to the provided stream. - method automatically serializes the provided objects, and all objects connected to it, to the provided stream. - - By default, the serialization process records an object's state by gathering the values of all its fields (public and private). These fields are saved to the stream along with information about the object such as the name qualified by the assembly for its type. - + method automatically serializes the provided objects, and all objects connected to it, to the provided stream. + + By default, the serialization process records an object's state by gathering the values of all its fields (public and private). These fields are saved to the stream along with information about the object such as the name qualified by the assembly for its type. + ]]> XML and SOAP Serialization @@ -352,11 +352,11 @@ Gets or sets the used by the current formatter. The used by this formatter. - allows the user to specify an object best suited to handle the serialization of a particular object or class of objects. Think of it as an implementation of but provided by a different object. - + allows the user to specify an object best suited to handle the serialization of a particular object or class of objects. Think of it as an implementation of but provided by a different object. + ]]> diff --git a/xml/System.Runtime.Serialization/IObjectReference.xml b/xml/System.Runtime.Serialization/IObjectReference.xml index 07ae90e8bd4..9b8bed2141e 100644 --- a/xml/System.Runtime.Serialization/IObjectReference.xml +++ b/xml/System.Runtime.Serialization/IObjectReference.xml @@ -109,13 +109,13 @@ Returns the real object that should be deserialized, rather than the object that the serialized stream specifies. The actual object that is put into the graph. - method. At this point, the proxy-creator object creates a new instance of the proxy object that refers back to the original actual object, perhaps on a remote computer. Finally, the proxy-creator object is discarded and reclaimed later by garbage collection. - - For example, consider how objects are serialized. Instead of transmitting the data from the object, the system transmits a holder object with the name of the type object and information on the assembly where it is found in an object implementing . When both the type name and assembly name are available, the deserialization infrastructure calls on the holder object that has been transmitted. This holder returns the object that is inserted into the graph. - + method. At this point, the proxy-creator object creates a new instance of the proxy object that refers back to the original actual object, perhaps on a remote computer. Finally, the proxy-creator object is discarded and reclaimed later by garbage collection. + + For example, consider how objects are serialized. Instead of transmitting the data from the object, the system transmits a holder object with the name of the type object and information on the assembly where it is found in an object implementing . When both the type name and assembly name are available, the deserialization infrastructure calls on the holder object that has been transmitted. This holder returns the object that is inserted into the graph. + ]]> The caller does not have the required permission. The call will not work on a medium trusted server. diff --git a/xml/System.Runtime.Serialization/ISafeSerializationData.xml b/xml/System.Runtime.Serialization/ISafeSerializationData.xml index 83ede18a4fb..f29d89dc147 100644 --- a/xml/System.Runtime.Serialization/ISafeSerializationData.xml +++ b/xml/System.Runtime.Serialization/ISafeSerializationData.xml @@ -51,9 +51,9 @@ method. Starting with .NET Framework 4.0, that method is marked with the attribute, which prevents execution in security-transparent code. To work around this condition, implement the interface and add custom data as shown in the example below. + In versions previous to.NET Framework 4.0, serialization of custom user data in a security transparent code was accomplished using the method. Starting with .NET Framework 4.0, that method is marked with the attribute, which prevents execution in security-transparent code. To work around this condition, implement the interface and add custom data as shown in the example below. - The method is called after serialization, and uses the to restore the custom data. + The method is called after serialization, and uses the to restore the custom data. ]]> diff --git a/xml/System.Runtime.Serialization/ISerializable.xml b/xml/System.Runtime.Serialization/ISerializable.xml index 0ca5b719ca2..f12da19c41d 100644 --- a/xml/System.Runtime.Serialization/ISerializable.xml +++ b/xml/System.Runtime.Serialization/ISerializable.xml @@ -66,28 +66,28 @@ Allows an object to control its own serialization and deserialization through binary and XML serialization. - . If a class needs to control its binary or XML serialization process, it can implement the interface. The calls the at serialization time and populates the supplied with all the data required to represent the object. The creates a with the type of the object in the graph. Objects that need to send proxies for themselves can use the and methods on to change the transmitted information. - - In the case of class inheritance, it is possible to serialize a class that derives from a base class that implements . In this case, the derived class should call the base class implementation of inside its implementation of . Otherwise, the data from the base class will not be serialized. - - The interface implies a constructor with the signature `constructor (SerializationInfo information, StreamingContext context)`. At deserialization time, the current constructor is called only after the data in the has been deserialized by the formatter. In general, this constructor should be `protected` if the class is not `sealed`. - - The order in which objects are deserialized cannot be guaranteed. For example, if one type references a type that has not been deserialized yet, an exception will occur. If you are creating types that have such dependencies, you can work around the problem by implementing the `IDeserializationCallback` interface and the `OnDeserialization` method. - - The serialization architecture handles object types that extend the same as types that extend . These types can be marked with the and implement the interface as any other object type. Their object state will be captured and persisted onto the stream. - - When these types are being used through , the remoting infrastructure provides a surrogate that preempts typical serialization and instead serializes a proxy to the . A surrogate is a helper that knows how to serialize and deserialize objects of a particular type. The proxy, invisible to the user in most cases, will be of type . - - As a general design pattern, it would be unusual for a class to be both marked with the serializable attribute and extend . Developers should think carefully about the possible serialization and remoting scenarios when combining these two characteristics. One example where this might be applicable is with a . While the base class of () extends from , it is possible to capture the state of a and restore it at will. It might, therefore, be meaningful to serialize the state of this stream into a database and restore it at some later point in time. However, when used through remoting, an object of this type would be proxied. - + . If a class needs to control its binary or XML serialization process, it can implement the interface. The calls the at serialization time and populates the supplied with all the data required to represent the object. The creates a with the type of the object in the graph. Objects that need to send proxies for themselves can use the and methods on to change the transmitted information. + + In the case of class inheritance, it is possible to serialize a class that derives from a base class that implements . In this case, the derived class should call the base class implementation of inside its implementation of . Otherwise, the data from the base class will not be serialized. + + The interface implies a constructor with the signature `constructor (SerializationInfo information, StreamingContext context)`. At deserialization time, the current constructor is called only after the data in the has been deserialized by the formatter. In general, this constructor should be `protected` if the class is not `sealed`. + + The order in which objects are deserialized cannot be guaranteed. For example, if one type references a type that has not been deserialized yet, an exception will occur. If you are creating types that have such dependencies, you can work around the problem by implementing the `IDeserializationCallback` interface and the `OnDeserialization` method. + + The serialization architecture handles object types that extend the same as types that extend . These types can be marked with the and implement the interface as any other object type. Their object state will be captured and persisted onto the stream. + + When these types are being used through , the remoting infrastructure provides a surrogate that preempts typical serialization and instead serializes a proxy to the . A surrogate is a helper that knows how to serialize and deserialize objects of a particular type. The proxy, invisible to the user in most cases, will be of type . + + As a general design pattern, it would be unusual for a class to be both marked with the serializable attribute and extend . Developers should think carefully about the possible serialization and remoting scenarios when combining these two characteristics. One example where this might be applicable is with a . While the base class of () extends from , it is possible to capture the state of a and restore it at will. It might, therefore, be meaningful to serialize the state of this stream into a database and restore it at some later point in time. However, when used through remoting, an object of this type would be proxied. + For more information about serialization of classes that extend , see . For more information about implementing , see [Custom Serialization](/dotnet/standard/serialization/custom-serialization). > [!NOTE] > This interface does not apply to JSON serialization using . - + ]]> @@ -158,14 +158,14 @@ The destination (see ) for this serialization. Populates a with the data needed to serialize the target object. - are automatically tracked and serialized by the formatter. - + > [!NOTE] > It's not guaranteed that this method will be called only once per object instance during serialization. Therefore, the method should be implemented in such a way that its behavior will be the same regardless of the number of times it is called. - + ]]> The caller does not have the required permission. diff --git a/xml/System.Runtime.Serialization/ISerializationSurrogate.xml b/xml/System.Runtime.Serialization/ISerializationSurrogate.xml index be1119ccbd7..aac11b37e2c 100644 --- a/xml/System.Runtime.Serialization/ISerializationSurrogate.xml +++ b/xml/System.Runtime.Serialization/ISerializationSurrogate.xml @@ -107,13 +107,13 @@ The destination (see ) for this serialization. Populates the provided with the data needed to serialize the object. - `info` parameter. - + `info` parameter. + Having located the surrogate, this method stores information on the object `obj` in the `info` parameter. This information describes its view of that object, including the object's fields, properties, and current values. The might correspond to the actual object, or it can be a synthesized view of the surrogate. - + ]]> The caller does not have the required permission. @@ -182,11 +182,11 @@ Populates the object using the information in the . The populated deserialized object. - method is called during deserialization. With this method, you can take the empty `obj` that has already been created, and enter `info` data into that object. Constructors are not invoked during deserialization of information and reconstruction of the object. - + method is called during deserialization. With this method, you can take the empty `obj` that has already been created, and enter `info` data into that object. Constructors are not invoked during deserialization of information and reconstruction of the object. + ]]> The caller does not have the required permission. diff --git a/xml/System.Runtime.Serialization/ImportOptions.xml b/xml/System.Runtime.Serialization/ImportOptions.xml index 29664019bee..45f2c86cdd5 100644 --- a/xml/System.Runtime.Serialization/ImportOptions.xml +++ b/xml/System.Runtime.Serialization/ImportOptions.xml @@ -103,7 +103,7 @@ class, which provides a method to check whether it supports particular . + To support better code generation for different languages, information about what is supported by the target language needs to be passed to the schema importer. This is done by passing an instance of the class, which provides a method to check whether it supports particular . ]]> @@ -339,7 +339,7 @@ collection, that type will be used. For example, when importing schema that contains a list of integers, an array of integers will normally be generated. However, if the collection contains the of type integer, that type will be used instead of the array. + By default, an array will be generated when importing a collection schema (unless the schema has a special annotation that mentions a different type). However, if there is a matching type in the collection, that type will be used. For example, when importing schema that contains a list of integers, an array of integers will normally be generated. However, if the collection contains the of type integer, that type will be used instead of the array. ]]> diff --git a/xml/System.Runtime.Serialization/KnownTypeAttribute.xml b/xml/System.Runtime.Serialization/KnownTypeAttribute.xml index 661f3ff1c60..f804a743dd7 100644 --- a/xml/System.Runtime.Serialization/KnownTypeAttribute.xml +++ b/xml/System.Runtime.Serialization/KnownTypeAttribute.xml @@ -138,7 +138,7 @@ of objects. During serialization or deserialization, the types found in the collection can be used within the root type to which the attribute is applied. + This constructor uses a method name that matches a method of the class. The method returns a of objects. During serialization or deserialization, the types found in the collection can be used within the root type to which the attribute is applied. @@ -250,7 +250,7 @@ is applied to, must be static, must accept no parameters, and must return an instance of any type that implements the generic interface, such as the class, or an array of objects. + The method must exist on the class or structure that the is applied to, must be static, must accept no parameters, and must return an instance of any type that implements the generic interface, such as the class, or an array of objects. The method is called once per application domain when the data contract is loaded for the type. diff --git a/xml/System.Runtime.Serialization/NetDataContractSerializer.xml b/xml/System.Runtime.Serialization/NetDataContractSerializer.xml index ec298b120b1..8f3215c3092 100644 --- a/xml/System.Runtime.Serialization/NetDataContractSerializer.xml +++ b/xml/System.Runtime.Serialization/NetDataContractSerializer.xml @@ -560,9 +560,9 @@ determines whether it can read an object by examining the name and namespace of the XML element the reader is positioned at, and comparing the values to expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). + The determines whether it can read an object by examining the name and namespace of the XML element the reader is positioned at, and comparing the values to expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). - You can set the `rootName` and `rootNamespace` in the following constructors: , , and . + You can set the `rootName` and `rootNamespace` in the following constructors: , , and . ]]> @@ -712,7 +712,7 @@ ## Remarks The `verifyObjectName` parameter determines whether it can read an object by examining the name and namespace of the XML element the reader is positioned at, and comparing the values to expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). - You can set the `rootName` and `rootNamespace` in the following constructors: , , and . + You can set the `rootName` and `rootNamespace` in the following constructors: , , and . [!INCLUDE [untrusted-data-method-note](~/includes/untrusted-data-method-note.md)] @@ -753,7 +753,7 @@ ## Remarks The `verifyObjectName` parameter determines whether it can read an object by examining the name and namespace of the XML element the reader is positioned at, and comparing the values to expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). - You can set the `rootName` and `rootNamespace` in the following constructors: , , and . + You can set the `rootName` and `rootNamespace` in the following constructors: , , and . [!INCLUDE [untrusted-data-method-note](~/includes/untrusted-data-method-note.md)] @@ -838,7 +838,7 @@ , , and methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. The three methods are also called by the method. + The , , and methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. The three methods are also called by the method. ]]> @@ -870,7 +870,7 @@ , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/netdatacontractserializer/cs/source.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/netdatacontractserializer/vb/source.vb" id="Snippet5"::: @@ -948,7 +948,7 @@ , , and methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. The three methods are also called by the method. + The , , and methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. The three methods are also called by the method. ]]> @@ -982,7 +982,7 @@ , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/netdatacontractserializer/cs/source.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/netdatacontractserializer/vb/source.vb" id="Snippet5"::: @@ -1062,7 +1062,7 @@ , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/netdatacontractserializer/cs/source.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/netdatacontractserializer/vb/source.vb" id="Snippet5"::: diff --git a/xml/System.Runtime.Serialization/ObjectIDGenerator.xml b/xml/System.Runtime.Serialization/ObjectIDGenerator.xml index a1f8101defc..c2ad3b35219 100644 --- a/xml/System.Runtime.Serialization/ObjectIDGenerator.xml +++ b/xml/System.Runtime.Serialization/ObjectIDGenerator.xml @@ -64,17 +64,17 @@ Generates IDs for objects. - keeps track of previously identified objects. When you ask for the ID of an object, the knows whether to return the existing ID, or generate and remember a new ID. - - The IDs are unique for the life of the instance. Generally, a life lasts as long as the that created it. Object IDs have meaning only within a given serialized stream, and are used for tracking which objects have references to others within the serialized object graph. - - Using a hash table, the retains which ID is assigned to which object. The object references, which uniquely identify each object, are addresses in the runtime garbage-collected heap. Object reference values can change during serialization, but the table is updated automatically so the information is correct. - - Object IDs are 64-bit numbers. Allocation starts from one, so zero is never a valid object ID. A formatter can choose a zero value to represent an object reference whose value is `null`. - + keeps track of previously identified objects. When you ask for the ID of an object, the knows whether to return the existing ID, or generate and remember a new ID. + + The IDs are unique for the life of the instance. Generally, a life lasts as long as the that created it. Object IDs have meaning only within a given serialized stream, and are used for tracking which objects have references to others within the serialized object graph. + + Using a hash table, the retains which ID is assigned to which object. The object references, which uniquely identify each object, are addresses in the runtime garbage-collected heap. Object reference values can change during serialization, but the table is updated automatically so the information is correct. + + Object IDs are 64-bit numbers. Allocation starts from one, so zero is never a valid object ID. A formatter can choose a zero value to represent an object reference whose value is `null`. + ]]> @@ -220,11 +220,11 @@ Determines whether an object has already been assigned an ID. The object ID of if previously known to the ; otherwise, zero. - differs from in that it never creates an ID for an object that has not already been seen by the . - + differs from in that it never creates an ID for an object that has not already been seen by the . + ]]> The parameter is . diff --git a/xml/System.Runtime.Serialization/ObjectManager.xml b/xml/System.Runtime.Serialization/ObjectManager.xml index 850cde0097b..e4c22b68f13 100644 --- a/xml/System.Runtime.Serialization/ObjectManager.xml +++ b/xml/System.Runtime.Serialization/ObjectManager.xml @@ -60,20 +60,20 @@ Keeps track of objects as they are deserialized. - queries the to determine whether a reference to an object in the serialized stream refers to an object that has already been deserialized (a backward reference), or to an object that has not yet been deserialized (a forward reference). If the reference in the serialized stream is a forward reference, then the can register a fixup with the . If the reference in the serialized stream is a backward reference, the immediately completes the reference. Fixup refers to the process of finalizing object references not already completed during the object deserialization process. After the required object has been deserialized, the will complete the reference. - - The follows a set of rules that dictate the fixup order. All objects that implement or have a can expect to have all the objects that they transmitted through available when the object tree is deserialized. However, a parent object cannot presume that all its child objects will be fully completed when it is fully deserialized. All child objects will be present but not all the grandchild objects will necessarily be present. If an object needs to take certain actions that depend on executing code on its child objects, it can delay these actions, implement the interface, and execute the code only when it is called back on this interface. - - - -## Examples - The following code example shows how to use the class to walk through an object graph, traversing to each object only once. - - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Serialization/ObjectManager/ObjectManager.cs" id="Snippet1"::: - + queries the to determine whether a reference to an object in the serialized stream refers to an object that has already been deserialized (a backward reference), or to an object that has not yet been deserialized (a forward reference). If the reference in the serialized stream is a forward reference, then the can register a fixup with the . If the reference in the serialized stream is a backward reference, the immediately completes the reference. Fixup refers to the process of finalizing object references not already completed during the object deserialization process. After the required object has been deserialized, the will complete the reference. + + The follows a set of rules that dictate the fixup order. All objects that implement or have a can expect to have all the objects that they transmitted through available when the object tree is deserialized. However, a parent object cannot presume that all its child objects will be fully completed when it is fully deserialized. All child objects will be present but not all the grandchild objects will necessarily be present. If an object needs to take certain actions that depend on executing code on its child objects, it can delay these actions, implement the interface, and execute the code only when it is called back on this interface. + + + +## Examples + The following code example shows how to use the class to walk through an object graph, traversing to each object only once. + + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Serialization/ObjectManager/ObjectManager.cs" id="Snippet1"::: + ]]> @@ -182,11 +182,11 @@ Performs all the recorded fixups. - ), or the default implementation. - + ), or the default implementation. + ]]> A fixup was not successfully completed. @@ -236,11 +236,11 @@ Returns the object with the specified object ID. The object with the specified object ID if it has been previously stored or if no such object has been registered. - method. - + method. + ]]> The parameter is less than or equal to zero. @@ -396,11 +396,11 @@ The ID of the object that the current array element will point to after fixup is completed. Records a fixup for one element in an array. - The or parameter is less than or equal to zero. @@ -453,11 +453,11 @@ The ID of the object the array elements will point to after fixup is completed. Records fixups for the specified elements in an array, to be executed later. - The or parameter is less than or equal to zero. @@ -510,11 +510,11 @@ The ID of the object required by . Records a fixup for an object member, to be executed later. - @@ -568,11 +568,11 @@ The ID of the object required by . Records a fixup for a member of an object, to be executed later. - The or parameter is less than or equal to zero. @@ -647,11 +647,11 @@ The ID of the object to register. Registers an object as it is deserialized, associating it with . - retains information about both the object and its ID. Later during deserialization, can be used to determine whether a particular object ID has already been deserialized, or whether it is a forward reference to an object that has not yet been deserialized. - + retains information about both the object and its ID. Later during deserialization, can be used to determine whether a particular object ID has already been deserialized, or whether it is a forward reference to an object that has not yet been deserialized. + ]]> The parameter is . @@ -719,11 +719,11 @@ The used if implements or has a . will be completed with any required fixup information and then passed to the required object when that object is completed. Registers an object as it is deserialized, associating it with , and recording the used with it. - retains the information about both the object and its ID. Later during deserialization, you can use to discover whether a particular object ID has already been deserialized, or if it is a forward reference to an object that has not yet been deserialized. - + retains the information about both the object and its ID. Later during deserialization, you can use to discover whether a particular object ID has already been deserialized, or if it is a forward reference to an object that has not yet been deserialized. + ]]> The parameter is . @@ -803,13 +803,13 @@ The field in the containing object where exists. This parameter has meaning only if is a value type. Registers a member of an object as it is deserialized, associating it with , and recording the . - because of the way fixups are performed on objects. The space to store the information for a is allocated inline with its containing object. However, when the is boxed to be registered with the , it loses the connection with its containing object. To guarantee that fixups occur in the instance of the stored in the containing object and not in the boxed instance, the retains some additional information. - - retains information about both the object and its ID. Later during deserialization, can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized. - + because of the way fixups are performed on objects. The space to store the information for a is allocated inline with its containing object. However, when the is boxed to be registered with the , it loses the connection with its containing object. To guarantee that fixups occur in the instance of the stored in the containing object and not in the boxed instance, the retains some additional information. + + retains information about both the object and its ID. Later during deserialization, can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized. + ]]> The parameter is . @@ -891,13 +891,13 @@ If is a and a member of an array, contains the index within that array where exists. is ignored if is not both a and a member of an array. Registers a member of an array contained in an object while it is deserialized, associating it with , and recording the . - because of the way fixups are performed on objects. The space to store the information for a is allocated inline with its containing object. However, when the is boxed to be registered with the , it loses the connection with its containing object. To guarantee that fixups occur in the instance of the stored in the containing object and not in the boxed instance, the retains some additional information. - - retains information about both the object and its ID. Later during deserialization, can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized. - + because of the way fixups are performed on objects. The space to store the information for a is allocated inline with its containing object. However, when the is boxed to be registered with the , it loses the connection with its containing object. To guarantee that fixups occur in the instance of the stored in the containing object and not in the boxed instance, the retains some additional information. + + retains information about both the object and its ID. Later during deserialization, can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized. + ]]> The parameter is . diff --git a/xml/System.Runtime.Serialization/SerializationException.xml b/xml/System.Runtime.Serialization/SerializationException.xml index e2b45f302ba..6b9056c1aa6 100644 --- a/xml/System.Runtime.Serialization/SerializationException.xml +++ b/xml/System.Runtime.Serialization/SerializationException.xml @@ -88,9 +88,9 @@ ## Remarks uses the `HRESULT` COR_E_SERIALIZATION with the value 0x8013150C. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. - For a list of initial property values for an instance of , see the constructors. + For a list of initial property values for an instance of , see the constructors. ]]> @@ -155,8 +155,8 @@ |Property|Condition| |--------------|---------------| -||`null`| -||Localized error message for .| +||`null`| +||Localized error message for .| ]]> @@ -215,8 +215,8 @@ |Property|Condition| |--------------|---------------| -||`null`| -||The `message` string.| +||`null`| +||The `message` string.| ]]> @@ -348,8 +348,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.Serialization/SerializationInfo.xml b/xml/System.Runtime.Serialization/SerializationInfo.xml index d7b9dca77dd..270dfb8072e 100644 --- a/xml/System.Runtime.Serialization/SerializationInfo.xml +++ b/xml/System.Runtime.Serialization/SerializationInfo.xml @@ -75,9 +75,9 @@ method on either or populates the store with the name, type, and value of each piece of information it wants to serialize. During deserialization, the appropriate function can extract this information. + This class is used by objects with custom serialization behavior. The method on either or populates the store with the name, type, and value of each piece of information it wants to serialize. During deserialization, the appropriate function can extract this information. - Objects are added to the store at serialization time using the methods and extracted from the store at deserialization using the methods. + Objects are added to the store at serialization time using the methods and extracted from the store at deserialization using the methods. For more information about customizing serialization, see [Custom Serialization](/dotnet/standard/serialization/custom-serialization). @@ -1335,7 +1335,7 @@ End Sub is the same as the value returned by property of the assembly of the containing type. This is the assembly name that the formatter uses when serializing type information for this object. + The is the same as the value returned by property of the assembly of the containing type. This is the assembly name that the formatter uses when serializing type information for this object. The assembly name contains the name of the assembly, version, culture, and some security information about the object. @@ -1397,7 +1397,7 @@ End Sub is the same as what would be returned by calling the on . This is the type name the formatter uses when serializing type information for this object. + The is the same as what would be returned by calling the on . This is the type name the formatter uses when serializing type information for this object. Users who are changing the type to serialize (for example, to send a proxy for a particular type) will want to set the value of this property. @@ -2492,14 +2492,14 @@ End Sub is of the type requested (or one of its derived classes), that value is returned directly. Otherwise, is called to convert it to the appropriate type. + If the data stored in the is of the type requested (or one of its derived classes), that value is returned directly. Otherwise, is called to convert it to the appropriate type. - The value returned by the method can always be safely cast to the type specified in the `type` parameter. + The value returned by the method can always be safely cast to the type specified in the `type` parameter. ## Examples - The following code example demonstrates the use of the method: + The following code example demonstrates the use of the method: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Serialization/SerializationInfo/GetValue/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Serialization/SerializationInfo/GetValue/source.vb" id="Snippet1"::: @@ -2749,7 +2749,7 @@ End Sub is responsible for setting the of the instance before passing it to . However, users who want to send proxies for their objects will need to change the type represented by this instance. Using the method is equivalent to setting both the and the . + The is responsible for setting the of the instance before passing it to . However, users who want to send proxies for their objects will need to change the type represented by this instance. Using the method is equivalent to setting both the and the . ]]> diff --git a/xml/System.Runtime.Serialization/SerializationInfoEnumerator.xml b/xml/System.Runtime.Serialization/SerializationInfoEnumerator.xml index 2e6e6ae6c51..0d19d46ce69 100644 --- a/xml/System.Runtime.Serialization/SerializationInfoEnumerator.xml +++ b/xml/System.Runtime.Serialization/SerializationInfoEnumerator.xml @@ -190,7 +190,7 @@ and go through each item until you reach the last element. + To initialize the enumerator, call and go through each item until you reach the last element. ]]> diff --git a/xml/System.Runtime.Serialization/SerializationObjectManager.xml b/xml/System.Runtime.Serialization/SerializationObjectManager.xml index 57b7b4f068f..7a55266dc10 100644 --- a/xml/System.Runtime.Serialization/SerializationObjectManager.xml +++ b/xml/System.Runtime.Serialization/SerializationObjectManager.xml @@ -50,11 +50,11 @@ Manages serialization processes at run time. This class cannot be inherited. - . The main difference is that the performs its tasks during serialization while the performs its tasks during deserialization. - + . The main difference is that the performs its tasks during serialization while the performs its tasks during deserialization. + ]]> @@ -138,11 +138,11 @@ Invokes the OnSerializing callback event if the type of the object has one; and registers the object for raising the OnSerialized event if the type of the object has one. - attribute to a method on the registered object. Similarly, the OnSerialized event is created by applying the attribute to a method on the registered object. - + attribute to a method on the registered object. Similarly, the OnSerialized event is created by applying the attribute to a method on the registered object. + ]]> @@ -202,11 +202,11 @@ The object to register. Registers the object upon which events will be raised. - method will be called on the registered object. - + method will be called on the registered object. + ]]> diff --git a/xml/System.Runtime.Serialization/StreamingContext.xml b/xml/System.Runtime.Serialization/StreamingContext.xml index 7f4b1b1fb0e..b05dc514716 100644 --- a/xml/System.Runtime.Serialization/StreamingContext.xml +++ b/xml/System.Runtime.Serialization/StreamingContext.xml @@ -319,7 +319,7 @@ and . + Two code groups are equivalent if they have the same and . ]]> diff --git a/xml/System.Runtime.Serialization/XPathQueryGenerator.xml b/xml/System.Runtime.Serialization/XPathQueryGenerator.xml index 2a1818a2823..df77aa56509 100644 --- a/xml/System.Runtime.Serialization/XPathQueryGenerator.xml +++ b/xml/System.Runtime.Serialization/XPathQueryGenerator.xml @@ -50,32 +50,32 @@ When given a class representing a data contract, and metadata representing a member of the contract, produces an XPath query for the member. - and as appropriate to the type and its fields or properties. - -2. Use the method of the class to generate the MemberInfo array. - -3. Pass the type and the array to the method. - -4. If needed, use the returned by the `namespaces` parameter to examine the XML namespaces referenced by the namespaces prefixes in the XPath query. - + and as appropriate to the type and its fields or properties. + +2. Use the method of the class to generate the MemberInfo array. + +3. Pass the type and the array to the method. + +4. If needed, use the returned by the `namespaces` parameter to examine the XML namespaces referenced by the namespaces prefixes in the XPath query. + > [!NOTE] -> The namespace prefix "xg" (for "XPath Generator") is used as the default in the XPath. This cannot be changed. Instead, refer to the NameTable collection to see what namespace the prefix is associated with. - - - -## Examples - The following example creates XPath queries from two classes to which the and attributes have been applied. - +> The namespace prefix "xg" (for "XPath Generator") is used as the default in the XPath. This cannot be changed. Instead, refer to the NameTable collection to see what namespace the prefix is associated with. + + + +## Examples + The following example creates XPath queries from two classes to which the and attributes have been applied. + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xpathquerygenerator/cs/source.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xpathquerygenerator/vb/source.vb" id="Snippet0"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xpathquerygenerator/vb/source.vb" id="Snippet0"::: + ]]> @@ -145,23 +145,23 @@ The XML namespaces and their prefixes found in the data contract. Creates an XPath from a data contract using the specified data contract type, array of metadata elements, and namespaces. - - + + The XPath generated from the type and member data. - and attributes have been applied. - + and attributes have been applied. + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xpathquerygenerator/cs/source.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xpathquerygenerator/vb/source.vb" id="Snippet0"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xpathquerygenerator/vb/source.vb" id="Snippet0"::: + ]]> @@ -231,8 +231,8 @@ The XML namespaces and their prefixes found in the data contract. Creates an XPath from a data contract using the specified contract data type, array of metadata elements, the top level element, and namespaces. - - + + The XPath generated from the type and member data. To be added. diff --git a/xml/System.Runtime.Serialization/XmlObjectSerializer.xml b/xml/System.Runtime.Serialization/XmlObjectSerializer.xml index ee0b8cae2f0..bded7c2aa59 100644 --- a/xml/System.Runtime.Serialization/XmlObjectSerializer.xml +++ b/xml/System.Runtime.Serialization/XmlObjectSerializer.xml @@ -54,19 +54,19 @@ Provides the base class used to serialize objects as XML streams or documents. This class is abstract. - to create your own serializer to serialize and deserialize objects. Both the class and the class inherit from the and are used to serialize and deserialize objects that conform to data contract rules (objects created using the and the ). - - - -## Examples - The following example shows a method named `WriteObjectWithInstance` that includes an as a parameter. The method serializes an object using either the or by calling the method. - + to create your own serializer to serialize and deserialize objects. Both the class and the class inherit from the and are used to serialize and deserialize objects that conform to data contract rules (objects created using the and the ). + + + +## Examples + The following example shows a method named `WriteObjectWithInstance` that includes an as a parameter. The method serializes an object using either the or by calling the method. + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xmlobjectserializer/cs/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xmlobjectserializer/vb/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xmlobjectserializer/vb/source.vb" id="Snippet1"::: + ]]> @@ -115,11 +115,11 @@ Initializes a new instance of the class. - @@ -132,13 +132,13 @@ Gets a value that specifies whether the serializer can read the object. - , the starting element is specified in the constructor of the extension class. For an example, see the constructors for the class. - + , the starting element is specified in the constructor of the extension class. For an example, see the constructors for the class. + ]]> @@ -199,13 +199,13 @@ if the reader can read the data; otherwise, . - implementation determines when to return `true`. Implementations may check that they are positioned on an element or look for an expected element name. One implementation of the , the , checks that it is positioned on an element and also checks that the element name is the top level expected name for the type currently being deserialized. - - If needed, additional attributes in the XML stream can be read while positioned on the top level element before reading XML contents using the method. - + implementation determines when to return `true`. Implementations may check that they are positioned on an element or look for an expected element name. One implementation of the , the , checks that it is positioned on an element and also checks that the element name is the top level expected name for the type currently being deserialized. + + If needed, additional attributes in the XML stream can be read while positioned on the top level element before reading XML contents using the method. + ]]> @@ -266,13 +266,13 @@ if the reader is positioned over the starting element; otherwise, . - , the starting element is specified in the constructor of the extension class. For an example, see the constructors for the class. - + , the starting element is specified in the constructor of the extension class. For an example, see the constructors for the class. + ]]> @@ -343,11 +343,11 @@ Reads the XML stream or document with a and returns the deserialized object. The deserialized object. - @@ -408,11 +408,11 @@ Reads the XML document or stream with an and returns the deserialized object. The deserialized object. - @@ -534,11 +534,11 @@ Reads the XML stream or document with an and returns the deserialized object; it also enables you to specify whether the serializer can read the data before attempting to read it. The deserialized object. - method to determine whether the element is the start of the object. - + method to determine whether the element is the start of the object. + ]]> @@ -602,11 +602,11 @@ Reads the XML document or stream with an and returns the deserialized object; it also enables you to specify whether the serializer can read the data before attempting to read it. The deserialized object. - method to determine whether the element is the start of the object. - + method to determine whether the element is the start of the object. + ]]> @@ -619,11 +619,11 @@ Writes the closing XML element to an XML stream or document. - , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. Users can insert XML attributes during the writing of the object between the calls to and . The three methods are also called by the virtual implementation of the method. - + , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. Users can insert XML attributes during the writing of the object between the calls to and . The three methods are also called by the virtual implementation of the method. + ]]> @@ -892,11 +892,11 @@ The object that contains the content to write. Writes the complete content (start, content, and end) of the object to the XML document or stream with the specified . - , , and methods. Because of this, this method is intended to be the most commonly used method on a serializer. - + , , and methods. Because of this, this method is intended to be the most commonly used method on a serializer. + ]]> the type being serialized does not conform to data contract rules. For example, the attribute has not been applied to the type. @@ -968,11 +968,11 @@ The object that contains the content to write. Writes the complete content (start, content, and end) of the object to the XML document or stream with the specified . - overload. - + overload. + ]]> the type being serialized does not conform to data contract rules. For example, the attribute has not been applied to the type. @@ -988,11 +988,11 @@ Writes only the content of an object to an XML document or stream. - , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. If the implementation writes using XML elements, attributes can be inserted before writing the contents of the object. The three methods are also called by the virtual implementation of the method. - + , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. If the implementation writes using XML elements, attributes can be inserted before writing the contents of the object. The three methods are also called by the virtual implementation of the method. + ]]> @@ -1143,11 +1143,11 @@ Writes only the starting XML element to an XML document or stream. - , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. If the implementation writes using XML elements, attributes can be inserted before writing the contents of the object. The three methods are also called by the virtual implementation of the method. - + , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. If the implementation writes using XML elements, attributes can be inserted before writing the contents of the object. The three methods are also called by the virtual implementation of the method. + ]]> diff --git a/xml/System.Runtime.Serialization/XmlSerializableServices.xml b/xml/System.Runtime.Serialization/XmlSerializableServices.xml index 5d8db1ed488..8ab73ae72c3 100644 --- a/xml/System.Runtime.Serialization/XmlSerializableServices.xml +++ b/xml/System.Runtime.Serialization/XmlSerializableServices.xml @@ -162,7 +162,7 @@ objects. It is a helper method used by the types that implement and that use the method. + This method reads all XML contained within the node the reader is positioned on when this call is made. This enables it to read and store all XML as an array of objects. It is a helper method used by the types that implement and that use the method. ]]> diff --git a/xml/System.Runtime.Serialization/XsdDataContractExporter.xml b/xml/System.Runtime.Serialization/XsdDataContractExporter.xml index d217f4dc007..8be7a92b6e2 100644 --- a/xml/System.Runtime.Serialization/XsdDataContractExporter.xml +++ b/xml/System.Runtime.Serialization/XsdDataContractExporter.xml @@ -53,7 +53,7 @@ For more information about this API, see Supplemental API remarks for XsdDataContractExporter. and calls the method. +The following example creates an instance of the and calls the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractexporter/cs/overview.cs" id="Snippet0"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractexporter/vb/overview.vb" id="Snippet0"::: @@ -155,7 +155,7 @@ The following example creates an instance of the to which you want to add new schemas. After you construct a with this overload, call the method to add new types to the existing set. + Use this overload when you have an existing to which you want to add new schemas. After you construct a with this overload, call the method to add new types to the existing set. ]]> @@ -348,7 +348,7 @@ The following example creates an instance of the method before calling the method. + The following example calls the method before calling the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractexporter/cs/overview.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractexporter/vb/overview.vb" id="Snippet1"::: @@ -369,9 +369,9 @@ The following example creates an instance of the overloads to determine whether the specified type or set of types can be exported. + As a recommended practice, use one of the overloads to determine whether the specified type or set of types can be exported. - After calling the method, retrieve the schemas from the property. + After calling the method, retrieve the schemas from the property. ]]> @@ -544,7 +544,7 @@ The following example creates an instance of the to determine whether the type can be exported. After calling the method, the schema can be retrieved through the property. + Call the to determine whether the type can be exported. After calling the method, the schema can be retrieved through the property. ]]> @@ -677,7 +677,7 @@ The following example creates an instance of the . This method returns the definition for such types. The types for which the method returns a valid name, this method returns `null`. + The main purpose of this method is to allow anonymous types in XML schema to be represented. Because anonymous types do not have a contract name and namespace, they cannot be looked up using the . This method returns the definition for such types. The types for which the method returns a valid name, this method returns `null`. ]]> diff --git a/xml/System.Runtime.Serialization/XsdDataContractImporter.xml b/xml/System.Runtime.Serialization/XsdDataContractImporter.xml index ecca5cbb5b6..73efc6e3c57 100644 --- a/xml/System.Runtime.Serialization/XsdDataContractImporter.xml +++ b/xml/System.Runtime.Serialization/XsdDataContractImporter.xml @@ -40,7 +40,7 @@ Web service, or to create data contract types from XML schemas. will transform a set of XML schemas and create the .NET Framework types that represent the data contract in a selected programming language. To create the code, use the classes in the namespace. - + Conversely, use the class when you have created a Web service that incorporates data represented by CLR types and when you need to export XML schemas for each data type to be consumed by other Web services.That is, transforms a set of CLR types into a set of XML schemas. @@ -117,7 +117,7 @@ ## Examples - The following example creates an and calls the method to create a . The is then used to create both Visual C# and Visual Basic code files. + The following example creates an and calls the method to create a . The is then used to create both Visual C# and Visual Basic code files. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractimporter/cs/xsddatacontractimporterexample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractimporter/vb/xsddatacontractimporterexample.vb" id="Snippet1"::: @@ -183,7 +183,7 @@ method to determine whether the can be generated. + The following example calls the method to determine whether the can be generated. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractimporter/cs/xsddatacontractimporterexample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractimporter/vb/xsddatacontractimporterexample.vb" id="Snippet2"::: @@ -430,7 +430,7 @@ method. The contains the name of the generated type and can be used to look up the corresponding in the . + Use this method to look up the reference to a generated CLR type after calling the method. The contains the name of the generated type and can be used to look up the corresponding in the . ]]> @@ -477,7 +477,7 @@ . The element is passed in so that this importer can look up the element-level information and return the correct type reference accordingly. + The schema element is needed for data about the type that is specified at the element scope. The main example of this is the XSD attribute `nillable`. In schema, setting `nillable` to `true` is specified on the containing schema element whereas the concept of null is expressed in the CLR type . The element is passed in so that this importer can look up the element-level information and return the correct type reference accordingly. When importing WSDL, each parameter is imported separately and therefore the parameter elements need to be passed in separately. @@ -588,7 +588,7 @@ method to test whether a set of schemas can be imported. If the method returns `true`, the code invokes the method. + The following example uses the method to test whether a set of schemas can be imported. If the method returns `true`, the code invokes the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractimporter/cs/xsddatacontractimporterexample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractimporter/vb/xsddatacontractimporterexample.vb" id="Snippet2"::: diff --git a/xml/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml b/xml/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml index f93d5080eb4..9b2276f7da6 100644 --- a/xml/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml +++ b/xml/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml @@ -157,7 +157,7 @@ property corresponds to the `guarantees` parameter of the constructor. + The value of the property corresponds to the `guarantees` parameter of the constructor. ]]> diff --git a/xml/System.Runtime.Versioning/FrameworkName.xml b/xml/System.Runtime.Versioning/FrameworkName.xml index 5550c0ab821..19d8f1dee01 100644 --- a/xml/System.Runtime.Versioning/FrameworkName.xml +++ b/xml/System.Runtime.Versioning/FrameworkName.xml @@ -130,7 +130,7 @@ constructor parses a string in the following format. + The constructor parses a string in the following format. `*identifier*,Version=*versionNumber*[,Profile=*profileName*]` @@ -148,11 +148,11 @@ - Any leading or trailing white space in the *identifier* component is removed and the resulting string is assigned to the property. -- Any leading or trailing white space and the initial "v" or "V", if present, are removed from the `versionNumber`. The returned string is then passed to the constructor, and the resulting object is assigned to the property. +- Any leading or trailing white space and the initial "v" or "V", if present, are removed from the `versionNumber`. The returned string is then passed to the constructor, and the resulting object is assigned to the property. - Any leading or trailing white space in the `profileName` component is removed and the resulting string is assigned to the property. - The following are examples of valid strings that can be passed to the constructor: + The following are examples of valid strings that can be passed to the constructor: - .NET Framework, Version=4.0 @@ -238,7 +238,7 @@ class requires that a object include at least a major and minor version number. + The class requires that a object include at least a major and minor version number. ]]> @@ -310,7 +310,7 @@ class requires that a object include at least a major and minor version number. + The class requires that a object include at least a major and minor version number. ]]> @@ -394,7 +394,7 @@ object and calls the overload to test for equality. If the conversion does not succeed or if `obj` is `null`, the method returns `false`. + The method converts `obj` to a object and calls the overload to test for equality. If the conversion does not succeed or if `obj` is `null`, the method returns `false`. ]]> @@ -468,7 +468,7 @@ - An ordinal comparison of the property values of the current instance and `other`. -- A comparison of the version properties by calling the method. +- A comparison of the version properties by calling the method. ]]> @@ -524,9 +524,9 @@ *identifier*, Version=*version*[, Profile=*profile*] - where *identifier* corresponds to the property, `version` is equivalent to calling on the value of the property, and `profile` corresponds to the property. If a profile has not been assigned to the object, the profile component is not included in the string. + where *identifier* corresponds to the property, `version` is equivalent to calling on the value of the property, and `profile` corresponds to the property. If a profile has not been assigned to the object, the profile component is not included in the string. - The value of the property is identical to the string returned by the method. + The value of the property is identical to the string returned by the method. ]]> @@ -630,7 +630,7 @@ property is set in the class constructor. + The value of the read-only property is set in the class constructor. ]]> @@ -690,9 +690,9 @@ method defines the operation of the equality operator for objects. + The method defines the operation of the equality operator for objects. - Languages that do not support custom operators can call the method instead. + Languages that do not support custom operators can call the method instead. @@ -760,9 +760,9 @@ method defines the operation of the inequality operator for objects. + The method defines the operation of the inequality operator for objects. - Languages that do not support custom operators can test for inequality by calling the method and reversing its value. + Languages that do not support custom operators can test for inequality by calling the method and reversing its value. @@ -828,7 +828,7 @@ property is set in the class constructor. + The value of the read-only property is set in the class constructor. ]]> @@ -887,13 +887,13 @@ method has the following format: + The string returned by the method has the following format: *identifier*, Version=*version*[, Profile=*profile*] - where *identifier* corresponds to the property, `version` is equivalent to calling on the value of the property, and `profile` corresponds to the property. If a profile has not been assigned to the object, the profile component is not included in the returned string. + where *identifier* corresponds to the property, `version` is equivalent to calling on the value of the property, and `profile` corresponds to the property. If a profile has not been assigned to the object, the profile component is not included in the returned string. - The value returned by the method is identical to the value of the property. + The value returned by the method is identical to the value of the property. ]]> @@ -951,7 +951,7 @@ property is set in the class constructor. + The value of the read-only property is set in the class constructor. ]]> diff --git a/xml/System.Runtime.Versioning/TargetFrameworkAttribute.xml b/xml/System.Runtime.Versioning/TargetFrameworkAttribute.xml index d79ed990d27..f72c680d8c7 100644 --- a/xml/System.Runtime.Versioning/TargetFrameworkAttribute.xml +++ b/xml/System.Runtime.Versioning/TargetFrameworkAttribute.xml @@ -122,7 +122,7 @@ method. + The string that is assigned to the `frameworkName` parameter generally takes the same form as the string that is returned by the method. ]]> @@ -234,7 +234,7 @@ property maps to the `frameworkName` parameter of the constructor. It represents the .NET version in a compact form and typically corresponds to the string that is returned by the method. + The property maps to the `frameworkName` parameter of the constructor. It represents the .NET version in a compact form and typically corresponds to the string that is returned by the method. ]]> diff --git a/xml/System.Runtime/GCSettings.xml b/xml/System.Runtime/GCSettings.xml index 6dcebbfab75..7d37853b32e 100644 --- a/xml/System.Runtime/GCSettings.xml +++ b/xml/System.Runtime/GCSettings.xml @@ -274,7 +274,7 @@ For information about server garbage collection, see [Workstation and Server Gar ## Remarks You can reduce the level of intrusiveness of garbage collection in your application by setting the to during critical operations. After such operations are completed, return to a higher latency mode so that more objects can be reclaimed to increase memory. - Ordinarily, you set the value of the property to define the garbage collector's latency mode. However, you cannot set the no GC region latency mode by assigning the enumeration value to the property. Instead, you call the method to begin the no GC region latency mode, and you call the to end it. + Ordinarily, you set the value of the property to define the garbage collector's latency mode. However, you cannot set the no GC region latency mode by assigning the enumeration value to the property. Instead, you call the method to begin the no GC region latency mode, and you call the to end it. See [Latency Modes](/dotnet/standard/garbage-collection/latency) for a discussion of how the runtime configuration settings for garbage collection affect the default value of the enumeration. diff --git a/xml/System.Runtime/MemoryFailPoint.xml b/xml/System.Runtime/MemoryFailPoint.xml index f142f55ee61..880ffbe8d4e 100644 --- a/xml/System.Runtime/MemoryFailPoint.xml +++ b/xml/System.Runtime/MemoryFailPoint.xml @@ -50,35 +50,35 @@ Checks for sufficient memory resources before executing an operation. This class cannot be inherited. - [!NOTE] -> This class is intended for use in advanced development. - - Creating an instance of the class creates a memory gate. A memory gate checks for sufficient resources before initiating an activity that requires a large amount of memory. Failing the check results in an exception being thrown. This exception prevents an operation from being started and reduces the possibility of failure due to lack of resources. This enables you decrease performance to avoid an exception and any state corruption that may result from improper handling of the exception in arbitrary locations in your code. - +> This class is intended for use in advanced development. + + Creating an instance of the class creates a memory gate. A memory gate checks for sufficient resources before initiating an activity that requires a large amount of memory. Failing the check results in an exception being thrown. This exception prevents an operation from being started and reduces the possibility of failure due to lack of resources. This enables you decrease performance to avoid an exception and any state corruption that may result from improper handling of the exception in arbitrary locations in your code. + > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. - - By throwing an exception, an application can distinguish between an estimate that an operation will not be able to complete and a partially completed operation that may have corrupted the application state. This allows an application to reduce the frequency of a pessimistic escalation policy, which may require unloading the current or recycling the process. - - checks to see whether sufficient memory and consecutive virtual address space are available in all garbage collection heaps, and may increase the size of the swap file. makes no guarantees regarding the long-term availability of the memory during the lifetime of the gate, but callers should always use the method to ensure that resources associated with are released. - - To use a memory gate, you must create a object and specify the number of megabytes (MB) of memory that the next operation is expected to use. If enough memory is not available, an exception is thrown. - - The parameter of the constructor must be a positive integer. A negative value or 0 raises an exception. - - operates at a granularity of 16 MB. Any values smaller than 16 MB are treated as 16 MB, and other values are treated as the next largest multiple of 16 MB. - - - -## Examples - enables an application to slow itself to avoid running out of memory in a corrupting manner. It should be used within a lexical scope. The following example launches threads to process items in a work queue. Before each thread is launched, the available memory resources are checked using . If an exception is thrown, the main method waits until memory is available before launching the next thread. - - :::code language="csharp" source="~/snippets/csharp/System.Runtime/MemoryFailPoint/Overview/program.cs" id="Snippet1"::: - +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. + + By throwing an exception, an application can distinguish between an estimate that an operation will not be able to complete and a partially completed operation that may have corrupted the application state. This allows an application to reduce the frequency of a pessimistic escalation policy, which may require unloading the current or recycling the process. + + checks to see whether sufficient memory and consecutive virtual address space are available in all garbage collection heaps, and may increase the size of the swap file. makes no guarantees regarding the long-term availability of the memory during the lifetime of the gate, but callers should always use the method to ensure that resources associated with are released. + + To use a memory gate, you must create a object and specify the number of megabytes (MB) of memory that the next operation is expected to use. If enough memory is not available, an exception is thrown. + + The parameter of the constructor must be a positive integer. A negative value or 0 raises an exception. + + operates at a granularity of 16 MB. Any values smaller than 16 MB are treated as 16 MB, and other values are treated as the next largest multiple of 16 MB. + + + +## Examples + enables an application to slow itself to avoid running out of memory in a corrupting manner. It should be used within a lexical scope. The following example launches threads to process items in a work queue. Before each thread is launched, the available memory resources are checked using . If an exception is thrown, the main method waits until memory is available before launching the next thread. + + :::code language="csharp" source="~/snippets/csharp/System.Runtime/MemoryFailPoint/Overview/program.cs" id="Snippet1"::: + ]]> @@ -128,18 +128,18 @@ The required memory size, in megabytes. This must be a positive value. Initializes a new instance of the class, specifying the amount of memory required for successful execution. - method to determine the amount of memory available before and after calling the method that processes the work item. See the class for a code example that dynamically determines the value for the `sizeInMegabytes` parameter. - - - -## Examples - The following example demonstrates how to determine the amount of memory a method requires when executing. This code example is part of a larger example provided for the class. - - :::code language="csharp" source="~/snippets/csharp/System.Runtime/MemoryFailPoint/Overview/program.cs" id="Snippet2"::: - + method to determine the amount of memory available before and after calling the method that processes the work item. See the class for a code example that dynamically determines the value for the `sizeInMegabytes` parameter. + + + +## Examples + The following example demonstrates how to determine the amount of memory a method requires when executing. This code example is part of a larger example provided for the class. + + :::code language="csharp" source="~/snippets/csharp/System.Runtime/MemoryFailPoint/Overview/program.cs" id="Snippet2"::: + ]]> The specified memory size is negative or 0. @@ -194,14 +194,14 @@ Releases all resources used by the . - when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - + when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. - +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. + ]]> @@ -249,11 +249,11 @@ Ensures that resources are freed and other cleanup operations are performed when the garbage collector reclaims the object. - method when the current object is ready to be finalized. - + method when the current object is ready to be finalized. + ]]> diff --git a/xml/System.Runtime/ProfileOptimization.xml b/xml/System.Runtime/ProfileOptimization.xml index 2e696413129..a7475b113fd 100644 --- a/xml/System.Runtime/ProfileOptimization.xml +++ b/xml/System.Runtime/ProfileOptimization.xml @@ -40,23 +40,23 @@ Improves the startup performance of application domains in applications that require the just-in-time (JIT) compiler by performing background compilation of methods that are likely to be executed, based on profiles created during previous compilations. - [!IMPORTANT] -> Profile optimization requires a multicore computer. The methods are ignored on other computers. - - Each time you initiate profile optimization in an application domain, the profile that was created during the previous use is read. The information in the profile is used to guide background compilation by identifying the methods that are most likely to be executed during startup. On multicore computers, this increases the chances that a method is already compiled by the time it is needed so that the main application thread does not have to call the JIT compiler. - - The profile file is overwritten on each use, so it always contains the most recent information about which methods are used during startup. - - Optimization profiles are not restricted to application domain startup. They can be used for any activity that will require heavy use of the JIT compiler. You can maintain multiple profiles for an application domain so that each such activity has its own profile. - - To use optimization profiles in an application domain, you must call the method and specify the folder where profiles are stored. The folder must already exist. To begin using a profile, call the method and specify the file name of the profile. If the file was not recorded previously, it is created on first use. There is no performance benefit the first time a profile is created. - - Profile optimization does not change the order in which methods are executed. Methods are not executed on the background thread; if a method is compiled but never called, it is simply not used. If a profile file is corrupt or cannot be written to the specified folder (for example, because the folder does not exist), program execution continues without optimization profiling. - +> Profile optimization requires a multicore computer. The methods are ignored on other computers. + + Each time you initiate profile optimization in an application domain, the profile that was created during the previous use is read. The information in the profile is used to guide background compilation by identifying the methods that are most likely to be executed during startup. On multicore computers, this increases the chances that a method is already compiled by the time it is needed so that the main application thread does not have to call the JIT compiler. + + The profile file is overwritten on each use, so it always contains the most recent information about which methods are used during startup. + + Optimization profiles are not restricted to application domain startup. They can be used for any activity that will require heavy use of the JIT compiler. You can maintain multiple profiles for an application domain so that each such activity has its own profile. + + To use optimization profiles in an application domain, you must call the method and specify the folder where profiles are stored. The folder must already exist. To begin using a profile, call the method and specify the file name of the profile. If the file was not recorded previously, it is created on first use. There is no performance benefit the first time a profile is created. + + Profile optimization does not change the order in which methods are executed. Methods are not executed on the background thread; if a method is compiled but never called, it is simply not used. If a profile file is corrupt or cannot be written to the specified folder (for example, because the folder does not exist), program execution continues without optimization profiling. + ]]> @@ -104,15 +104,15 @@ The full path to the folder where profile files are stored for the current application domain. Enables optimization profiling for the current application domain, and sets the folder where the optimization profile files are stored. On a single-core computer, the method is ignored. - method for the first time in the current application domain. If you call more than once in the same application domain, all calls after the first are ignored. - - The specified folder must already exist. If it does not exist, calling this method does not create it, and no profiling occurs. - - On computers that do not have multiple cores, this method is ignored. - + method for the first time in the current application domain. If you call more than once in the same application domain, all calls after the first are ignored. + + The specified folder must already exist. If it does not exist, calling this method does not create it, and no profiling occurs. + + On computers that do not have multiple cores, this method is ignored. + ]]> @@ -161,19 +161,19 @@ The file name of the profile to use. Starts just-in-time (JIT) compilation of the methods that were previously recorded in the specified profile file, on a background thread. Starts the process of recording current method use, which later overwrites the specified profile file. - method, the information it contains is used to determine the order in which methods are compiled on the background thread. The method creates the profile if it does not already exist, and initiates the recording of method use. - - Only methods that are actually called are recorded, regardless of whether they were compiled on the background thread or on the main application thread. A method is compiled on the main application thread if the application needs to call it before the background thread has compiled it. - - The code that performs the recording tracks the rate at which methods are compiled, including methods that are compiled on both the background thread and on the main thread. When the rate falls below a predetermined level, recording stops. Recording also stops if the rate of JIT compilation exceeds a predetermined upper limit. - + method, the information it contains is used to determine the order in which methods are compiled on the background thread. The method creates the profile if it does not already exist, and initiates the recording of method use. + + Only methods that are actually called are recorded, regardless of whether they were compiled on the background thread or on the main application thread. A method is compiled on the main application thread if the application needs to call it before the background thread has compiled it. + + The code that performs the recording tracks the rate at which methods are compiled, including methods that are compiled on both the background thread and on the main thread. When the rate falls below a predetermined level, recording stops. Recording also stops if the rate of JIT compilation exceeds a predetermined upper limit. + Calling this method stops any previous recording in progress. Calling this method with a null profile file name stops any recording in progress and does not start a new recording. - - If the method has not been called for the current application domain, or if the computer does not have multiple cores, the method has no effect. - + + If the method has not been called for the current application domain, or if the computer does not have multiple cores, the method has no effect. + ]]> From b9a8751a5cbb7cd9bc45497f41ba8c84d47b0e8c Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:04:40 -0700 Subject: [PATCH 2/8] System.Linq --- .../BinaryExpression.xml | 4 +- .../BlockExpression.xml | 34 +- xml/System.Linq.Expressions/CatchBlock.xml | 10 +- .../ConditionalExpression.xml | 38 +- .../ConstantExpression.xml | 38 +- .../DebugInfoExpression.xml | 10 +- .../DefaultExpression.xml | 14 +- .../DynamicExpression.xml | 2 +- xml/System.Linq.Expressions/Expression.xml | 212 ++-- .../ExpressionVisitor.xml | 2 +- xml/System.Linq.Expressions/Expression`1.xml | 16 +- .../GotoExpression.xml | 14 +- .../IArgumentProvider.xml | 26 +- .../IndexExpression.xml | 14 +- .../InvocationExpression.xml | 28 +- xml/System.Linq.Expressions/LabelTarget.xml | 24 +- .../LambdaExpression.xml | 8 +- .../ListInitExpression.xml | 2 +- .../LoopExpression.xml | 14 +- .../MemberAssignment.xml | 2 +- .../MemberExpression.xml | 4 +- .../MemberInitExpression.xml | 2 +- .../MemberListBinding.xml | 2 +- .../MemberMemberBinding.xml | 2 +- .../MethodCallExpression.xml | 4 +- .../NewArrayExpression.xml | 52 +- xml/System.Linq.Expressions/NewExpression.xml | 6 +- .../ParameterExpression.xml | 6 +- .../RuntimeVariablesExpression.xml | 10 +- xml/System.Linq.Expressions/SwitchCase.xml | 14 +- .../SwitchExpression.xml | 14 +- xml/System.Linq.Expressions/TryExpression.xml | 44 +- .../TypeBinaryExpression.xml | 2 +- .../UnaryExpression.xml | 24 +- xml/System.Linq/Enumerable.xml | 950 +++++++++--------- xml/System.Linq/IGrouping`2.xml | 18 +- xml/System.Linq/ILookup`2.xml | 28 +- xml/System.Linq/IOrderedEnumerable`1.xml | 46 +- xml/System.Linq/IOrderedQueryable.xml | 18 +- xml/System.Linq/IOrderedQueryable`1.xml | 18 +- xml/System.Linq/IQueryProvider.xml | 14 +- xml/System.Linq/IQueryable.xml | 4 +- xml/System.Linq/IQueryable`1.xml | 28 +- xml/System.Linq/ImmutableArrayExtensions.xml | 6 +- xml/System.Linq/Lookup`2.xml | 20 +- xml/System.Linq/ParallelEnumerable.xml | 44 +- xml/System.Linq/Queryable.xml | 842 ++++++++-------- 47 files changed, 1367 insertions(+), 1367 deletions(-) diff --git a/xml/System.Linq.Expressions/BinaryExpression.xml b/xml/System.Linq.Expressions/BinaryExpression.xml index 165f93fdfc1..fce8589fb94 100644 --- a/xml/System.Linq.Expressions/BinaryExpression.xml +++ b/xml/System.Linq.Expressions/BinaryExpression.xml @@ -121,7 +121,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> @@ -331,7 +331,7 @@ is `true`, the operator returns a nullable type, and if a nullable operand evaluates to `null`, the operator returns `null`. + An operator call is lifted if the operator expects non-nullable operands but nullable operands are passed to it. If the value of is `true`, the operator returns a nullable type, and if a nullable operand evaluates to `null`, the operator returns `null`. ]]> diff --git a/xml/System.Linq.Expressions/BlockExpression.xml b/xml/System.Linq.Expressions/BlockExpression.xml index d3c6319b30c..20b4f7d964b 100644 --- a/xml/System.Linq.Expressions/BlockExpression.xml +++ b/xml/System.Linq.Expressions/BlockExpression.xml @@ -58,19 +58,19 @@ Represents a block that contains a sequence of expressions where variables can be defined. - methods can be used to create a . - - - -## Examples - The following code example shows how to create a block expression. The block expression consists of two objects and one object. - + methods can be used to create a . + + + +## Examples + The following code example shows how to create a block expression. The block expression consists of two objects and one object. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet13"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet13"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet13"::: + ]]> @@ -120,11 +120,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/CatchBlock.xml b/xml/System.Linq.Expressions/CatchBlock.xml index 8ccb9293597..a232cb62dac 100644 --- a/xml/System.Linq.Expressions/CatchBlock.xml +++ b/xml/System.Linq.Expressions/CatchBlock.xml @@ -58,11 +58,11 @@ Represents a catch statement in a try block. - methods can be used to create a . - + methods can be used to create a . + ]]> diff --git a/xml/System.Linq.Expressions/ConditionalExpression.xml b/xml/System.Linq.Expressions/ConditionalExpression.xml index 69c0d5f7ba9..ba9014afb12 100644 --- a/xml/System.Linq.Expressions/ConditionalExpression.xml +++ b/xml/System.Linq.Expressions/ConditionalExpression.xml @@ -63,21 +63,21 @@ Represents an expression that has a conditional operator. - factory method to create a . - - The of a is . - - - -## Examples - The following code example shows how to create an expression that represents a conditional statement. If the first argument evaluates to `true`, the second argument is executed; otherwise, the third argument is executed. - + factory method to create a . + + The of a is . + + + +## Examples + The following code example shows how to create an expression that represents a conditional statement. If the first argument evaluates to `true`, the second argument is executed; otherwise, the third argument is executed. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet3"::: + ]]> @@ -127,11 +127,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/ConstantExpression.xml b/xml/System.Linq.Expressions/ConstantExpression.xml index 4e3d6eed902..fe36a28b634 100644 --- a/xml/System.Linq.Expressions/ConstantExpression.xml +++ b/xml/System.Linq.Expressions/ConstantExpression.xml @@ -63,21 +63,21 @@ Represents an expression that has a constant value. - factory methods to create a . - - The of a is . - - - -## Examples - The following code example shows how to create an expression that represents a constant value by using the method. - + factory methods to create a . + + The of a is . + + + +## Examples + The following code example shows how to create an expression that represents a constant value by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet4"::: + ]]> @@ -127,11 +127,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/DebugInfoExpression.xml b/xml/System.Linq.Expressions/DebugInfoExpression.xml index 6ba8aef45ae..0d1f54e828c 100644 --- a/xml/System.Linq.Expressions/DebugInfoExpression.xml +++ b/xml/System.Linq.Expressions/DebugInfoExpression.xml @@ -105,11 +105,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/DefaultExpression.xml b/xml/System.Linq.Expressions/DefaultExpression.xml index 8d3cd9c4080..82c11d21c78 100644 --- a/xml/System.Linq.Expressions/DefaultExpression.xml +++ b/xml/System.Linq.Expressions/DefaultExpression.xml @@ -58,14 +58,14 @@ Represents the default value of a type or an empty expression. - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet6"::: + ]]> diff --git a/xml/System.Linq.Expressions/DynamicExpression.xml b/xml/System.Linq.Expressions/DynamicExpression.xml index 106f6267d91..944eb47b568 100644 --- a/xml/System.Linq.Expressions/DynamicExpression.xml +++ b/xml/System.Linq.Expressions/DynamicExpression.xml @@ -137,7 +137,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> diff --git a/xml/System.Linq.Expressions/Expression.xml b/xml/System.Linq.Expressions/Expression.xml index 473ff427daf..fb3370d4a7a 100644 --- a/xml/System.Linq.Expressions/Expression.xml +++ b/xml/System.Linq.Expressions/Expression.xml @@ -232,7 +232,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> @@ -862,7 +862,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -958,7 +958,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1067,7 +1067,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1171,7 +1171,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1280,7 +1280,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1393,7 +1393,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1712,7 +1712,7 @@ The following code example shows how to create an expression that adds two integ method, or through or . + The expression that represents the array can be obtained by using the method, or through or . @@ -1788,9 +1788,9 @@ The following code example shows how to create an expression that adds two integ method, or through or . + The expression that represents the array can be obtained by using the method, or through or . - For multidimensional arrays, use the method. + For multidimensional arrays, use the method. @@ -1867,7 +1867,7 @@ The following code example shows how to create an expression that adds two integ equal to . The property of `array` must represent an array type whose rank matches the number of elements in `indexes`. + Each element of `indexes` must have equal to . The property of `array` must represent an array type whose rank matches the number of elements in `indexes`. If the rank of `array`.Type is 1, this method returns a . The property is set to `array` and the property is set to the single element of `indexes`. The property of the represents the element type of `array`.Type. @@ -1876,7 +1876,7 @@ The following code example shows how to create an expression that adds two integ ## Examples - The following example demonstrates how to use the method to create a that represents indexing into a two-dimensional array. + The following example demonstrates how to use the method to create a that represents indexing into a two-dimensional array. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet3"::: @@ -1950,7 +1950,7 @@ The following code example shows how to create an expression that adds two integ ## Remarks `index` must represent an index of type . - The property of the resulting is `null`, and both and are set to `false`. The property is equal to the element type of `array`.Type. The property is `null`. + The property of the resulting is `null`, and both and are set to `false`. The property is equal to the element type of `array`.Type. The property is `null`. ]]> @@ -2026,7 +2026,7 @@ The following code example shows how to create an expression that adds two integ equal to . The property of `array` must represent an array type whose rank matches the number of elements in `indexes`. + Each element of `indexes` must have equal to . The property of `array` must represent an array type whose rank matches the number of elements in `indexes`. If the rank of `array`.Type is 1, this method returns a . The property is set to `array` and the property is set to the single element of `indexes`. The property of the represents the element type of `array`.Type. @@ -2035,7 +2035,7 @@ The following code example shows how to create an expression that adds two integ ## Examples - The following example demonstrates how to use the method to create a that represents indexing into a two-dimensional array. + The following example demonstrates how to use the method to create a that represents indexing into a two-dimensional array. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet3"::: @@ -2107,7 +2107,7 @@ The following code example shows how to create an expression that adds two integ ## Remarks The property of `array` must represent an array type. - The property of the resulting is equal to . The property is `null`, and both and are set to `false`. + The property of the resulting is equal to . The property is `null`, and both and are set to `false`. ]]> @@ -2244,7 +2244,7 @@ The following code example shows how to create an expression that adds two integ property of `expression` must be assignable to the type represented by the or property of `member`. + The property of `expression` must be assignable to the type represented by the or property of `member`. ]]> @@ -3141,7 +3141,7 @@ The following code example shows how to create an expression that adds two integ object that uses the method. + The following example demonstrates how to create an expression that contains a object that uses the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet44"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet44"::: @@ -3705,7 +3705,7 @@ The following code example shows how to create an expression that adds two integ instead. + To represent a call to a `static` (`Shared` in Visual Basic) method, pass in `null` for the `instance` parameter when you call this method, or call instead. If `method` represents an instance method, the property of `instance` must be assignable to the declaring type of the method represented by `method`. @@ -3810,7 +3810,7 @@ The following code example shows how to create an expression that adds two integ instead. + To represent a call to a `static` (`Shared` in Visual Basic) method, pass in `null` for the `instance` parameter when you call this method, or call instead. If `method` represents an instance method, the property of `instance` must be assignable to the declaring type of the method represented by `method`. @@ -4567,7 +4567,7 @@ The following code example shows how to create an expression that adds two integ of to be caught can be specified but no reference to the object will be available for use in the . + The of to be caught can be specified but no reference to the object will be available for use in the . ]]> @@ -4813,7 +4813,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is `null` and both and are set to `false`. The property is equal to the result type of the coalescing operation. The property is `null`. + The property of the resulting is `null` and both and are set to `false`. The property is equal to the result type of the coalescing operation. The property is `null`. #### Result Type The following rules determine the result type: @@ -4895,7 +4895,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is `null` and both and are set to `false`. + The property of the resulting is `null` and both and are set to `false`. The property of the resulting is equal to the result type of the coalescing operation. @@ -5146,9 +5146,9 @@ The following code example shows how to create an expression that adds two integ property of the resulting is equal to the type of `value`. If `value` is `null`, is equal to . + The property of the resulting is equal to the type of `value`. If `value` is `null`, is equal to . - To represent `null`, you can also use the method, with which you can explicitly specify the type. + To represent `null`, you can also use the method, with which you can explicitly specify the type. @@ -5299,7 +5299,7 @@ The following code example shows how to create an expression that adds two integ method. + The following example demonstrates how to create a loop expression that uses the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet46"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet46"::: @@ -5432,7 +5432,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. + The property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -5534,7 +5534,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. + The property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -5653,7 +5653,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. + The property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -5747,7 +5747,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. + The property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -6122,7 +6122,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -6226,7 +6226,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -6932,7 +6932,7 @@ The following code example shows how to create an expression that adds two integ ## Examples - The following example demonstrates how to use the method to create an that represents calling the method to initialize an element of a dictionary collection. + The following example demonstrates how to use the method to create an that represents calling the method to initialize an element of a dictionary collection. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet4"::: @@ -7028,7 +7028,7 @@ The following code example shows how to create an expression that adds two integ ## Examples - The following example demonstrates how to use the method to create an that represents calling the method to initialize an element of a dictionary collection. + The following example demonstrates how to use the method to create an that represents calling the method to initialize an element of a dictionary collection. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet4"::: @@ -7392,7 +7392,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -7496,7 +7496,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -7880,7 +7880,7 @@ The following code example shows how to create an expression that adds two integ ## Remarks The property of the resulting is equal to the property of the that represents the field denoted by `fieldName`. - This method searches `expression`.Type and its base types for a field that has the name `fieldName`. Public fields are given preference over non-public fields. If a matching field is found, this method passes `expression` and the that represents that field to . + This method searches `expression`.Type and its base types for a field that has the name `fieldName`. Public fields are given preference over non-public fields. If a matching field is found, this method passes `expression` and the that represents that field to . @@ -9213,7 +9213,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an that represents the invocation of a lambda expression with specified arguments. + The following example demonstrates how to use the method to create an that represents the invocation of a lambda expression with specified arguments. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet6"::: @@ -9305,7 +9305,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an that represents the invocation of a lambda expression with specified arguments. + The following example demonstrates how to use the method to create an that represents the invocation of a lambda expression with specified arguments. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet6"::: @@ -10366,7 +10366,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V . The type is used to represent the returned object because the concrete type of the lambda expression is not known at compile time. + The object that is returned from this function is of type . The type is used to represent the returned object because the concrete type of the lambda expression is not known at compile time. The number of parameters for the delegate type represented by`delegateType` must equal the length of `parameters`. @@ -10477,7 +10477,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V . The type is used to represent the returned object because the concrete type of the lambda expression is not known at compile time. + The object that is returned from this function is of type . The type is used to represent the returned object because the concrete type of the lambda expression is not known at compile time. The number of parameters for the delegate type represented by `delegateType` must equal the length of `parameters`. @@ -11450,7 +11450,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -11546,7 +11546,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -12574,7 +12574,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create a that represents the initialization of a new dictionary instance with two key-value pairs. + The following example demonstrates how to use the method to create a that represents the initialization of a new dictionary instance with two key-value pairs. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet7"::: @@ -12654,9 +12654,9 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Remarks The property of `newExpression` must represent a type that implements . - In order to use this overload of , `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. The type of the argument must be assignable from the type represented by the property of the first element of `initializers`. + In order to use this overload of , `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. The type of the argument must be assignable from the type represented by the property of the first element of `initializers`. - The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of represents the add method that was discovered on `newExpression`.Type or its base type. + The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of represents the add method that was discovered on `newExpression`.Type or its base type. The property of the resulting is equal to `newExpression`.Type. @@ -12750,7 +12750,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create a that represents the initialization of a new dictionary instance with two key-value pairs. + The following example demonstrates how to use the method to create a that represents the initialization of a new dictionary instance with two key-value pairs. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet7"::: @@ -12837,9 +12837,9 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Remarks The property of `newExpression` must represent a type that implements . - In order to use this overload of , `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. The type of the argument must be assignable from the type represented by the property of the first element of `initializers`. + In order to use this overload of , `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. The type of the argument must be assignable from the type represented by the property of the first element of `initializers`. - The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of represents the add method that was discovered on `newExpression`.Type or its base type. + The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of represents the add method that was discovered on `newExpression`.Type or its base type. The property of the resulting is equal to `newExpression`.Type. @@ -12943,7 +12943,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V If `addMethod` is `null`, `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. If `addMethod` is not `null`, it must represent an instance method named "Add" (case insensitive) that has exactly one parameter. The type represented by the property of each element of `initializers` must be assignable to the argument type of the add method. - The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of is equal to `addMethod`. + The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of is equal to `addMethod`. The property of the resulting is equal to `newExpression`.Type. @@ -13051,7 +13051,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V If `addMethod` is `null`, `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. If `addMethod` is not `null`, it must represent an instance method named "Add" (case insensitive) that has exactly one parameter. The type represented by the property of each element of `initializers` must be assignable to the argument type of the add method. - The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of is equal to `addMethod`. + The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of is equal to `addMethod`. The property of the resulting is equal to `newExpression`.Type. @@ -13352,12 +13352,12 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method calls. For example, if `binaryType` is , this method invokes . + The `binaryType` parameter determines which factory method this method calls. For example, if `binaryType` is , this method invokes . ## Examples - The following example demonstrates how to use the method to create a that represents the subtraction of one number from another. + The following example demonstrates how to use the method to create a that represents the subtraction of one number from another. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet8"::: @@ -13442,7 +13442,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method will call. For example, if `binaryType` is , this method invokes . The `liftToNull` and `method` parameters are ignored if the appropriate factory method does not have a corresponding parameter. + The `binaryType` parameter determines which factory method this method will call. For example, if `binaryType` is , this method invokes . The `liftToNull` and `method` parameters are ignored if the appropriate factory method does not have a corresponding parameter. ]]> @@ -13527,7 +13527,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method will call. For example, if `binaryType` is , this method invokes . The `liftToNull`, `method` and `conversion` parameters are ignored if the appropriate factory method does not have a corresponding parameter. + The `binaryType` parameter determines which factory method this method will call. For example, if `binaryType` is , this method invokes . The `liftToNull`, `method` and `conversion` parameters are ignored if the appropriate factory method does not have a corresponding parameter. ]]> @@ -14164,7 +14164,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V that represents accessing either a field or a property, depending on the type of `member`. If `member` is of type , this method calls to create the . If `member` is of type , this method calls to create the . + This method can be used to create a that represents accessing either a field or a property, depending on the type of `member`. If `member` is of type , this method calls to create the . If `member` is of type , this method calls to create the . ]]> @@ -14315,7 +14315,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method calls. For example, if `unaryType` is equal to , this method invokes . The `type`parameter is ignored if it does not apply to the factory method that is called. + The `unaryType` parameter determines which factory method this method calls. For example, if `unaryType` is equal to , this method invokes . The `type`parameter is ignored if it does not apply to the factory method that is called. ]]> @@ -14388,7 +14388,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method calls. For example, if `unaryType` is equal to , this method invokes . The `type` and `method` parameters are ignored if they do not apply to the factory method that is called. + The `unaryType` parameter determines which factory method this method calls. For example, if `unaryType` is equal to , this method invokes . The `type` and `method` parameters are ignored if they do not apply to the factory method that is called. ]]> @@ -14825,7 +14825,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create a that represents the initialization of two members of a new object. + The following example demonstrates how to use the method to create a that represents the initialization of two members of a new object. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet9"::: @@ -14906,7 +14906,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -15002,7 +15002,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -15311,7 +15311,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -15415,7 +15415,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -15924,7 +15924,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -16020,7 +16020,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -16127,7 +16127,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -16223,7 +16223,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -16328,7 +16328,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -16416,7 +16416,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -16521,7 +16521,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V and properties of the resulting are empty collections. The property represents the declaring type of the constructor represented by `constructor`. + The and properties of the resulting are empty collections. The property represents the declaring type of the constructor represented by `constructor`. ]]> @@ -16588,12 +16588,12 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Remarks The `type` parameter must represent a type that has a constructor without parameters. - The and properties of the resulting are empty collections. The property is equal to `type`. + The and properties of the resulting are empty collections. The property is equal to `type`. ## Examples - The following example demonstrates how to use the method to create a that represents constructing a new instance of a dictionary object by calling the constructor without parameters. + The following example demonstrates how to use the method to create a that represents constructing a new instance of a dictionary object by calling the constructor without parameters. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet10"::: @@ -17059,7 +17059,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an expression tree that represents creating a string array that has a rank of 2. + The following example demonstrates how to use the method to create an expression tree that represents creating a string array that has a rank of 2. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet2"::: @@ -17146,7 +17146,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an expression tree that represents creating a string array that has a rank of 2. + The following example demonstrates how to use the method to create an expression tree that represents creating a string array that has a rank of 2. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet2"::: @@ -17241,7 +17241,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an expression tree that represents creating a one-dimensional string array that is initialized with a list of string expressions. + The following example demonstrates how to use the method to create an expression tree that represents creating a one-dimensional string array that is initialized with a list of string expressions. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet1"::: @@ -17331,7 +17331,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an expression tree that represents creating a one-dimensional string array that is initialized with a list of string expressions. + The following example demonstrates how to use the method to create an expression tree that represents creating a one-dimensional string array that is initialized with a list of string expressions. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet1"::: @@ -17470,7 +17470,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -17566,7 +17566,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -18003,7 +18003,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -18107,7 +18107,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -18416,7 +18416,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -18529,7 +18529,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -19038,7 +19038,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -19047,7 +19047,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V - If the property of either `left` or `right` represents a user-defined type that overloads the exponentiation operator, the that represents that method is the implementing method. -- Otherwise, if `left`.Type and `right`.Type are both , the implementing method is . +- Otherwise, if `left`.Type and `right`.Type are both , the implementing method is . #### Node Type and Lifted versus Non-Lifted @@ -19131,7 +19131,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -19142,7 +19142,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V - Otherwise, if the property of either `left` or `right` represents a user-defined type that overloads the exponentiation operator, the that represents that method is the implementing method. -- Otherwise, if `left`.Type and `right`.Type are both , the implementing method is . +- Otherwise, if `left`.Type and `right`.Type are both , the implementing method is . #### Node Type and Lifted versus Non-Lifted @@ -19701,7 +19701,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is equal to the property of . + The property of the resulting is equal to the property of . If the method represented by `propertyAccessor` is `static` (`Shared` in Visual Basic), `expression` can be `null`. @@ -19780,7 +19780,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is equal to the property of . + The property of the resulting is equal to the property of . If the property represented by `property` is `static` (`Shared` in Visual Basic), `expression` can be `null`. @@ -19855,7 +19855,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Remarks The property of the resulting is equal to the property of the that represents the property denoted by `propertyName`. - This method searches `expression`.Type and its base types for a property that has the name `propertyName`. Public properties are given preference over non-public properties. If a matching property is found, this method passes `expression` and the that represents that property to . + This method searches `expression`.Type and its base types for a property that has the name `propertyName`. Public properties are given preference over non-public properties. If a matching property is found, this method passes `expression` and the that represents that property to . @@ -20200,9 +20200,9 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is equal to the or properties of the or , respectively, that represents the property or field denoted by `propertyOrFieldName`. + The property of the resulting is equal to the or properties of the or , respectively, that represents the property or field denoted by `propertyOrFieldName`. - This method searches `expression`.Type and its base types for an instance property or field that has the name `propertyOrFieldName`. Static properties or fields are not supported. Public properties and fields are given preference over non-public properties and fields. Also, properties are given preference over fields. If a matching property or field is found, this method passes `expression` and the or that represents that property or field to or , respectively. + This method searches `expression`.Type and its base types for an instance property or field that has the name `propertyOrFieldName`. Static properties or fields are not supported. Public properties and fields are given preference over non-public properties and fields. Also, properties are given preference over fields. If a matching property or field is found, this method passes `expression` and the or that represents that property or field to or , respectively. @@ -20268,7 +20268,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting represents the constructed type , where the type argument is the type represented by `expression`.Type. The property is `null`. Both and are `false`. + The property of the resulting represents the constructed type , where the type argument is the type represented by `expression`.Type. The property is `null`. Both and are `false`. ]]> @@ -20745,7 +20745,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V method. + The following example demonstrates how to create an expression that contains the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet43"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet43"::: @@ -20943,7 +20943,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -21039,7 +21039,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -21461,7 +21461,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -21565,7 +21565,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -22074,7 +22074,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -22170,7 +22170,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -23109,7 +23109,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V object that uses the method. + The following example demonstrates how to create a object that uses the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet47"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet47"::: @@ -23693,7 +23693,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V is the type of the expression tree node, whereas the represents the static common language runtime (CLR) type of the expression that the node represents. For example, two nodes with different node types can have the same , as shown in the following code example. + The is the type of the expression tree node, whereas the represents the static common language runtime (CLR) type of the expression that the node represents. For example, two nodes with different node types can have the same , as shown in the following code example. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet36"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet36"::: @@ -23753,12 +23753,12 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is `null`. The and properties are both `false`. + The property of the resulting is `null`. The and properties are both `false`. ## Examples - The following example demonstrates how to use the method to create a that represents the reference conversion of a non-nullable integer expression to the nullable integer type. + The following example demonstrates how to use the method to create a that represents the reference conversion of a non-nullable integer expression to the nullable integer type. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet11"::: @@ -23874,7 +23874,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create a that represents a type test of a string value against the type. + The following example demonstrates how to use the method to create a that represents a type test of a string value against the type. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet12"::: @@ -23952,7 +23952,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -24040,7 +24040,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: diff --git a/xml/System.Linq.Expressions/ExpressionVisitor.xml b/xml/System.Linq.Expressions/ExpressionVisitor.xml index 48e9994c361..8b95c23b69d 100644 --- a/xml/System.Linq.Expressions/ExpressionVisitor.xml +++ b/xml/System.Linq.Expressions/ExpressionVisitor.xml @@ -894,7 +894,7 @@ ## Remarks This can be overridden to visit or rewrite specific extension nodes. - If it is not overridden, this method will call , which gives the node a chance to walk its children. By default, will try to reduce the node. + If it is not overridden, this method will call , which gives the node a chance to walk its children. By default, will try to reduce the node. ]]> diff --git a/xml/System.Linq.Expressions/Expression`1.xml b/xml/System.Linq.Expressions/Expression`1.xml index 800d96faf08..f23d33e2dae 100644 --- a/xml/System.Linq.Expressions/Expression`1.xml +++ b/xml/System.Linq.Expressions/Expression`1.xml @@ -69,7 +69,7 @@ , the compiler emits instructions to build an expression tree. + When a lambda expression is assigned to a variable, field, or parameter whose type is , the compiler emits instructions to build an expression tree. > [!NOTE] > A conversion from a lambda expression to type `Expression` (`Expression(Of D)` in Visual Basic) exists if a conversion from the lambda expression to a delegate of type `D` exists. However, the conversion may fail, for example, if the body of the lambda expression is a block. This means that delegates and expression trees behave similarly with regard to overload resolution. @@ -78,16 +78,16 @@ The ability to treat expressions as data structures enables APIs to receive user code in a format that can be inspected, transformed, and processed in a custom manner. For example, the LINQ to SQL data access implementation uses this facility to translate expression trees to Transact-SQL statements that can be evaluated by the database. - Many standard query operators defined in the class have one or more parameters of type . + Many standard query operators defined in the class have one or more parameters of type . - The of an is . + The of an is . - Use the or method to create an object. + Use the or method to create an object. ## Examples - The following code example demonstrates how to represent a lambda expression both as executable code in the form of a delegate and as data in the form of an expression tree. It also demonstrates how to turn the expression tree back into executable code by using the method. + The following code example demonstrates how to represent a lambda expression both as executable code in the form of a delegate and as data in the form of an expression tree. It also demonstrates how to turn the expression tree back into executable code by using the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/ExpressionTDelegate/Overview/ExpressionT.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/ExpressionTDelegate/Overview/ExpressionT.vb" id="Snippet1"::: @@ -191,14 +191,14 @@ method produces a delegate of type `TDelegate` at runtime. When that delegate is executed, it has the behavior described by the semantics of the . + The method produces a delegate of type `TDelegate` at runtime. When that delegate is executed, it has the behavior described by the semantics of the . - The method can be used to obtain the value of any expression tree. First, create a lambda expression that has the expression as its body by using the method. Then call to obtain a delegate, and execute the delegate to obtain the value of the expression. + The method can be used to obtain the value of any expression tree. First, create a lambda expression that has the expression as its body by using the method. Then call to obtain a delegate, and execute the delegate to obtain the value of the expression. ## Examples - The following code example demonstrates how is used to execute an expression tree. + The following code example demonstrates how is used to execute an expression tree. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/ExpressionTDelegate/Overview/ExpressionT.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/ExpressionTDelegate/Overview/ExpressionT.vb" id="Snippet2"::: diff --git a/xml/System.Linq.Expressions/GotoExpression.xml b/xml/System.Linq.Expressions/GotoExpression.xml index 97173335b71..0c94445eae1 100644 --- a/xml/System.Linq.Expressions/GotoExpression.xml +++ b/xml/System.Linq.Expressions/GotoExpression.xml @@ -58,14 +58,14 @@ Represents an unconditional jump. This includes return statements, break and continue statements, and other jumps. - object by using the method. - + object by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet45"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet45"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet45"::: + ]]> diff --git a/xml/System.Linq.Expressions/IArgumentProvider.xml b/xml/System.Linq.Expressions/IArgumentProvider.xml index 6cbf175a1f5..864fe72c5ea 100644 --- a/xml/System.Linq.Expressions/IArgumentProvider.xml +++ b/xml/System.Linq.Expressions/IArgumentProvider.xml @@ -45,22 +45,22 @@ Provides an internal interface for accessing the arguments of multiple tree nodes (DynamicExpression, ElementInit, MethodCallExpression, InvocationExpression, NewExpression, and IndexExpression). This API is for internal use only. instead of a . This saves the cost of allocating the read-only collection for each node. - -2. It enables specialized subclasses to be created that hold on to a specific number of arguments (for example, `Block2`, `Block2`, `Block4`). Therefore, these nodes avoid allocating both a and an array for storing their elements, thus saving 32 bytes per node. This technique is used by various nodes, including , , and . - -The expression tree nodes continue to expose the original LINQ properties of objects. They do this by reusing a field for storing both the array or an element that would normally be stored in the array. - -For the array case, the collection is typed to instead of . When the node is initially constructed, it is an array. The compiler or utilities in this library access the elements through this interface. Accessing array elements promotes the array to a . - -For the object case, the first argument is stored in a field typed to . When the node is initially constructed, this field holds the of the first argument. When the compiler and utilities in this library access the arguments, they again use this interface, and the accessor for the first argument uses the internal `Expression.ReturnObject(System.Object)` helper method to return the object that handles the or case. When the user accesses the , the object field is updated to hold directly onto the . - -It is important that properties consistently return the same . Otherwise, the rewriter tree walker used by expression visitors will break. It is a breaking change from LINQ v1 to return different from the same node. Currently, users can rely on object identity to tell if the node has changed. Storing the in an overloaded field both reduces memory usage and maintains compatibility for the public API. + +1. It enables the nodes to hold onto an instead of a . This saves the cost of allocating the read-only collection for each node. + +2. It enables specialized subclasses to be created that hold on to a specific number of arguments (for example, `Block2`, `Block2`, `Block4`). Therefore, these nodes avoid allocating both a and an array for storing their elements, thus saving 32 bytes per node. This technique is used by various nodes, including , , and . + +The expression tree nodes continue to expose the original LINQ properties of objects. They do this by reusing a field for storing both the array or an element that would normally be stored in the array. + +For the array case, the collection is typed to instead of . When the node is initially constructed, it is an array. The compiler or utilities in this library access the elements through this interface. Accessing array elements promotes the array to a . + +For the object case, the first argument is stored in a field typed to . When the node is initially constructed, this field holds the of the first argument. When the compiler and utilities in this library access the arguments, they again use this interface, and the accessor for the first argument uses the internal `Expression.ReturnObject(System.Object)` helper method to return the object that handles the or case. When the user accesses the , the object field is updated to hold directly onto the . + +It is important that properties consistently return the same . Otherwise, the rewriter tree walker used by expression visitors will break. It is a breaking change from LINQ v1 to return different from the same node. Currently, users can rely on object identity to tell if the node has changed. Storing the in an overloaded field both reduces memory usage and maintains compatibility for the public API. ]]> diff --git a/xml/System.Linq.Expressions/IndexExpression.xml b/xml/System.Linq.Expressions/IndexExpression.xml index 475fc671ba7..3c7b2b2b650 100644 --- a/xml/System.Linq.Expressions/IndexExpression.xml +++ b/xml/System.Linq.Expressions/IndexExpression.xml @@ -67,14 +67,14 @@ Represents indexing a property or array. - type and use it to change a value of an array element by using the method. - + type and use it to change a value of an array element by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet20"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet20"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet20"::: + ]]> diff --git a/xml/System.Linq.Expressions/InvocationExpression.xml b/xml/System.Linq.Expressions/InvocationExpression.xml index f4293c40706..d527c2e07c4 100644 --- a/xml/System.Linq.Expressions/InvocationExpression.xml +++ b/xml/System.Linq.Expressions/InvocationExpression.xml @@ -68,21 +68,21 @@ Represents an expression that applies a delegate or lambda expression to a list of argument expressions. - factory methods to create an . - - The of an is . - - - -## Examples - The following example creates an that represents invoking a lambda expression with specified arguments. - + factory methods to create an . + + The of an is . + + + +## Examples + The following example creates an that represents invoking a lambda expression with specified arguments. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet6"::: + ]]> diff --git a/xml/System.Linq.Expressions/LabelTarget.xml b/xml/System.Linq.Expressions/LabelTarget.xml index b7e10583510..5bfa5b181d2 100644 --- a/xml/System.Linq.Expressions/LabelTarget.xml +++ b/xml/System.Linq.Expressions/LabelTarget.xml @@ -54,14 +54,14 @@ Used to represent the target of a . - object by using the method. - + object by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet43"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet43"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet43"::: + ]]> @@ -118,11 +118,11 @@ Gets the name of the label. The name of the label. - diff --git a/xml/System.Linq.Expressions/LambdaExpression.xml b/xml/System.Linq.Expressions/LambdaExpression.xml index d3994a47eba..1bb4320fae9 100644 --- a/xml/System.Linq.Expressions/LambdaExpression.xml +++ b/xml/System.Linq.Expressions/LambdaExpression.xml @@ -66,16 +66,16 @@ type represents a lambda expression in the form of an expression tree. The type, which derives from and captures the type of the lambda expression more explicitly, can also be used to represent a lambda expression. At runtime, an expression tree node that represents a lambda expression is always of type . + The type represents a lambda expression in the form of an expression tree. The type, which derives from and captures the type of the lambda expression more explicitly, can also be used to represent a lambda expression. At runtime, an expression tree node that represents a lambda expression is always of type . The value of the property of a is . - Use the factory methods to create a object. + Use the factory methods to create a object. ## Examples - The following example demonstrates how to create an expression that represents a lambda expression that adds 1 to the passed argument by using the method. + The following example demonstrates how to create an expression that represents a lambda expression that adds 1 to the passed argument by using the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet42"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet42"::: @@ -192,7 +192,7 @@ method can be used to convert a expression tree into the delegate that it represents. + The method can be used to convert a expression tree into the delegate that it represents. ]]> diff --git a/xml/System.Linq.Expressions/ListInitExpression.xml b/xml/System.Linq.Expressions/ListInitExpression.xml index 6db829e98d2..e5aa058537d 100644 --- a/xml/System.Linq.Expressions/ListInitExpression.xml +++ b/xml/System.Linq.Expressions/ListInitExpression.xml @@ -62,7 +62,7 @@ factory methods to create a . + Use the factory methods to create a . The value of the property of a is . diff --git a/xml/System.Linq.Expressions/LoopExpression.xml b/xml/System.Linq.Expressions/LoopExpression.xml index 6e781f561b2..2949742248e 100644 --- a/xml/System.Linq.Expressions/LoopExpression.xml +++ b/xml/System.Linq.Expressions/LoopExpression.xml @@ -58,14 +58,14 @@ Represents an infinite loop. It can be exited with "break". - object by using the method. - + object by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet44"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet44"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet44"::: + ]]> diff --git a/xml/System.Linq.Expressions/MemberAssignment.xml b/xml/System.Linq.Expressions/MemberAssignment.xml index b805ca93122..f3fdf9b788e 100644 --- a/xml/System.Linq.Expressions/MemberAssignment.xml +++ b/xml/System.Linq.Expressions/MemberAssignment.xml @@ -58,7 +58,7 @@ factory methods to create a . + Use the factory methods to create a . A has the property equal to . diff --git a/xml/System.Linq.Expressions/MemberExpression.xml b/xml/System.Linq.Expressions/MemberExpression.xml index e9a27ff1846..fae68214a81 100644 --- a/xml/System.Linq.Expressions/MemberExpression.xml +++ b/xml/System.Linq.Expressions/MemberExpression.xml @@ -66,7 +66,7 @@ , or factory methods to create a . + Use the , or factory methods to create a . The value of the property of a is . @@ -130,7 +130,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> diff --git a/xml/System.Linq.Expressions/MemberInitExpression.xml b/xml/System.Linq.Expressions/MemberInitExpression.xml index be52dce92de..363274f6a6f 100644 --- a/xml/System.Linq.Expressions/MemberInitExpression.xml +++ b/xml/System.Linq.Expressions/MemberInitExpression.xml @@ -62,7 +62,7 @@ factory methods to create a . + Use the factory methods to create a . The value of the property of a is . diff --git a/xml/System.Linq.Expressions/MemberListBinding.xml b/xml/System.Linq.Expressions/MemberListBinding.xml index 35b36bdceb4..f0f8dbcead0 100644 --- a/xml/System.Linq.Expressions/MemberListBinding.xml +++ b/xml/System.Linq.Expressions/MemberListBinding.xml @@ -58,7 +58,7 @@ factory methods to create a . + Use the factory methods to create a . A has the property equal to . diff --git a/xml/System.Linq.Expressions/MemberMemberBinding.xml b/xml/System.Linq.Expressions/MemberMemberBinding.xml index bf25533b4c1..ec650c32432 100644 --- a/xml/System.Linq.Expressions/MemberMemberBinding.xml +++ b/xml/System.Linq.Expressions/MemberMemberBinding.xml @@ -58,7 +58,7 @@ factory methods to create a . + Use the factory methods to create a . The value of the property of a object is . diff --git a/xml/System.Linq.Expressions/MethodCallExpression.xml b/xml/System.Linq.Expressions/MethodCallExpression.xml index 1ff0340775b..48c895ded79 100644 --- a/xml/System.Linq.Expressions/MethodCallExpression.xml +++ b/xml/System.Linq.Expressions/MethodCallExpression.xml @@ -75,7 +75,7 @@ , , or factory method to create a . + Use the , , or factory method to create a . The value of the property of a object is . @@ -139,7 +139,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> diff --git a/xml/System.Linq.Expressions/NewArrayExpression.xml b/xml/System.Linq.Expressions/NewArrayExpression.xml index ded5efd7733..861e5cbfcaf 100644 --- a/xml/System.Linq.Expressions/NewArrayExpression.xml +++ b/xml/System.Linq.Expressions/NewArrayExpression.xml @@ -67,29 +67,29 @@ Represents creating a new array and possibly initializing the elements of the new array. - depending on the you require. - -||Factory Methods| -|----------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| -||| -||| - - - -## Examples - The following example creates a object that represents creating and initializing a one-dimensional array of strings. - + depending on the you require. + +||Factory Methods| +|----------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| +||| +||| + + + +## Examples + The following example creates a object that represents creating and initializing a one-dimensional array of strings. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet1"::: - - The next example creates a object that represents creating a two-dimensional array of strings. - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet1"::: + + The next example creates a object that represents creating a two-dimensional array of strings. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet2"::: + ]]> @@ -139,11 +139,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/NewExpression.xml b/xml/System.Linq.Expressions/NewExpression.xml index a32e7246aa5..cec20d2d74d 100644 --- a/xml/System.Linq.Expressions/NewExpression.xml +++ b/xml/System.Linq.Expressions/NewExpression.xml @@ -75,7 +75,7 @@ factory methods to create a . + Use the factory methods to create a . The value of the property of a object is . @@ -139,7 +139,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> @@ -307,7 +307,7 @@ property provides a mapping between the constructor arguments and the type members that correspond to those values. In the case of the construction of an anonymous type, this property maps the constructor arguments to the properties that are exposed by the anonymous type. This mapping information is important because the fields that are initialized by the construction of an anonymous type, or the properties that access those fields, are not discoverable through the or properties of a node. + The property provides a mapping between the constructor arguments and the type members that correspond to those values. In the case of the construction of an anonymous type, this property maps the constructor arguments to the properties that are exposed by the anonymous type. This mapping information is important because the fields that are initialized by the construction of an anonymous type, or the properties that access those fields, are not discoverable through the or properties of a node. ]]> diff --git a/xml/System.Linq.Expressions/ParameterExpression.xml b/xml/System.Linq.Expressions/ParameterExpression.xml index 568ef97d2ce..f3ad1b3054a 100644 --- a/xml/System.Linq.Expressions/ParameterExpression.xml +++ b/xml/System.Linq.Expressions/ParameterExpression.xml @@ -66,14 +66,14 @@ factory method to create a . + Use the factory method to create a . The value of the property of a object is . ## Examples - The following example demonstrates how to create a object that prints the value of a object by using the method. + The following example demonstrates how to create a object that prints the value of a object by using the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet49"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet49"::: @@ -130,7 +130,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> diff --git a/xml/System.Linq.Expressions/RuntimeVariablesExpression.xml b/xml/System.Linq.Expressions/RuntimeVariablesExpression.xml index c4b72136b8b..3da9a641412 100644 --- a/xml/System.Linq.Expressions/RuntimeVariablesExpression.xml +++ b/xml/System.Linq.Expressions/RuntimeVariablesExpression.xml @@ -58,11 +58,11 @@ An expression that provides runtime read/write permission for variables. - at run time. - + at run time. + ]]> diff --git a/xml/System.Linq.Expressions/SwitchCase.xml b/xml/System.Linq.Expressions/SwitchCase.xml index 9154800a054..d771bc2bacb 100644 --- a/xml/System.Linq.Expressions/SwitchCase.xml +++ b/xml/System.Linq.Expressions/SwitchCase.xml @@ -58,14 +58,14 @@ Represents one case of a . - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet34"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet34"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet34"::: + ]]> diff --git a/xml/System.Linq.Expressions/SwitchExpression.xml b/xml/System.Linq.Expressions/SwitchExpression.xml index 15211bbd604..a1571f87dfe 100644 --- a/xml/System.Linq.Expressions/SwitchExpression.xml +++ b/xml/System.Linq.Expressions/SwitchExpression.xml @@ -58,14 +58,14 @@ Represents a control expression that handles multiple selections by passing control to . - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet35"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet35"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet35"::: + ]]> diff --git a/xml/System.Linq.Expressions/TryExpression.xml b/xml/System.Linq.Expressions/TryExpression.xml index d97451389b8..4ea43e96742 100644 --- a/xml/System.Linq.Expressions/TryExpression.xml +++ b/xml/System.Linq.Expressions/TryExpression.xml @@ -58,29 +58,29 @@ Represents a try/catch/finally/fault block. - expressions that can be either catch statements or filters. - - The fault block runs if an exception is thrown. - - The finally block runs regardless of how control exits the body. - - Only one of fault or finally blocks can be supplied. - - The return type of the try block must match the return type of any associated catch statements. - - - -## Examples - The following example demonstrates how to create a object that contains a catch statement by using the method. - + expressions that can be either catch statements or filters. + + The fault block runs if an exception is thrown. + + The finally block runs regardless of how control exits the body. + + Only one of fault or finally blocks can be supplied. + + The return type of the try block must match the return type of any associated catch statements. + + + +## Examples + The following example demonstrates how to create a object that contains a catch statement by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet47"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet47"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet47"::: + ]]> diff --git a/xml/System.Linq.Expressions/TypeBinaryExpression.xml b/xml/System.Linq.Expressions/TypeBinaryExpression.xml index 0bb4a36b9f5..f277cf739ae 100644 --- a/xml/System.Linq.Expressions/TypeBinaryExpression.xml +++ b/xml/System.Linq.Expressions/TypeBinaryExpression.xml @@ -64,7 +64,7 @@ ## Remarks A type test is an example of an operation between an expression and a type. - Use the factory method to create a . + Use the factory method to create a . The value of the property of a object is . diff --git a/xml/System.Linq.Expressions/UnaryExpression.xml b/xml/System.Linq.Expressions/UnaryExpression.xml index eaa38422001..cacc9b1997f 100644 --- a/xml/System.Linq.Expressions/UnaryExpression.xml +++ b/xml/System.Linq.Expressions/UnaryExpression.xml @@ -64,19 +64,19 @@ ## Remarks The following table summarizes the factory methods that can be used to create a that has a specific node type. -||Factory Method| +||Factory Method| |----------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------| -||| -||| -||| -||| -||| -||| -||| -||| -||| +||| +||| +||| +||| +||| +||| +||| +||| +||| - In addition, the methods can also be used to create a . These factory methods can be used to create a of any node type that represents a unary operation. The parameter of these methods that is of type specifies the desired node type. + In addition, the methods can also be used to create a . These factory methods can be used to create a of any node type that represents a unary operation. The parameter of these methods that is of type specifies the desired node type. @@ -279,7 +279,7 @@ is `true`, the operator returns a nullable type and if the nullable operand evaluates to `null`, the operator returns `null`. + An operator call is *lifted* if the operator expects a non-nullable operand but a nullable operand is passed to it. If the value of is `true`, the operator returns a nullable type and if the nullable operand evaluates to `null`, the operator returns `null`. ]]> diff --git a/xml/System.Linq/Enumerable.xml b/xml/System.Linq/Enumerable.xml index 724effb2ced..1e3bb2f8ea9 100644 --- a/xml/System.Linq/Enumerable.xml +++ b/xml/System.Linq/Enumerable.xml @@ -57,9 +57,9 @@ . The standard query operators are general purpose methods that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data in any .NET-based programming language. + The methods in this class provide an implementation of the standard query operators for querying data sources that implement . The standard query operators are general purpose methods that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data in any .NET-based programming language. - The majority of the methods in this class are defined as extension methods that extend . This means they can be called like an instance method on any object that implements . + The majority of the methods in this class are defined as extension methods that extend . This means they can be called like an instance method on any object that implements . Methods that are used in a query that returns a sequence of values do not consume the target data until the query object is enumerated. This is known as deferred execution. Methods that are used in a query that returns a singleton value execute and consume the target data immediately. @@ -132,14 +132,14 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source` except the first one. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The first element of `source` is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + The method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source` except the first one. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The first element of `source` is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. - This overload of the method isn't suitable for all cases because it uses the first element of `source` as the initial aggregate value. You should choose another overload if the return value should include only the elements of `source` that meet a certain condition. For example, this overload isn't reliable if you want to calculate the sum of the even numbers in `source`. The result will be incorrect if the first element is odd instead of even. + This overload of the method isn't suitable for all cases because it uses the first element of `source` as the initial aggregate value. You should choose another overload if the return value should include only the elements of `source` that meet a certain condition. For example, this overload isn't reliable if you want to calculate the sum of the even numbers in `source`. The result will be incorrect if the first element is odd instead of even. - To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to reverse the order of words in a string by using . + The following code example demonstrates how to reverse the order of words in a string by using . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet1"::: @@ -224,12 +224,12 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source`. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + The method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source`. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. - To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to apply an accumulator function and use a seed value. + The following code example demonstrates how to use to apply an accumulator function and use a seed value. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet2"::: @@ -323,12 +323,12 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source`. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. The final result of `func` is passed to `resultSelector` to obtain the final result of . + The method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source`. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. The final result of `func` is passed to `resultSelector` to obtain the final result of . - To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to apply an accumulator function and a result selector. + The following code example demonstrates how to use to apply an accumulator function and a result selector. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet3"::: @@ -561,15 +561,15 @@ The enumeration of `source` is stopped as soon as the result can be determined. - In Visual Basic query expression syntax, an `Aggregate Into All()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into All()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine whether all the elements in a sequence satisfy a condition. Variable `allStartWithB` is true if all the pet names start with "B" or if the `pets` array is empty. + The following code example demonstrates how to use to determine whether all the elements in a sequence satisfy a condition. Variable `allStartWithB` is true if all the pet names start with "B" or if the `pets` array is empty. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet4"::: - The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `All` method. + The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `All` method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet129"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet129"::: @@ -658,15 +658,15 @@ The enumeration of `source` is stopped as soon as the result can be determined. - In Visual Basic query expression syntax, an `Aggregate Into Any()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Any()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine whether a sequence contains any elements. + The following code example demonstrates how to use to determine whether a sequence contains any elements. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet5"::: - The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `Any` method. + The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `Any` method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet130"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet130"::: @@ -747,10 +747,10 @@ The enumeration of `source` is stopped as soon as the result can be determined. - In Visual Basic query expression syntax, an `Aggregate Into Any()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Any()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine whether any element in a sequence satisfies a condition. + The following code example demonstrates how to use to determine whether any element in a sequence satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet6"::: @@ -832,7 +832,7 @@ > This method does not modify the elements of the collection. Instead, it creates a copy of the collection with the new element. ## Examples - The following code example demonstrates how to use to append a value to the end of the sequence. + The following code example demonstrates how to use to append a value to the end of the sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet201"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet201"::: @@ -902,12 +902,12 @@ method has no effect other than to change the compile-time type of `source` from a type that implements to itself. + The method has no effect other than to change the compile-time type of `source` from a type that implements to itself. - can be used to choose between query implementations when a sequence implements but also has a different set of public query methods available. For example, given a generic class `Table` that implements and has its own methods such as `Where`, `Select`, and `SelectMany`, a call to `Where` would invoke the public `Where` method of `Table`. A `Table` type that represents a database table could have a `Where` method that takes the predicate argument as an expression tree and converts the tree to SQL for remote execution. If remote execution is not desired, for example because the predicate invokes a local method, the method can be used to hide the custom methods and instead make the standard query operators available. + can be used to choose between query implementations when a sequence implements but also has a different set of public query methods available. For example, given a generic class `Table` that implements and has its own methods such as `Where`, `Select`, and `SelectMany`, a call to `Where` would invoke the public `Where` method of `Table`. A `Table` type that represents a database table could have a `Where` method that takes the predicate argument as an expression tree and converts the tree to SQL for remote execution. If remote execution is not desired, for example because the predicate invokes a local method, the method can be used to hide the custom methods and instead make the standard query operators available. ## Examples - The following code example demonstrates how to use to hide a type's custom `Where` method when the standard query operator implementation is desired. + The following code example demonstrates how to use to hide a type's custom `Where` method when the standard query operator implementation is desired. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet108"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet108"::: @@ -975,7 +975,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1036,7 +1036,7 @@ ## Remarks If the sum of the elements is too large to represent as a , this method returns positive or negative infinity. - In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1094,10 +1094,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet8"::: @@ -1159,7 +1159,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1218,7 +1218,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1278,7 +1278,7 @@ ## Remarks If the sum of the elements is too large to represent as a , this method returns positive or negative infinity. - In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1335,7 +1335,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1393,10 +1393,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet12"::: @@ -1457,7 +1457,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1514,7 +1514,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1586,10 +1586,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1667,10 +1667,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1747,10 +1747,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet18"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet18"::: @@ -1826,10 +1826,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet16"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet16"::: @@ -1905,10 +1905,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1984,10 +1984,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2062,10 +2062,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2141,10 +2141,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2217,10 +2217,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2295,10 +2295,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2375,15 +2375,15 @@ ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method enables the standard query operators to be invoked on non-generic collections by supplying the necessary type information. For example, does not implement , but by calling on the object, the standard query operators can then be used to query the sequence. + The method enables the standard query operators to be invoked on non-generic collections by supplying the necessary type information. For example, does not implement , but by calling on the object, the standard query operators can then be used to query the sequence. If an element cannot be converted to type `TResult`, this method throws a . The source sequence for this method is , which means the elements have the compile-time static type of `object`. The only type conversions that are performed by this method are reference conversions and unboxing conversions. The runtime type of the elements in the collection must match the target type, or in the case of value types, the runtime type of elements must be the result of a boxing conversion of the target type. Other conversion types, such as those between different numeric types, are not allowed. - To obtain only those elements that can be converted to type `TResult`, use the method instead of . + To obtain only those elements that can be converted to type `TResult`, use the method instead of . - In a query expression, an explicitly typed iteration variable translates to an invocation of . This example shows the syntax for an explicitly typed range variable. + In a query expression, an explicitly typed iteration variable translates to an invocation of . This example shows the syntax for an explicitly typed range variable. ```csharp from int i in objects @@ -2408,7 +2408,7 @@ Dim doubles = From item As Integer In sequence ``` ## Examples - The following code example demonstrates how to use to enable the use of the standard query operators on an . + The following code example demonstrates how to use to enable the use of the standard query operators on an . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet19"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet19"::: @@ -2547,15 +2547,15 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method differs from the method because the method returns all the original elements in the input sequences. The method returns only unique elements. + The method differs from the method because the method returns all the original elements in the input sequences. The method returns only unique elements. ## Examples - The following code example demonstrates how to use to concatenate two sequences. + The following code example demonstrates how to use to concatenate two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet20"::: - An alternative way of concatenating two sequences is to construct a collection, for example an array, of sequences and then apply the method, passing it the identity selector function. The following example demonstrates this use of . + An alternative way of concatenating two sequences is to construct a collection, for example an array, of sequences and then apply the method, passing it the identity selector function. The following example demonstrates this use of . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet112"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet112"::: @@ -2639,14 +2639,14 @@ Each chunk except the last one will be of size `size`. The last chunk will conta , the `Contains` method in that implementation is invoked to obtain the result. Otherwise, this method determines whether `source` contains the specified element. + If the type of `source` implements , the `Contains` method in that implementation is invoked to obtain the result. Otherwise, this method determines whether `source` contains the specified element. Enumeration is terminated as soon as a matching element is found. - Elements are compared to the specified value by using the default equality comparer, . + Elements are compared to the specified value by using the default equality comparer, . ## Examples - The following code example demonstrates how to use to determine whether an array contains a specific element. + The following code example demonstrates how to use to determine whether an array contains a specific element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet21"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet21"::: @@ -2731,15 +2731,15 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks Enumeration is terminated as soon as a matching element is found. - If `comparer` is `null`, the default equality comparer, , is used to compare elements to the specified value. + If `comparer` is `null`, the default equality comparer, , is used to compare elements to the specified value. ## Examples - The following example shows how to implement an equality comparer that can be used in the method. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use a sequence of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use a sequence of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Contains"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet6"::: @@ -2820,14 +2820,14 @@ Each chunk except the last one will be of size `size`. The last chunk will conta , that implementation is used to obtain the count of elements. Otherwise, this method determines the count. + If the type of `source` implements , that implementation is used to obtain the count of elements. Otherwise, this method determines the count. - Use the method when you expect and want to allow the result to be greater than . + Use the method when you expect and want to allow the result to be greater than . - In Visual Basic query expression syntax, an `Aggregate Into Count()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Count()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to count the elements in an array. + The following code example demonstrates how to use to count the elements in an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet22"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet22"::: @@ -2901,14 +2901,14 @@ Each chunk except the last one will be of size `size`. The last chunk will conta , that implementation is used to obtain the count of elements. Otherwise, this method determines the count. + If the type of `source` implements , that implementation is used to obtain the count of elements. Otherwise, this method determines the count. - You should use the method when you expect and want to allow the result to be greater than . + You should use the method when you expect and want to allow the result to be greater than . - In Visual Basic query expression syntax, an `Aggregate Into Count()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Count()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to count the elements in an array that satisfy a condition. + The following code example demonstrates how to use to count the elements in an array that satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet23"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet23"::: @@ -3058,10 +3058,10 @@ Each chunk except the last one will be of size `size`. The last chunk will conta The default value for reference and nullable types is `null`. - This method can be used to produce a left outer join when it is combined with the method. + This method can be used to produce a left outer join when it is combined with the method. ## Examples - The following code examples demonstrate how to use to provide a default value in case the source sequence is empty. + The following code examples demonstrate how to use to provide a default value in case the source sequence is empty. This example uses a non-empty sequence. @@ -3144,10 +3144,10 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - This method can be used to produce a left outer join when it is combined with the method. + This method can be used to produce a left outer join when it is combined with the method. ## Examples - The following code example demonstrates how to use the method and specify a default value. The first sequence is not empty and the second sequence is empty. + The following code example demonstrates how to use the method and specify a default value. The first sequence is not empty and the second sequence is empty. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet26"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet26"::: @@ -3238,26 +3238,26 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method returns an unordered sequence that contains no duplicate values. It uses the default equality comparer, , to compare values. + The method returns an unordered sequence that contains no duplicate values. It uses the default equality comparer, , to compare values. - In Visual Basic query expression syntax, a `Distinct` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Distinct` clause translates to an invocation of . - The default equality comparer, , is used to compare values of the types that implement the generic interface. To compare a custom data type, you need to implement this interface and provide your own and methods for the type. + The default equality comparer, , is used to compare values of the types that implement the generic interface. To compare a custom data type, you need to implement this interface and provide your own and methods for the type. - For an example that uses to define a custom comparer, see . + For an example that uses to define a custom comparer, see . ## Examples - The following code example demonstrates how to use to return distinct elements from a sequence of integers. + The following code example demonstrates how to use to return distinct elements from a sequence of integers. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet27"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet27"::: - If you want to return distinct elements from sequences of objects of some custom data type, you have to implement the generic interface in the class. The following code example shows how to implement this interface in a custom data type and provide and methods. + If you want to return distinct elements from sequences of objects of some custom data type, you have to implement the generic interface in the class. The following code example shows how to implement this interface in a custom data type and provide and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet1"::: - After you implement this interface, you can use a sequence of `Product` objects in the method, as shown in the following example: + After you implement this interface, you can use a sequence of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Distinct"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet5"::: @@ -3341,15 +3341,15 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method returns an unordered sequence that contains no duplicate values. If `comparer` is `null`, the default equality comparer, , is used to compare values. + The method returns an unordered sequence that contains no duplicate values. If `comparer` is `null`, the default equality comparer, , is used to compare values. ## Examples - The following example shows how to implement an equality comparer that can be used in the method. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use a sequence of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use a sequence of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Distinct"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet5"::: @@ -3564,7 +3564,7 @@ The , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. -This method throws an exception if `index` is out of range. To instead return a default value when the specified index is out of range, use the method. +This method throws an exception if `index` is out of range. To instead return a default value when the specified index is out of range, use the method. ]]> @@ -3635,12 +3635,12 @@ This method throws an exception if `index` is out of range. To instead return a , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. + If the type of `source` implements , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. - This method throws an exception if `index` is out of range. To instead return a default value when the specified index is out of range, use the method. + This method throws an exception if `index` is out of range. To instead return a default value when the specified index is out of range, use the method. ## Examples - The following code example demonstrates how to use to return an element at a specific position. + The following code example demonstrates how to use to return an element at a specific position. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet28"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet28"::: @@ -3778,12 +3778,12 @@ The default value for reference and nullable types is `null`. , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. + If the type of `source` implements , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. The default value for reference and nullable types is `null`. ## Examples - The following code example demonstrates how to use . This example uses an index that is outside the bounds of the array. + The following code example demonstrates how to use . This example uses an index that is outside the bounds of the array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet29"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet29"::: @@ -3850,17 +3850,17 @@ The default value for reference and nullable types is `null`. method caches an empty sequence of type `TResult`. When the object it returns is enumerated, it yields no elements. + The method caches an empty sequence of type `TResult`. When the object it returns is enumerated, it yields no elements. - In some cases, this method is useful for passing an empty sequence to a user-defined method that takes an . It can also be used to generate a neutral element for methods such as . See the Example section for an example of this use of . + In some cases, this method is useful for passing an empty sequence to a user-defined method that takes an . It can also be used to generate a neutral element for methods such as . See the Example section for an example of this use of . ## Examples - The following code example demonstrates how to use to generate an empty . + The following code example demonstrates how to use to generate an empty . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet30"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet30"::: - The following code example demonstrates a possible application of the method. The method is applied to a collection of string arrays. The elements of each array in the collection are added to the resulting only if that array contains four or more elements. is used to generate the seed value for because if no array in the collection has four or more elements, only the empty sequence is returned. + The following code example demonstrates a possible application of the method. The method is applied to a collection of string arrays. The elements of each array in the collection are added to the resulting only if that array contains four or more elements. is used to generate the seed value for because if no array in the collection has four or more elements, only the empty sequence is returned. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet31"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet31"::: @@ -3954,8 +3954,8 @@ Only unique elements are returned. ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The default equality comparer, , is used to compare values of the types. - To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. + The default equality comparer, , is used to compare values of the types. + To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. ## Examples The following code example demonstrates how to use the `Except(IEnumerable, IEnumerable)` method to compare two sequences of numbers and return elements that appear only in the first sequence. @@ -3963,7 +3963,7 @@ Only unique elements are returned. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet34"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet34"::: - If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override the and methods. + If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override the and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet9"::: @@ -4049,16 +4049,16 @@ Only unique elements are returned. , is used to compare values. + If `comparer` is `null`, the default equality comparer, , is used to compare values. ## Examples - If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and provide and methods. - The following example shows how to implement an equality comparer that can be used in the method. + If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and provide and methods. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Except"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet7"::: @@ -4271,10 +4271,10 @@ Only unique elements are returned. method throws an exception if `source` contains no elements. To instead return a default value when the source sequence is empty, use the method. + The method throws an exception if `source` contains no elements. To instead return a default value when the source sequence is empty, use the method. ## Examples - The following code example demonstrates how to use to return the first element of an array. + The following code example demonstrates how to use to return the first element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet35"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet35"::: @@ -4347,10 +4347,10 @@ Only unique elements are returned. method throws an exception if no matching element is found in `source`. To instead return a default value when no matching element is found, use the method. + The method throws an exception if no matching element is found in `source`. To instead return a default value when no matching element is found, use the method. ## Examples - The following code example demonstrates how to use to return the first element of an array that satisfies a condition. + The following code example demonstrates how to use to return the first element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet36"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet36"::: @@ -4440,15 +4440,15 @@ Only unique elements are returned. ## Remarks The default value for reference and nullable types is `null`. - The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use on an empty array. + The following code example demonstrates how to use on an empty array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet37"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet37"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the first element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric months is empty. Because the default value for an integer is 0, which does not correspond to any month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the first element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric months is empty. Because the default value for an integer is 0, which does not correspond to any month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet126"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet126"::: @@ -4525,7 +4525,7 @@ Only unique elements are returned. The default value for reference and nullable types is `null`. ## Examples - The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the array that satisfies the condition. + The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the array that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet38"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet38"::: @@ -4728,17 +4728,17 @@ Only unique elements are returned. > [!NOTE] > For examples of `GroupBy`, see the following articles: > -> - -> - -> - +> - +> - +> - - The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. + The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. - The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order they appear in `source`. + The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order they appear in `source`. - The default equality comparer is used to compare keys. + The default equality comparer is used to compare keys. - In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). ]]> @@ -4833,19 +4833,19 @@ Only unique elements are returned. > [!NOTE] > For examples of `GroupBy`, see the following articles: > -> - -> - -> - +> - +> - +> - - The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. + The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. - The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order they appear in `source`. + The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order they appear in `source`. - If `comparer` is `null`, the default equality comparer is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. If two keys are considered equal according to `comparer`, the first key is chosen as the key for that grouping. - In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). ]]> @@ -4938,25 +4938,25 @@ Only unique elements are returned. ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. + The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. - The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order that the elements that produced them appear in `source`. + The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order that the elements that produced them appear in `source`. - The default equality comparer is used to compare keys. + The default equality comparer is used to compare keys. ## Examples - The following code example demonstrates how to use to group the elements of a sequence. + The following code example demonstrates how to use to group the elements of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet39"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet39"::: - In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . The translation of the query expression in the following example is equivalent to the query in the example above. + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . The translation of the query expression in the following example is equivalent to the query in the example above. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet122"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet122"::: > [!NOTE] -> In a C# or Visual Basic query expression, the element and key selection expressions occur in the reverse order from their argument positions in a call to the method. +> In a C# or Visual Basic query expression, the element and key selection expressions occur in the reverse order from their argument positions in a call to the method. ]]> @@ -5062,19 +5062,19 @@ Only unique elements are returned. > [!NOTE] > For examples of `GroupBy`, see the following articles: > -> - -> - -> - +> - +> - +> - - The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. + The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. - The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order that the elements that produced them appear in `source`. + The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order that the elements that produced them appear in `source`. - If `comparer` is `null`, the default equality comparer is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. If two keys are considered equal according to `comparer`, the first key is chosen as the key for that grouping. - In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). ]]> @@ -5165,10 +5165,10 @@ Only unique elements are returned. . + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. + The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet15"::: @@ -5367,10 +5367,10 @@ Only unique elements are returned. . + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to group the projected elements of a sequence and then project a sequence of results of type `TResult`. + The following code example demonstrates how to use to group the projected elements of a sequence and then project a sequence of results of type `TResult`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet125"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet125"::: @@ -5595,23 +5595,23 @@ Only unique elements are returned. ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The default equality comparer, , is used to hash and compare keys. + The default equality comparer, , is used to hash and compare keys. - produces hierarchical results, which means that elements from `outer` are paired with collections of matching elements from `inner`. `GroupJoin` enables you to base your results on a whole set of matches for each element of `outer`. + produces hierarchical results, which means that elements from `outer` are paired with collections of matching elements from `inner`. `GroupJoin` enables you to base your results on a whole set of matches for each element of `outer`. > [!NOTE] > If there are no correlated elements in `inner` for a given element of `outer`, the sequence of matches for that element will be empty but will still appear in the results. - The `resultSelector` function is called only one time for each `outer` element together with a collection of all the `inner` elements that match the `outer` element. This differs from the method, in which the result selector function is invoked on pairs that contain one element from `outer` and one element from `inner`. + The `resultSelector` function is called only one time for each `outer` element together with a collection of all the `inner` elements that match the `outer` element. This differs from the method, in which the result selector function is invoked on pairs that contain one element from `outer` and one element from `inner`. `GroupJoin` preserves the order of the elements of `outer`, and for each element of `outer`, the order of the matching elements from `inner`. - has no direct equivalent in traditional relational database terms. However, this method does implement a superset of inner joins and left outer joins. Both of these operations can be written in terms of a grouped join. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). + has no direct equivalent in traditional relational database terms. However, this method does implement a superset of inner joins and left outer joins. Both of these operations can be written in terms of a grouped join. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). - In query expression syntax, a `join ... into` (C#) or `Group Join` (Visual Basic) clause translates to an invocation of . + In query expression syntax, a `join ... into` (C#) or `Group Join` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to perform a grouped join on two sequences. + The following code example demonstrates how to use to perform a grouped join on two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet40"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet40"::: @@ -5732,18 +5732,18 @@ Only unique elements are returned. ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. + If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. - produces hierarchical results, which means that elements from `outer` are paired with collections of matching elements from `inner`. `GroupJoin` enables you to base your results on a whole set of matches for each element of `outer`. + produces hierarchical results, which means that elements from `outer` are paired with collections of matching elements from `inner`. `GroupJoin` enables you to base your results on a whole set of matches for each element of `outer`. > [!NOTE] > If there are no correlated elements in `inner` for a given element of `outer`, the sequence of matches for that element will be empty but will still appear in the results. - The `resultSelector` function is called only one time for each `outer` element together with a collection of all the `inner` elements that match the `outer` element. This differs from the method in which the result selector function is invoked on pairs that contain one element from `outer` and one element from `inner`. + The `resultSelector` function is called only one time for each `outer` element together with a collection of all the `inner` elements that match the `outer` element. This differs from the method in which the result selector function is invoked on pairs that contain one element from `outer` and one element from `inner`. `GroupJoin` preserves the order of the elements of `outer`, and for each element of `outer`, the order of the matching elements from `inner`. - has no direct equivalent in traditional relational database terms. However, this method does implement a superset of inner joins and left outer joins. Both of these operations can be written in terms of a grouped join. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). + has no direct equivalent in traditional relational database terms. However, this method does implement a superset of inner joins and left outer joins. Both of these operations can be written in terms of a grouped join. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). ]]> @@ -5937,8 +5937,8 @@ Only unique elements are returned. When the object returned by this method is enumerated, `Intersect` yields distinct elements occurring in both sequences in the order in which they appear in `first`. - The default equality comparer, , is used to compare values of the types. - To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. + The default equality comparer, , is used to compare values of the types. + To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. ## Examples The following code example demonstrates how to use `Intersect(IEnumerable, IEnumerable)` to return the elements that appear in each of two sequences of integers. @@ -5946,7 +5946,7 @@ Only unique elements are returned. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet41"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet41"::: - If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override and methods. + If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet9"::: @@ -6042,7 +6042,7 @@ Only unique elements are returned. When the object returned by this method is enumerated, `Intersect` yields distinct elements occurring in both sequences in the order in which they appear in `first`. - If `comparer` is `null`, the default equality comparer, , is used to compare values. + If `comparer` is `null`, the default equality comparer, , is used to compare values. ## Examples The following example shows how to implement an equality comparer that can be used in the `Intersect` method. @@ -6333,18 +6333,18 @@ If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. + The default equality comparer, , is used to hash and compare keys. - A join refers to the operation of correlating the elements of two sources of information based on a common key. brings the two information sources and the keys by which they are matched together in one method call. This differs from the use of `SelectMany`, which requires more than one method call to perform the same operation. + A join refers to the operation of correlating the elements of two sources of information based on a common key. brings the two information sources and the keys by which they are matched together in one method call. This differs from the use of `SelectMany`, which requires more than one method call to perform the same operation. - preserves the order of the elements of `outer`, and for each of these elements, the order of the matching elements of `inner`. + preserves the order of the elements of `outer`, and for each of these elements, the order of the matching elements of `inner`. - In query expression syntax, a `join` (C#) or `Join` (Visual Basic) clause translates to an invocation of . + In query expression syntax, a `join` (C#) or `Join` (Visual Basic) clause translates to an invocation of . - In relational database terms, the method implements an inner equijoin. 'Inner' means that only elements that have a match in the other sequence are included in the results. An 'equijoin' is a join in which the keys are compared for equality. A left outer join operation has no dedicated standard query operator, but can be performed by using the method. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). + In relational database terms, the method implements an inner equijoin. 'Inner' means that only elements that have a match in the other sequence are included in the results. An 'equijoin' is a join in which the keys are compared for equality. A left outer join operation has no dedicated standard query operator, but can be performed by using the method. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). ## Examples - The following code example demonstrates how to use to perform an inner join of two sequences based on a common key. + The following code example demonstrates how to use to perform an inner join of two sequences based on a common key. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet42"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet42"::: @@ -6465,13 +6465,13 @@ If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. + If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. - A join refers to the operation of correlating the elements of two sources of information based on a common key. brings the two information sources and the keys by which they are matched together in one method call. This differs from the use of `SelectMany`, which requires more than one method call to perform the same operation. + A join refers to the operation of correlating the elements of two sources of information based on a common key. brings the two information sources and the keys by which they are matched together in one method call. This differs from the use of `SelectMany`, which requires more than one method call to perform the same operation. - preserves the order of the elements of `outer`, and for each of these elements, the order of the matching elements of `inner`. + preserves the order of the elements of `outer`, and for each of these elements, the order of the matching elements of `inner`. - In relational database terms, the method implements an inner equijoin. 'Inner' means that only elements that have a match in the other sequence are included in the results. An 'equijoin' is a join in which the keys are compared for equality. A left outer join operation has no dedicated standard query operator, but can be performed by using the method. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). + In relational database terms, the method implements an inner equijoin. 'Inner' means that only elements that have a match in the other sequence are included in the results. An 'equijoin' is a join in which the keys are compared for equality. A left outer join operation has no dedicated standard query operator, but can be performed by using the method. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). ]]> @@ -6551,10 +6551,10 @@ If `comparer` is `null`, the default equality comparer, method throws an exception if `source` contains no elements. To instead return a default value when the source sequence is empty, use the method. + The method throws an exception if `source` contains no elements. To instead return a default value when the source sequence is empty, use the method. ## Examples - The following code example demonstrates how to use to return the last element of an array. + The following code example demonstrates how to use to return the last element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet43"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet43"::: @@ -6627,10 +6627,10 @@ If `comparer` is `null`, the default equality comparer, method throws an exception if no matching element is found in `source`. To instead return a default value when no matching element is found, use the method. + The method throws an exception if no matching element is found in `source`. To instead return a default value when no matching element is found, use the method. ## Examples - The following code example demonstrates how to use to return the last element of an array that satisfies a condition. + The following code example demonstrates how to use to return the last element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet44"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet44"::: @@ -6720,15 +6720,15 @@ If `comparer` is `null`, the default equality comparer, method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use on an empty array. + The following code example demonstrates how to use on an empty array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet45"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet45"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the last element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric days of the month is empty. Because the default value for an integer is 0, which does not correspond to any day of the month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the last element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric days of the month is empty. Because the default value for an integer is 0, which does not correspond to any day of the month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet127"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet127"::: @@ -6805,7 +6805,7 @@ If `comparer` is `null`, the default equality comparer, by passing in a predicate. In the second call to the method, there is no element in the sequence that satisfies the condition. + The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the sequence that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet46"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet46"::: @@ -7197,12 +7197,12 @@ If `comparer` is `null`, the default equality comparer, when you expect the result to be greater than . + Use this method rather than when you expect the result to be greater than . - In Visual Basic query expression syntax, an `Aggregate Into LongCount()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into LongCount()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to count the elements in an array. + The following code example demonstrates how to use to count the elements in an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet47"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet47"::: @@ -7276,12 +7276,12 @@ If `comparer` is `null`, the default equality comparer, when you expect the result to be greater than . + Use this method rather than when you expect the result to be greater than . - In Visual Basic query expression syntax, an `Aggregate Into LongCount()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into LongCount()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to count the elements in an array that satisfy a condition. + The following code example demonstrates how to use to count the elements in an array that satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet48"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet48"::: @@ -7353,9 +7353,9 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7414,9 +7414,9 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7475,9 +7475,9 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7536,12 +7536,12 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence. + The following code example demonstrates how to use to determine the maximum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet52"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet52"::: @@ -7603,11 +7603,11 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7664,14 +7664,14 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence. + The following code example demonstrates how to use to determine the maximum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet54"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet54"::: @@ -7731,11 +7731,11 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7792,11 +7792,11 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7853,11 +7853,11 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7914,9 +7914,9 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7987,14 +7987,14 @@ If `comparer` is `null`, the default equality comparer, , the method uses that implementation to compare values. Otherwise, if type `TSource` implements , that implementation is used to compare values. + If type `TSource` implements , the method uses that implementation to compare values. Otherwise, if type `TSource` implements , that implementation is used to compare values. If `TSource` is a reference type and the source sequence is empty or contains only values that are `null`, this method returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of objects. + The following code example demonstrates how to use to determine the maximum value in a sequence of objects. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet57"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet57"::: @@ -8069,7 +8069,7 @@ If type `TSource` implements , the . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -8139,14 +8139,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8223,14 +8223,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8307,14 +8307,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet58"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet58"::: @@ -8389,14 +8389,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8473,14 +8473,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Decimal)` in Visual Basic. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8555,14 +8555,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Double)` in Visual Basic. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8637,14 +8637,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int32)` in Visual Basic. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8720,15 +8720,15 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int64)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. +The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8804,15 +8804,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Single)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. +The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8888,15 +8888,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. +The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8984,13 +8984,13 @@ The following code example demonstrates how to use , this method uses that implementation to compare values. Otherwise, if type `TResult` implements , that implementation is used to compare values. +If type `TResult` implements , this method uses that implementation to compare values. Otherwise, if type `TResult` implements , that implementation is used to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. +The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -9206,9 +9206,9 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9268,13 +9268,13 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence. +The following code example demonstrates how to use to determine the minimum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet60"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet60"::: @@ -9337,9 +9337,9 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9399,9 +9399,9 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9461,11 +9461,11 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9523,11 +9523,11 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9585,15 +9585,15 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence. +The following code example demonstrates how to use to determine the minimum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet63"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet63"::: @@ -9654,11 +9654,11 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9716,11 +9716,11 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9778,9 +9778,9 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9852,15 +9852,15 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -If type `TSource` implements , this method uses that implementation to compare values. Otherwise, if type `TSource` implements , that implementation is used to compare values. +If type `TSource` implements , this method uses that implementation to compare values. Otherwise, if type `TSource` implements , that implementation is used to compare values. If `TSource` is a reference type and the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of objects. +The following code example demonstrates how to use to determine the minimum value in a sequence of objects. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet67"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet67"::: @@ -9935,7 +9935,7 @@ If type `TSource` implements , the . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -10006,15 +10006,15 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10092,15 +10092,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10178,15 +10178,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet68"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet68"::: @@ -10262,15 +10262,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10348,15 +10348,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Decimal)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10432,15 +10432,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Double)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10516,15 +10516,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of source into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int32)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10600,15 +10600,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int64)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10684,15 +10684,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Single)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10768,15 +10768,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10864,13 +10864,13 @@ The following code example demonstrates how to use , this method uses that implementation to compare values. Otherwise, if type `TResult` implements , that implementation is used to compare values. +If type `TResult` implements , this method uses that implementation to compare values. Otherwise, if type `TResult` implements , that implementation is used to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -11087,14 +11087,14 @@ The following code example demonstrates how to use method returns only those elements in `source` that are non-null and compatible with type `TResult`. To receive an exception if an element cannot be cast to type `TResult`, use . + The method returns only those elements in `source` that are non-null and compatible with type `TResult`. To receive an exception if an element cannot be cast to type `TResult`, use . - This method is one of the few standard query operator methods that can be applied to a collection that has a non-parameterized type, such as an . This is because extends the type . cannot only be applied to collections that are based on the parameterized type, but collections that are based on the non-parameterized type also. + This method is one of the few standard query operator methods that can be applied to a collection that has a non-parameterized type, such as an . This is because extends the type . cannot only be applied to collections that are based on the parameterized type, but collections that are based on the non-parameterized type also. - By applying to a collection that implements , you gain the ability to query the collection by using the standard query operators. For example, specifying a type argument of to would return an object of type `IEnumerable` in C# or `IEnumerable(Of Object)` in Visual Basic, to which the standard query operators can be applied. + By applying to a collection that implements , you gain the ability to query the collection by using the standard query operators. For example, specifying a type argument of to would return an object of type `IEnumerable` in C# or `IEnumerable(Of Object)` in Visual Basic, to which the standard query operators can be applied. ## Examples - The following code example demonstrates how to use to filter the elements of an . + The following code example demonstrates how to use to filter the elements of an . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet69"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet69"::: @@ -11322,19 +11322,19 @@ If comparer is `null`, the default comparer x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - For an example of this method, see . + For an example of this method, see . - Two methods are defined to extend the type , which is the return type of this method. These two methods, namely `ThenBy` and `ThenByDescending`, enable you to specify additional sort criteria to sort a sequence. `ThenBy` and `ThenByDescending` also return an , which means any number of consecutive calls to `ThenBy` or `ThenByDescending` can be made. + Two methods are defined to extend the type , which is the return type of this method. These two methods, namely `ThenBy` and `ThenByDescending`, enable you to specify additional sort criteria to sort a sequence. `ThenBy` and `ThenByDescending` also return an , which means any number of consecutive calls to `ThenBy` or `ThenByDescending` can be made. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - This method compares keys by using the default comparer . + This method compares keys by using the default comparer . This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. - In query expression syntax, an `orderby descending` (C#) or `Order By Descending` (Visual Basic) clause translates to an invocation of . + In query expression syntax, an `orderby descending` (C#) or `Order By Descending` (Visual Basic) clause translates to an invocation of . ]]> @@ -11642,17 +11642,17 @@ If comparer is `null`, the default comparer (IEnumerable, IEnumerable)` method enumerates the two source sequences in parallel and compares corresponding elements by using the default equality comparer for `TSource`, . + The `SequenceEqual(IEnumerable, IEnumerable)` method enumerates the two source sequences in parallel and compares corresponding elements by using the default equality comparer for `TSource`, . - The default equality comparer, , is used to compare values of the types. - To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. + The default equality comparer, , is used to compare values of the types. + To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. ## Examples The following code examples demonstrate how to use `SequenceEqual(IEnumerable, IEnumerable)` to determine whether two sequences are equal. In the first two examples, the method determines whether the compared sequences contain references to the same objects. In the third and fourth examples, the method compares the actual data of the objects within the sequences. @@ -13080,7 +13080,7 @@ If comparer is `null`, the default comparer generic interface in your class. The following code example shows how to implement this interface in a helper class and provide and methods. + If you want to compare the actual data of the objects in the sequences instead of just comparing their references, you have to implement the generic interface in your class. The following code example shows how to implement this interface in a helper class and provide and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet9"::: @@ -13168,15 +13168,15 @@ If comparer is `null`, the default comparer method enumerates the two source sequences in parallel and compares corresponding elements by using the specified . If `comparer` is `null`, the default equality comparer, , is used to compare elements. + The method enumerates the two source sequences in parallel and compares corresponding elements by using the specified . If `comparer` is `null`, the default equality comparer, , is used to compare elements. ## Examples - The following example shows how to implement an equality comparer that can be used in the method. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="SequenceEqual"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet8"::: @@ -13300,15 +13300,15 @@ If comparer is `null`, the default comparer method throws an exception if the input sequence is empty. To instead return `null` when the input sequence is empty, use . + The method throws an exception if the input sequence is empty. To instead return `null` when the input sequence is empty, use . ## Examples - The following code example demonstrates how to use to select the only element of an array. + The following code example demonstrates how to use to select the only element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet79"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet79"::: - The following code example demonstrates that throws an exception when the sequence does not contain exactly one element. + The following code example demonstrates that throws an exception when the sequence does not contain exactly one element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet80"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet80"::: @@ -13385,15 +13385,15 @@ If comparer is `null`, the default comparer method throws an exception if the input sequence contains no matching element. To instead return `null` when no matching element is found, use . + The method throws an exception if the input sequence contains no matching element. To instead return `null` when no matching element is found, use . ## Examples - The following code example demonstrates how to use to select the only element of an array that satisfies a condition. + The following code example demonstrates how to use to select the only element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet81"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet81"::: - The following code example demonstrates that throws an exception when the sequence does not contain exactly one element that satisfies the condition. + The following code example demonstrates that throws an exception when the sequence does not contain exactly one element that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet82"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet82"::: @@ -13485,20 +13485,20 @@ If comparer is `null`, the default comparer returns a default value when the sequence is empty. + The following code example demonstrates that returns a default value when the sequence is empty. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet84"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet84"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the element. The following code example uses both techniques to obtain a default value of 1 if a collection of page numbers is empty. Because the default value for an integer is 0, which is not usually a valid page number, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the element. The following code example uses both techniques to obtain a default value of 1 if a collection of page numbers is empty. Because the default value for an integer is 0, which is not usually a valid page number, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet128"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet128"::: @@ -13575,12 +13575,12 @@ If comparer is `null`, the default comparer returns a default value when the sequence contains no elements that satisfy the condition. + The following code example demonstrates that returns a default value when the sequence contains no elements that satisfy the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet86"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet86"::: @@ -13761,14 +13761,14 @@ If comparer is `null`, the default comparer method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. + The method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. This method tests each element of `source` by using `predicate` and skips the element if the result is `true`. After the predicate function returns `false` for an element, that element and the remaining elements in `source` are yielded and there are no more invocations of `predicate`. - If `predicate` returns `true` for all elements in the sequence, an empty is returned. + If `predicate` returns `true` for all elements in the sequence, an empty is returned. - The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to skip elements of an array as long as a condition is true. + The following code example demonstrates how to use to skip elements of an array as long as a condition is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet88"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet88"::: @@ -14002,18 +14002,18 @@ If `count` is not a positive number, this method returns an identical copy of th ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method tests each element of `source` by using `predicate` and skips the element if the result is `true`. After the predicate function returns `false` for an element, that element and the remaining elements in `source` are yielded and there are no more invocations of `predicate`. + The method tests each element of `source` by using `predicate` and skips the element if the result is `true`. After the predicate function returns `false` for an element, that element and the remaining elements in `source` are yielded and there are no more invocations of `predicate`. - If `predicate` returns `true` for all elements in the sequence, an empty is returned. + If `predicate` returns `true` for all elements in the sequence, an empty is returned. The first argument of `predicate` represents the element to test. The second argument represents the zero-based index of the element within `source`. - The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to skip elements of an array as long as a condition that depends on the element's index is true. + The following code example demonstrates how to use to skip elements of an array as long as a condition that depends on the element's index is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet89"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet89"::: @@ -14085,9 +14085,9 @@ If `count` is not a positive number, this method returns an identical copy of th ## Remarks -The method returns zero if `source` contains no elements. +The method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14148,7 +14148,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14209,7 +14209,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14270,7 +14270,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14331,7 +14331,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14392,7 +14392,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14453,7 +14453,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14514,7 +14514,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14575,10 +14575,10 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the values of a sequence. + The following code example demonstrates how to use to sum the values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet121"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet121"::: @@ -14641,10 +14641,10 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the values of a sequence. + The following code example demonstrates how to use to sum the values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet120"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet120"::: @@ -14722,10 +14722,10 @@ This method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -14806,10 +14806,10 @@ This method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet98"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet98"::: @@ -14888,10 +14888,10 @@ This method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -14972,10 +14972,10 @@ This method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15056,10 +15056,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Decimal)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15140,10 +15140,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Double)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15224,10 +15224,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int32)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15308,10 +15308,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int64)` in Visual Basic -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15392,10 +15392,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Single)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15471,14 +15471,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl ## Remarks -The method returns zero if `source` contains no elements. +The method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15555,16 +15555,16 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - enumerates `source` and yields elements until `count` elements have been yielded or `source` contains no more elements. If `count` exceeds the number of elements in `source`, all elements of `source` are returned. + enumerates `source` and yields elements until `count` elements have been yielded or `source` contains no more elements. If `count` exceeds the number of elements in `source`, all elements of `source` are returned. - If `count` is less than or equal to zero, `source` is not enumerated and an empty is returned. + If `count` is less than or equal to zero, `source` is not enumerated and an empty is returned. - The and methods are functional complements. Given a collection sequence `coll` and an integer `n`, concatenating the results of `coll.Take(n)` and `coll.Skip(n)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and an integer `n`, concatenating the results of `coll.Take(n)` and `coll.Skip(n)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Take` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Take` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence (after it's sorted). + The following code example demonstrates how to use to return elements from the start of a sequence (after it's sorted). :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet99"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet99"::: @@ -15629,7 +15629,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - enumerates `source` and yields elements whose indices belong to the specified `range`. + enumerates `source` and yields elements whose indices belong to the specified `range`. ]]> @@ -15775,14 +15775,14 @@ If `count` is not a positive number, this method returns an empty enumerable col ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method tests each element of `source` by using `predicate` and yields the element if the result is `true`. Enumeration stops when the predicate function returns `false` for an element or when `source` contains no more elements. + The method tests each element of `source` by using `predicate` and yields the element if the result is `true`. Enumeration stops when the predicate function returns `false` for an element or when `source` contains no more elements. - The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition is true. + The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet100"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet100"::: @@ -15857,16 +15857,16 @@ If `count` is not a positive number, this method returns an empty enumerable col ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method tests each element of `source` by using `predicate` and yields the element if the result is `true`. Enumeration stops when the predicate function returns `false` for an element or when `source` contains no more elements. + The method tests each element of `source` by using `predicate` and yields the element if the result is `true`. Enumeration stops when the predicate function returns `false` for an element or when `source` contains no more elements. The first argument of `predicate` represents the element to test. The second argument represents the zero-based index of the element within `source`. - The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition that uses the element's index is true. + The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition that uses the element's index is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet101"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet101"::: @@ -15963,19 +15963,19 @@ If `count` is not a positive number, this method returns an empty enumerable col To order a sequence by the values of the elements themselves, specify the identity function (`x => x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. + and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - This method compares keys by using the default comparer . + This method compares keys by using the default comparer . This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. - In query expression syntax, an `orderby [first criterion], [second criterion]` (C#) or `Order By [first criterion], [second criterion]` (Visual Basic) clause translates to an invocation of . + In query expression syntax, an `orderby [first criterion], [second criterion]` (C#) or `Order By [first criterion], [second criterion]` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence. + The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet102"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet102"::: @@ -16072,12 +16072,12 @@ If `count` is not a positive number, this method returns an empty enumerable col To order a sequence by the values of the elements themselves, specify the identity function (`x => x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. + and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - If `comparer` is `null`, the default comparer is used to compare keys. + If `comparer` is `null`, the default comparer is used to compare keys. This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. @@ -16172,18 +16172,18 @@ If `count` is not a positive number, this method returns an empty enumerable col To order a sequence by the values of the elements themselves, specify the identity function (`x => x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. + and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - This sorting method compares keys by using the default comparer . + This sorting method compares keys by using the default comparer . This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. - In C# query expression syntax, an `orderby [first criterion], [second criterion] descending` clause translates to an invocation of . + In C# query expression syntax, an `orderby [first criterion], [second criterion] descending` clause translates to an invocation of . - In Visual Basic query expression syntax, an `Order By [first criterion], [second criterion] Descending` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Order By [first criterion], [second criterion] Descending` clause translates to an invocation of . ]]> @@ -16277,17 +16277,17 @@ If `count` is not a positive number, this method returns an empty enumerable col To order a sequence by the values of the elements themselves, specify the identity function (`x => x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. + and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - If `comparer` is `null`, the default comparer is used to compare keys. + If `comparer` is `null`, the default comparer is used to compare keys. This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. ## Examples - The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence in descending order by using a custom comparer. + The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence in descending order by using a custom comparer. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet103"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet103"::: @@ -16357,12 +16357,12 @@ If `count` is not a positive number, this method returns an empty enumerable col method forces immediate query evaluation and returns an array that contains the query results. You can append this method to your query in order to obtain a cached copy of the query results. + The method forces immediate query evaluation and returns an array that contains the query results. You can append this method to your query in order to obtain a cached copy of the query results. - has similar behavior but returns a instead of an array. + has similar behavior but returns a instead of an array. ## Examples - The following code example demonstrates how to use to force immediate query evaluation and return an array of results. + The following code example demonstrates how to use to force immediate query evaluation and return an array of results. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet104"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet104"::: @@ -16705,10 +16705,10 @@ If `count` is not a positive number, this method returns an empty enumerable col method uses the default equality comparer to compare keys. + The method uses the default equality comparer to compare keys. ## Examples - The following code example demonstrates how to use to create a by using a key selector. + The following code example demonstrates how to use to create a by using a key selector. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet105"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet105"::: @@ -16798,7 +16798,7 @@ If `count` is not a positive number, this method returns an empty enumerable col is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. ]]> @@ -16892,7 +16892,7 @@ If `count` is not a positive number, this method returns an empty enumerable col method uses the default equality comparer to compare keys. + The method uses the default equality comparer to compare keys. ]]> @@ -16990,7 +16990,7 @@ If `count` is not a positive number, this method returns an empty enumerable col is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. ]]> @@ -17185,12 +17185,12 @@ If `count` is not a positive number, this method returns an empty enumerable col method forces immediate query evaluation and returns a that contains the query results. You can append this method to your query in order to obtain a cached copy of the query results. + The method forces immediate query evaluation and returns a that contains the query results. You can append this method to your query in order to obtain a cached copy of the query results. - has similar behavior but returns an array instead of a . + has similar behavior but returns an array instead of a . ## Examples - The following code example demonstrates how to use to force immediate query evaluation and return a that contains the query results. + The following code example demonstrates how to use to force immediate query evaluation and return a that contains the query results. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet106"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet106"::: @@ -17282,9 +17282,9 @@ If `count` is not a positive number, this method returns an empty enumerable col method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. + The method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. - The default equality comparer is used to compare keys. + The default equality comparer is used to compare keys. ]]> @@ -17372,9 +17372,9 @@ If `count` is not a positive number, this method returns an empty enumerable col method returns a , a one-to-many dictionary that maps keys to collections of values. A is different to a , which performs a one-to-one mapping of keys to single values. + The method returns a , a one-to-many dictionary that maps keys to collections of values. A is different to a , which performs a one-to-one mapping of keys to single values. - If `comparer` is `null`, the default equality comparer is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. ]]> @@ -17463,12 +17463,12 @@ If `count` is not a positive number, this method returns an empty enumerable col method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. + The method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. - The default equality comparer is used to compare keys. + The default equality comparer is used to compare keys. ## Examples - The following code example demonstrates how to use to create a by using a key selector function and an element selector function. + The following code example demonstrates how to use to create a by using a key selector function and an element selector function. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet107"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet107"::: @@ -17570,9 +17570,9 @@ If `count` is not a positive number, this method returns an empty enumerable col method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. + The method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. - If `comparer` is `null`, the default equality comparer is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. ]]> @@ -17715,9 +17715,9 @@ The method is typically a constant-time operation, but ultimately this depends o ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - This method excludes duplicates from the return set. This is different behavior to the method, which returns all the elements in the input sequences including duplicates. + This method excludes duplicates from the return set. This is different behavior to the method, which returns all the elements in the input sequences including duplicates. - The default equality comparer, , is used to compare values of the types that implement the generic interface. To compare a custom data type, you need to implement this interface and provide your own and methods for the type. + The default equality comparer, , is used to compare values of the types that implement the generic interface. To compare a custom data type, you need to implement this interface and provide your own and methods for the type. When the object returned by this method is enumerated, `Union` enumerates `first` and `second` in that order and yields each element that has not already been yielded. @@ -17727,7 +17727,7 @@ The method is typically a constant-time operation, but ultimately this depends o :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet109"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet109"::: - If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override and methods. + If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet9"::: @@ -17819,19 +17819,19 @@ The method is typically a constant-time operation, but ultimately this depends o ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - If `comparer` is `null`, the default equality comparer, , is used to compare values. + If `comparer` is `null`, the default equality comparer, , is used to compare values. - When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. + When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. - The method differs from the method because the method returns all the elements in the input sequences including duplicates, whereas returns only unique values. + The method differs from the method because the method returns all the elements in the input sequences including duplicates, whereas returns only unique values. ## Examples - The following example shows how to implement an equality comparer that can be used in the method. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Union"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet2"::: @@ -17910,7 +17910,7 @@ This method is implemented by using deferred execution. The immediate return val The default equality comparer, , is used to compare values. -When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. +When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. ]]> @@ -17994,7 +17994,7 @@ This method is implemented by using deferred execution. The immediate return val If `comparer` is `null`, the default equality comparer, , is used to compare values. -When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. +When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. ]]> @@ -18077,10 +18077,10 @@ When the object returned by this method is enumerated, . + In query expression syntax, a `where` (C#) or `Where` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to filter a sequence. + The following code example demonstrates how to use to filter a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet110"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet110"::: @@ -18159,7 +18159,7 @@ When the object returned by this method is enumerated, to filter a sequence based on a predicate that involves the index of each element. + The following code example demonstrates how to use to filter a sequence based on a predicate that involves the index of each element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet111"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet111"::: @@ -18327,7 +18327,7 @@ When the object returned by this method is enumerated, method to merge two sequences. + The following code example demonstrates how to use the method to merge two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet200"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet200"::: diff --git a/xml/System.Linq/IGrouping`2.xml b/xml/System.Linq/IGrouping`2.xml index 93a0ee441e1..5b62fdd5dd4 100644 --- a/xml/System.Linq/IGrouping`2.xml +++ b/xml/System.Linq/IGrouping`2.xml @@ -85,22 +85,22 @@ is an that additionally has a key. The key represents the attribute that is common to each value in the . + An is an that additionally has a key. The key represents the attribute that is common to each value in the . - The values of an are accessed much as the elements of an are accessed. For example, you can access the values by using a `foreach` in Visual C# or `For Each` in Visual Basic loop to iterate through the object. The Example section contains a code example that shows you how to access both the key and the values of an object. + The values of an are accessed much as the elements of an are accessed. For example, you can access the values by using a `foreach` in Visual C# or `For Each` in Visual Basic loop to iterate through the object. The Example section contains a code example that shows you how to access both the key and the values of an object. - The type is used by the standard query operator methods, which return a sequence of elements of type . + The type is used by the standard query operator methods, which return a sequence of elements of type . ## Examples - The following example demonstrates how to work with an object. + The following example demonstrates how to work with an object. - In this example, is called on the array of objects returned by . groups the objects based on the value of their property. Each unique value for in the array of objects becomes a key for a new object, and the objects that have that key form the object's sequence of values. + In this example, is called on the array of objects returned by . groups the objects based on the value of their property. Each unique value for in the array of objects becomes a key for a new object, and the objects that have that key form the object's sequence of values. - Finally, the method is called on the sequence of objects to obtain just the first object. + Finally, the method is called on the sequence of objects to obtain just the first object. - The example then outputs the key of the object and the property of each value in the object's sequence of values. Notice that to access an object's sequence of values, you simply use the variable itself. + The example then outputs the key of the object and the property of each value in the object's sequence of values. Notice that to access an object's sequence of values, you simply use the variable itself. :::code language="csharp" source="~/snippets/csharp/System.Linq/IGroupingTKey,TElement/Overview/igrouping.cs" interactive="try-dotnet-method" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/IGroupingTKey,TElement/Overview/IGrouping.vb" id="Snippet1"::: @@ -153,12 +153,12 @@ represents the attribute that is common to each value in the . + The key of an represents the attribute that is common to each value in the . ## Examples - The following example demonstrates how to use the property to label each object in a sequence of objects. The method is used to obtain a sequence of objects. The `foreach` in Visual C# or `For Each` in Visual Basic loop then iterates through each object, outputting its key and the number of values it contains. + The following example demonstrates how to use the property to label each object in a sequence of objects. The method is used to obtain a sequence of objects. The `foreach` in Visual C# or `For Each` in Visual Basic loop then iterates through each object, outputting its key and the number of values it contains. :::code language="csharp" source="~/snippets/csharp/System.Linq/IGroupingTKey,TElement/Overview/igrouping.cs" interactive="try-dotnet-method" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/IGroupingTKey,TElement/Overview/IGrouping.vb" id="Snippet2"::: diff --git a/xml/System.Linq/ILookup`2.xml b/xml/System.Linq/ILookup`2.xml index f39b4755f79..b4e34f47b39 100644 --- a/xml/System.Linq/ILookup`2.xml +++ b/xml/System.Linq/ILookup`2.xml @@ -73,21 +73,21 @@ The type of the elements in the sequences that make up the values in the . Defines an indexer, size property, and Boolean search method for data structures that map keys to sequences of values. - implements the interface. - - The extension method , which can be appended to the end of a LINQ query, returns an object of type . - - - -## Examples - The following code example creates an object and iterates through its contents. - + implements the interface. + + The extension method , which can be appended to the end of a LINQ query, returns an object of type . + + + +## Examples + The following code example creates an object and iterates through its contents. + :::code language="csharp" source="~/snippets/csharp/System.Linq/ILookupTKey,TElement/Overview/ILookup.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq/ILookupTKey,TElement/Overview/ILookup.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq/ILookupTKey,TElement/Overview/ILookup.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Linq/IOrderedEnumerable`1.xml b/xml/System.Linq/IOrderedEnumerable`1.xml index f71899bdcdb..a7f017d2566 100644 --- a/xml/System.Linq/IOrderedEnumerable`1.xml +++ b/xml/System.Linq/IOrderedEnumerable`1.xml @@ -67,22 +67,22 @@ The type of the elements of the sequence. Represents a sorted sequence. - . - - The extension methods and operate on objects of type . An object of type can be obtained by calling one of the primary sort methods, or , which return an . and , the subordinate sort methods, in turn also return an object of type . This design allows for any number of consecutive calls to or , where each call performs a subordinate ordering on the sorted data returned from the previous call. - - - -## Examples - The following example demonstrates how to perform a primary and secondary ordering on an array of strings. It also demonstrates that the resulting is enumerable. - + . + + The extension methods and operate on objects of type . An object of type can be obtained by calling one of the primary sort methods, or , which return an . and , the subordinate sort methods, in turn also return an object of type . This design allows for any number of consecutive calls to or , where each call performs a subordinate ordering on the sorted data returned from the previous call. + + + +## Examples + The following example demonstrates how to perform a primary and secondary ordering on an array of strings. It also demonstrates that the resulting is enumerable. + :::code language="csharp" source="~/snippets/csharp/System.Linq/IOrderedEnumerableTElement/Overview/IOrderedEnumerable.cs" interactive="try-dotnet-method" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/IOrderedEnumerableTElement/Overview/IOrderedEnumerable.vb" id="Snippet1"::: - + ]]> @@ -158,16 +158,16 @@ Performs a subsequent ordering on the elements of an according to a key. An whose elements are sorted according to a key. - or , depending on whether `descending` is `true` or `false`. They both perform a subordinate ordering of an already sorted sequence of type . - - - -## Examples - The following code example demonstrates how to use to perform a secondary ordering on an . - + or , depending on whether `descending` is `true` or `false`. They both perform a subordinate ordering of an already sorted sequence of type . + + + +## Examples + The following code example demonstrates how to use to perform a secondary ordering on an . + :::code language="csharp" source="~/snippets/csharp/System.Linq/IOrderedEnumerableTElement/Overview/IOrderedEnumerable.cs" interactive="try-dotnet-method" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/IOrderedEnumerableTElement/Overview/IOrderedEnumerable.vb" id="Snippet2"::: diff --git a/xml/System.Linq/IOrderedQueryable.xml b/xml/System.Linq/IOrderedQueryable.xml index 51f2b94f5a8..3e0a8eb5118 100644 --- a/xml/System.Linq/IOrderedQueryable.xml +++ b/xml/System.Linq/IOrderedQueryable.xml @@ -58,15 +58,15 @@ Represents the result of a sorting operation. - interface is intended for implementation by query providers. - - This interface represents the result of a sorting query that calls the method(s) , , or . When is called and passed an expression tree that represents a sorting query, the resulting object must be of a type that implements . - - For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). - + interface is intended for implementation by query providers. + + This interface represents the result of a sorting query that calls the method(s) , , or . When is called and passed an expression tree that represents a sorting query, the resulting object must be of a type that implements . + + For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). + ]]> diff --git a/xml/System.Linq/IOrderedQueryable`1.xml b/xml/System.Linq/IOrderedQueryable`1.xml index fd78b42386b..d2e322efc36 100644 --- a/xml/System.Linq/IOrderedQueryable`1.xml +++ b/xml/System.Linq/IOrderedQueryable`1.xml @@ -83,15 +83,15 @@ The type of the content of the data source. Represents the result of a sorting operation. - interface is intended for implementation by query providers. - - This interface represents the result of a sorting query that calls the method(s) , , or . When is called and passed an expression tree that represents a sorting query, the resulting object must be of a type that implements . - - For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). - + interface is intended for implementation by query providers. + + This interface represents the result of a sorting query that calls the method(s) , , or . When is called and passed an expression tree that represents a sorting query, the resulting object must be of a type that implements . + + For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). + ]]> diff --git a/xml/System.Linq/IQueryProvider.xml b/xml/System.Linq/IQueryProvider.xml index c0b44cf1223..e8929c3a75a 100644 --- a/xml/System.Linq/IQueryProvider.xml +++ b/xml/System.Linq/IQueryProvider.xml @@ -113,9 +113,9 @@ > [!NOTE] > The property of the returned object is equal to `expression`. - The method is used to create new objects, given an expression tree. The query that is represented by the returned object is associated with a specific LINQ provider. + The method is used to create new objects, given an expression tree. The query that is represented by the returned object is associated with a specific LINQ provider. - Several of the standard query operator methods defined in , such as and , call this method. They pass it a that represents a LINQ query. + Several of the standard query operator methods defined in , such as and , call this method. They pass it a that represents a LINQ query. ]]> @@ -183,9 +183,9 @@ ## Remarks > [!NOTE] -> The property of the returned object is equal to `expression`. +> The property of the returned object is equal to `expression`. - The method is used to create new objects, given an expression tree. The query that is represented by the returned object is associated with a specific LINQ provider. + The method is used to create new objects, given an expression tree. The query that is represented by the returned object is associated with a specific LINQ provider. Most of the standard query operator methods that return enumerable results call this method. They pass it a that represents a LINQ query. @@ -243,7 +243,7 @@ method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when their associated object is enumerated. + The method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when their associated object is enumerated. ]]> @@ -309,9 +309,9 @@ method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when the object that contains the expression tree is enumerated. + The method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when the object that contains the expression tree is enumerated. - The standard query operator methods that return singleton results call . They pass it a that represents a LINQ query. + The standard query operator methods that return singleton results call . They pass it a that represents a LINQ query. ]]> diff --git a/xml/System.Linq/IQueryable.xml b/xml/System.Linq/IQueryable.xml index 7bccc13a41e..edd777babe4 100644 --- a/xml/System.Linq/IQueryable.xml +++ b/xml/System.Linq/IQueryable.xml @@ -54,9 +54,9 @@ interface is intended for implementation by query providers. It is only supposed to be implemented by providers that also implement . If the provider does not also implement , the standard query operators cannot be used on the provider's data source. + The interface is intended for implementation by query providers. It is only supposed to be implemented by providers that also implement . If the provider does not also implement , the standard query operators cannot be used on the provider's data source. - The interface inherits the interface so that if it represents a query, the results of that query can be enumerated. Enumeration causes the expression tree associated with an object to be executed. The definition of "executing an expression tree" is specific to a query provider. For example, it may involve translating the expression tree to an appropriate query language for the underlying data source. Queries that do not return enumerable results are executed when the method is called. + The interface inherits the interface so that if it represents a query, the results of that query can be enumerated. Enumeration causes the expression tree associated with an object to be executed. The definition of "executing an expression tree" is specific to a query provider. For example, it may involve translating the expression tree to an appropriate query language for the underlying data source. Queries that do not return enumerable results are executed when the method is called. For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). diff --git a/xml/System.Linq/IQueryable`1.xml b/xml/System.Linq/IQueryable`1.xml index e89636147a2..0e98d11f97d 100644 --- a/xml/System.Linq/IQueryable`1.xml +++ b/xml/System.Linq/IQueryable`1.xml @@ -75,21 +75,21 @@ The type of the data in the data source. Provides functionality to evaluate queries against a specific data source wherein the type of the data is known. - interface is intended for implementation by query providers. - - This interface inherits the interface so that if it represents a query, the results of that query can be enumerated. Enumeration forces the expression tree associated with an object to be executed. Queries that do not return enumerable results are executed when the method is called. - - The definition of "executing an expression tree" is specific to a query provider. For example, it may involve translating the expression tree to a query language appropriate for an underlying data source. - - The interface enables queries to be polymorphic. That is, because a query against an `IQueryable` data source is represented as an expression tree, it can be executed against different types of data sources. - - The `static` (`Shared` in Visual Basic) methods defined in the class (except for , , and ) extend objects of types that implement the interface. - + interface is intended for implementation by query providers. + + This interface inherits the interface so that if it represents a query, the results of that query can be enumerated. Enumeration forces the expression tree associated with an object to be executed. Queries that do not return enumerable results are executed when the method is called. + + The definition of "executing an expression tree" is specific to a query provider. For example, it may involve translating the expression tree to a query language appropriate for an underlying data source. + + The interface enables queries to be polymorphic. That is, because a query against an `IQueryable` data source is represented as an expression tree, it can be executed against different types of data sources. + + The `static` (`Shared` in Visual Basic) methods defined in the class (except for , , and ) extend objects of types that implement the interface. + For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). - + ]]> diff --git a/xml/System.Linq/ImmutableArrayExtensions.xml b/xml/System.Linq/ImmutableArrayExtensions.xml index a8996ba829c..d19266d2a94 100644 --- a/xml/System.Linq/ImmutableArrayExtensions.xml +++ b/xml/System.Linq/ImmutableArrayExtensions.xml @@ -99,7 +99,7 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. ]]> @@ -175,7 +175,7 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. ]]> @@ -262,7 +262,7 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. ]]> diff --git a/xml/System.Linq/Lookup`2.xml b/xml/System.Linq/Lookup`2.xml index 0b03098a5f6..83915fcbc50 100644 --- a/xml/System.Linq/Lookup`2.xml +++ b/xml/System.Linq/Lookup`2.xml @@ -88,17 +88,17 @@ resembles a . The difference is that a maps keys to single values, whereas a maps keys to collections of values. + A resembles a . The difference is that a maps keys to single values, whereas a maps keys to collections of values. - You can create an instance of a by calling on an object that implements . + You can create an instance of a by calling on an object that implements . > [!NOTE] -> There is no public constructor to create a new instance of a . Additionally, objects are immutable, that is, you cannot add or remove elements or keys from a object after it has been created. +> There is no public constructor to create a new instance of a . Additionally, objects are immutable, that is, you cannot add or remove elements or keys from a object after it has been created. ## Examples - The following example creates a from a collection of objects. It then enumerates the and outputs each key and each value in the key's associated collection of values. It also demonstrates how to use the properties and and the methods and . + The following example creates a from a collection of objects. It then enumerates the and outputs each key and each value in the key's associated collection of values. It also demonstrates how to use the properties and and the methods and . :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet1"::: @@ -228,7 +228,7 @@ to determine whether a contains a specified key. This code example is part of a larger example provided for the class. + The following example demonstrates how to use to determine whether a contains a specified key. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet4"::: @@ -290,12 +290,12 @@ property does not change because items cannot be added to or removed from a object after it has been created. + The value of the property does not change because items cannot be added to or removed from a object after it has been created. ## Examples - The following example demonstrates how to use to determine the number of key/value collection pairs in a . This code example is part of a larger example provided for the class. + The following example demonstrates how to use to determine the number of key/value collection pairs in a . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet2"::: @@ -363,7 +363,7 @@ to iterate through the keys and values of a . This code example is part of a larger example provided for the class. + The following example demonstrates how to use to iterate through the keys and values of a . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet5"::: @@ -423,12 +423,12 @@ by using the following syntax: `myLookup[key]` in Visual C# or `myLookup(key)` in Visual Basic. If the `key` is not found in the collection, an empty sequence is returned. + This indexed property provides the ability to index a specific collection of values in the by using the following syntax: `myLookup[key]` in Visual C# or `myLookup(key)` in Visual Basic. If the `key` is not found in the collection, an empty sequence is returned. ## Examples - The following example demonstrates how to use to index directly into a . This code example is part of a larger example provided for the class. + The following example demonstrates how to use to index directly into a . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet3"::: diff --git a/xml/System.Linq/ParallelEnumerable.xml b/xml/System.Linq/ParallelEnumerable.xml index 233165fccea..32fe8686b2e 100644 --- a/xml/System.Linq/ParallelEnumerable.xml +++ b/xml/System.Linq/ParallelEnumerable.xml @@ -955,7 +955,7 @@ operator can be used to convert a ParallelQuery to a ParallelQuery(T). + The operator can be used to convert a ParallelQuery to a ParallelQuery(T). ]]> @@ -2521,7 +2521,7 @@ and a right data source of type . Otherwise, the Concat operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Concat with a left data source of type and a right data source of type . Otherwise, the Concat operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -3404,7 +3404,7 @@ and a right data source of type . Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Except with a left data source of type and a right data source of type . Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -3554,7 +3554,7 @@ and a right data source of type . Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Except with a left data source of type and a right data source of type . Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -4825,7 +4825,7 @@ and a right data source of type . Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of GroupJoin with a left data source of type and a right data source of type . Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5041,7 +5041,7 @@ and a right data source of type . Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of GroupJoin with a left data source of type and a right data source of type . Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5228,7 +5228,7 @@ and a right data source of type . Otherwise, the Intersect operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Intersect with a left data source of type and a right data source of type . Otherwise, the Intersect operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5378,7 +5378,7 @@ and a right data source of type . Otherwise, the Intersect operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Intersect with a left data source of type and a right data source of type . Otherwise, the Intersect operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5565,7 +5565,7 @@ and a right data source of type . Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage Join with a left data source of type and a right data source of type . Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5781,7 +5781,7 @@ and a right data source of type . Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Join with a left data source of type and a right data source of type . Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -9144,7 +9144,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -9232,7 +9232,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -9320,7 +9320,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -10046,7 +10046,7 @@ and a right data source of type . Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of SequenceEqual with a left data source of type and a right data source of type . Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -10191,7 +10191,7 @@ and a right data source of type . Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation. + This overload exists to disallow usage of SequenceEqual with a left data source of type and a right data source of type . Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation. ]]> @@ -12143,7 +12143,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -12231,7 +12231,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -12319,7 +12319,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -12407,7 +12407,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -13232,7 +13232,7 @@ and a right data source of type . Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation. + This overload exists to disallow usage of Union with a left data source of type and a right data source of type . Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation. ]]> @@ -13384,7 +13384,7 @@ and a right data source of type . Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Union with a left data source of type and a right data source of type . Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -13959,7 +13959,7 @@ and a right data source of type . Otherwise, the Zip operator would appear to be bind to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Zip with a left data source of type and a right data source of type . Otherwise, the Zip operator would appear to be bind to the parallel implementation, but would in reality bind to the sequential implementation. ]]> diff --git a/xml/System.Linq/Queryable.xml b/xml/System.Linq/Queryable.xml index 976c3b7e326..a95a29e23ba 100644 --- a/xml/System.Linq/Queryable.xml +++ b/xml/System.Linq/Queryable.xml @@ -55,13 +55,13 @@ class provides an implementation of the standard query operators for querying data sources that implement . The standard query operators are general purpose methods that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data in any .NET-based programming language. + The set of methods declared in the class provides an implementation of the standard query operators for querying data sources that implement . The standard query operators are general purpose methods that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data in any .NET-based programming language. - The majority of the methods in this class are defined as extension methods that extend the type. This means they can be called like an instance method on any object that implements . These methods that extend do not perform any querying directly. Instead, their functionality is to build an object, which is an expression tree that represents the cumulative query. The methods then pass the new expression tree to either the method or the method of the input . The method that is called depends on whether the method returns a singleton value, in which case is called, or has enumerable results, in which case is called. + The majority of the methods in this class are defined as extension methods that extend the type. This means they can be called like an instance method on any object that implements . These methods that extend do not perform any querying directly. Instead, their functionality is to build an object, which is an expression tree that represents the cumulative query. The methods then pass the new expression tree to either the method or the method of the input . The method that is called depends on whether the method returns a singleton value, in which case is called, or has enumerable results, in which case is called. - The actual query execution on the target data is performed by a class that implements . The expectation of any implementation is that the result of executing an expression tree that was constructed by a standard query operator method is equivalent to the result of calling the corresponding method in the class, if the data source were an . + The actual query execution on the target data is performed by a class that implements . The expectation of any implementation is that the result of executing an expression tree that was constructed by a standard query operator method is equivalent to the result of calling the corresponding method in the class, if the data source were an . - In addition to the standard query operator methods that operate on objects, this class also contains a method, , which types objects as objects. + In addition to the standard query operator methods that operate on objects, this class also contains a method, , which types objects as objects. ]]> @@ -136,18 +136,18 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The first value in `source` is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The first value in `source` is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. - To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to build a sentence from an array of strings. + The following code example demonstrates how to use to build a sentence from an array of strings. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet1"::: @@ -236,18 +236,18 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The `seed` parameter is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The `seed` parameter is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. - To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to apply an accumulator function when a seed value is provided to the function. + The following code example demonstrates how to use to apply an accumulator function when a seed value is provided to the function. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet2"::: @@ -345,18 +345,18 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The `seed` parameter is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. The final accumulated value is passed to `selector` to obtain the result value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The `seed` parameter is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. The final accumulated value is passed to `selector` to obtain the result value. - To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to apply an accumulator function and a result selector. + The following code example demonstrates how to use to apply an accumulator function and a result selector. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet3"::: @@ -587,21 +587,21 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the `source` parameter's type. The expected behavior is that it determines if all the elements in `source` satisfy the condition in `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the `source` parameter's type. The expected behavior is that it determines if all the elements in `source` satisfy the condition in `predicate`. ## Examples - The following code example demonstrates how to use to determine whether all the elements in a sequence satisfy a condition. + The following code example demonstrates how to use to determine whether all the elements in a sequence satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet4"::: - The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `All` method. + The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `All` method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet134"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet134"::: @@ -686,19 +686,19 @@ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains any elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains any elements. ## Examples - The following code example demonstrates how to use to determine whether a sequence contains any elements. + The following code example demonstrates how to use to determine whether a sequence contains any elements. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet5"::: - The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `Any` method. + The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `Any` method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet135"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet135"::: @@ -775,16 +775,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if any of the elements of `source` satisfy the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if any of the elements of `source` satisfy the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to determine whether any element in a sequence satisfies a condition. + The following code example demonstrates how to use to determine whether any element in a sequence satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet6"::: @@ -916,9 +916,9 @@ , returns it directly. Otherwise, it returns an that executes queries by calling the equivalent query operator methods in instead of those in . + If the type of `source` implements , returns it directly. Otherwise, it returns an that executes queries by calling the equivalent query operator methods in instead of those in . - This method assumes that `source` implements for some `T`. At runtime, the result is of type for the same `T`. This method is useful in dynamic scenarios when you do not statically know the type of `T`. + This method assumes that `source` implements for some `T`. At runtime, the result is of type for the same `T`. This method is useful in dynamic scenarios when you do not statically know the type of `T`. ]]> @@ -999,12 +999,12 @@ , returns it directly. Otherwise, it returns an that executes queries by calling the equivalent query operator methods in instead of those in . + If the type of `source` implements , returns it directly. Otherwise, it returns an that executes queries by calling the equivalent query operator methods in instead of those in . ## Examples - The following code example demonstrates how to use to convert an to an . + The following code example demonstrates how to use to convert an to an . :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet125"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet125"::: @@ -1071,14 +1071,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1139,14 +1139,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1207,14 +1207,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet8"::: @@ -1273,14 +1273,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1341,14 +1341,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1407,14 +1407,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1473,14 +1473,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1539,14 +1539,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet12"::: @@ -1603,14 +1603,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1669,14 +1669,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1756,16 +1756,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1845,16 +1845,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1934,16 +1934,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet18"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet18"::: @@ -2021,16 +2021,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2110,16 +2110,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2197,16 +2197,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2284,16 +2284,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2371,16 +2371,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2458,16 +2458,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2545,16 +2545,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2632,12 +2632,12 @@ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it converts the values in `source` to type `TResult`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it converts the values in `source` to type `TResult`. ## Examples - The following code example demonstrates how to use to convert objects in a sequence to type . + The following code example demonstrates how to use to convert objects in a sequence to type . :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet19"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet19"::: @@ -2785,14 +2785,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the elements in `source2` are concatenated to those of `source1` to create a new sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the elements in `source2` are concatenated to those of `source1` to create a new sequence. ## Examples - The following code example demonstrates how to use to concatenate two sequences. + The following code example demonstrates how to use to concatenate two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet20"::: @@ -2879,14 +2879,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains `item`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains `item`. ## Examples - The following code example demonstrates how to use to determine whether a sequence contains a specific element. + The following code example demonstrates how to use to determine whether a sequence contains a specific element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet21"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet21"::: @@ -2973,9 +2973,9 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains `item` by using `comparer` to compare values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains `item` by using `comparer` to compare values. ]]> @@ -3056,14 +3056,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source`. ## Examples - The following code example demonstrates how to use to count the elements in a sequence. + The following code example demonstrates how to use to count the elements in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet22"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet22"::: @@ -3140,16 +3140,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` that satisfy the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` that satisfy the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to count the elements in a sequence that satisfy a condition. + The following code example demonstrates how to use to count the elements in a sequence that satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet23"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet23"::: @@ -3299,14 +3299,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns `source` if it is not empty. Otherwise, it returns an that contains `default(TSource)`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns `source` if it is not empty. Otherwise, it returns an that contains `default(TSource)`. ## Examples - The following code examples demonstrate how to use to provide a default value in case the source sequence is empty. + The following code examples demonstrate how to use to provide a default value in case the source sequence is empty. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet24"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet24"::: @@ -3382,14 +3382,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns `source` if it is not empty. Otherwise, it returns an that contains `defaultValue`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns `source` if it is not empty. Otherwise, it returns an that contains `defaultValue`. ## Examples - The following code example shows a situation in which it is useful to call in a LINQ query. A default value is passed to in this example. + The following code example shows a situation in which it is useful to call in a LINQ query. A default value is passed to in this example. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet25"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet25"::: @@ -3473,14 +3473,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns an unordered sequence of the unique items in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns an unordered sequence of the unique items in `source`. ## Examples - The following code example demonstrates how to use to return distinct elements from a sequence. + The following code example demonstrates how to use to return distinct elements from a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet27"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet27"::: @@ -3564,9 +3564,9 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns an unordered sequence of the unique items in `source` by using `comparer` to compare values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns an unordered sequence of the unique items in `source` by using `comparer` to compare values. ]]> @@ -3839,14 +3839,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the item at position `index` in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the item at position `index` in `source`. ## Examples - The following code example demonstrates how to use to return an element at a specific position in a sequence. + The following code example demonstrates how to use to return an element at a specific position in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet28"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet28"::: @@ -3984,14 +3984,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the item at position `index` in `source`, or `default(TSource)` if `index` is outside the bounds of `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the item at position `index` in `source`, or `default(TSource)` if `index` is outside the bounds of `source`. ## Examples - The following code example demonstrates how to use . This example uses a value for `index` that is outside the bounds of the source sequence. + The following code example demonstrates how to use . This example uses a value for `index` that is outside the bounds of the source sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet29"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet29"::: @@ -4077,14 +4077,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the`source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the`source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` are returned except for those that are also in `source2`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` are returned except for those that are also in `source2`. ## Examples - The following code example demonstrates how to use to return those elements that only appear in the first source sequence. + The following code example demonstrates how to use to return those elements that only appear in the first source sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet34"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet34"::: @@ -4170,9 +4170,9 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the`source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the`source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` are returned except for those that are also in `source2`, and `comparer` is used to compare values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` are returned except for those that are also in `source2`, and `comparer` is used to compare values. ]]> @@ -4394,14 +4394,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source`. ## Examples - The following code example demonstrates how to use to return the first element in a sequence. + The following code example demonstrates how to use to return the first element in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet35"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet35"::: @@ -4478,16 +4478,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source` that satisfies the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source` that satisfies the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to return the first element of a sequence that satisfies a condition. + The following code example demonstrates how to use to return the first element of a sequence that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet36"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet36"::: @@ -4578,21 +4578,21 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source`, or a default value if `source` is empty. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source`, or a default value if `source` is empty. - The method does not provide a way to specify the default value to return if `source` is empty. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify the default value to return if `source` is empty. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use on an empty sequence. + The following code example demonstrates how to use on an empty sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet37"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet37"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the first element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric months is empty. Because the default value for an integer is 0, which does not correspond to any month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the first element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric months is empty. Because the default value for an integer is 0, which does not correspond to any month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet131"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet131"::: @@ -4670,16 +4670,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source` that satisfies the condition in `predicate`, or a default value if no element satisfies the condition. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source` that satisfies the condition in `predicate`, or a default value if no element satisfies the condition. ## Examples - The following code example demonstrates how to use by passing in a predicate. In the second query, there is no element in the sequence that satisfies the condition. + The following code example demonstrates how to use by passing in a predicate. In the second query, there is no element in the sequence that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet38"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet38"::: @@ -4892,16 +4892,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. ## Examples - The following code example demonstrates how to use to group the elements of a sequence. + The following code example demonstrates how to use to group the elements of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet14"::: @@ -4996,11 +4996,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value. The key value is obtained by invoking `keySelector` on each element, and key values are compared by using `comparer`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value. The key value is obtained by invoking `keySelector` on each element, and key values are compared by using `comparer`. ]]> @@ -5093,16 +5093,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. It invokes `elementSelector` on each element to obtain a result element. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. It invokes `elementSelector` on each element to obtain a result element. ## Examples - The following code example demonstrates how to use to group the elements of a sequence. + The following code example demonstrates how to use to group the elements of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet39"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet39"::: @@ -5208,11 +5208,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. Key values are compared by using `comparer`. The `elementSelector` parameter is invoked on each element to obtain a result element. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. Key values are compared by using `comparer`. The `elementSelector` parameter is invoked on each element to obtain a result element. ]]> @@ -5305,16 +5305,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. The `resultSelector` parameter is used to obtain a result value from each group and its key. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. The `resultSelector` parameter is used to obtain a result value from each group and its key. ## Examples - The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. + The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet15"::: @@ -5420,11 +5420,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `comparer` parameter is used to compare keys and the `resultSelector` parameter is used to obtain a result value from each group and its key. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `comparer` parameter is used to compare keys and the `resultSelector` parameter is used to obtain a result value from each group and its key. ]]> @@ -5528,16 +5528,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `elementSelector` parameter is used to project the elements of each group, and the `resultSelector` parameter is used to obtain a result value from each group and its key. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `elementSelector` parameter is used to project the elements of each group, and the `resultSelector` parameter is used to obtain a result value from each group and its key. ## Examples - The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. + The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet130"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet130"::: @@ -5654,11 +5654,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `comparer` parameter is used to compare key values. The `elementSelector` parameter is used to project the elements of each group, and the `resultSelector` parameter is used to obtain a result value from each group and its key. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `comparer` parameter is used to compare key values. The `elementSelector` parameter is used to project the elements of each group, and the `resultSelector` parameter is used to obtain a result value from each group and its key. ]]> @@ -5774,16 +5774,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that the `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality to match each element in `outer` with zero or more elements from `inner`. Then the `resultSelector` function is invoked to project a result object from each group of correlated elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that the `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality to match each element in `outer` with zero or more elements from `inner`. Then the `resultSelector` function is invoked to project a result object from each group of correlated elements. ## Examples - The following code example demonstrates how to use to perform a grouped join on two sequences. + The following code example demonstrates how to use to perform a grouped join on two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet40"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet40"::: @@ -5902,11 +5902,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that the `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality by using `comparer`. The outcome of the comparisons is used to match each element in `outer` with zero or more elements from `inner`. Then the `resultSelector` function is invoked to project a result object from each group of correlated elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that the `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality by using `comparer`. The outcome of the comparisons is used to match each element in `outer` with zero or more elements from `inner`. Then the `resultSelector` function is invoked to project a result object from each group of correlated elements. ]]> @@ -6045,14 +6045,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` that are also in `source2` are returned. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` that are also in `source2` are returned. ## Examples - The following code example demonstrates how to use to return the elements that appear in each of two sequences. + The following code example demonstrates how to use to return the elements that appear in each of two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet41"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet41"::: @@ -6138,9 +6138,9 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` that are also in `source2` are returned. The `comparer` parameter is used to compare elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` that are also in `source2` are returned. The `comparer` parameter is used to compare elements. ]]> @@ -6401,16 +6401,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that of an inner join. The `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality to match elements from each sequence. A pair of elements is stored for each element in `inner` that matches an element in `outer`. Then the `resultSelector` function is invoked to project a result object from each pair of matching elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that of an inner join. The `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality to match elements from each sequence. A pair of elements is stored for each element in `inner` that matches an element in `outer`. Then the `resultSelector` function is invoked to project a result object from each pair of matching elements. ## Examples - The following code example demonstrates how to use to perform an inner join of two sequences based on a common key. + The following code example demonstrates how to use to perform an inner join of two sequences based on a common key. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet42"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet42"::: @@ -6529,11 +6529,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that of an inner join. The `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality by using `comparer`. The outcome of the comparisons is used to create a matching pair for each element in `inner` that matches an element in `outer`. Then the `resultSelector` function is invoked to project a result object from each pair of matching elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that of an inner join. The `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality by using `comparer`. The outcome of the comparisons is used to create a matching pair for each element in `inner` that matches an element in `outer`. Then the `resultSelector` function is invoked to project a result object from each pair of matching elements. ]]> @@ -6614,14 +6614,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source`. ## Examples - The following code example demonstrates how to use to return the last element of an array. + The following code example demonstrates how to use to return the last element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet43"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet43"::: @@ -6698,16 +6698,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source` that satisfies the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source` that satisfies the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to return the last element of an array that satisfies a condition. + The following code example demonstrates how to use to return the last element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet44"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet44"::: @@ -6798,21 +6798,21 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source`, or a default value if `source` is empty. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source`, or a default value if `source` is empty. - The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use on an empty array. + The following code example demonstrates how to use on an empty array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet45"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet45"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the last element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric days of the month is empty. Because the default value for an integer is 0, which does not correspond to any day of the month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the last element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric days of the month is empty. Because the default value for an integer is 0, which does not correspond to any day of the month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet132"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet132"::: @@ -6890,16 +6890,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source` that satisfies the condition specified by `predicate`. It returns a default value if there is no such element in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source` that satisfies the condition specified by `predicate`. It returns a default value if there is no such element in `source`. ## Examples - The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the sequence that satisfies the condition. + The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the sequence that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet46"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet46"::: @@ -7306,14 +7306,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` and returns an . + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` and returns an . ## Examples - The following code example demonstrates how to use to count the elements in an array. + The following code example demonstrates how to use to count the elements in an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet47"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet47"::: @@ -7390,16 +7390,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` that satisfy the condition specified by `predicate` and returns an . + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` that satisfy the condition specified by `predicate` and returns an . ## Examples - The following code example demonstrates how to use to count the elements in an array that satisfy a condition. + The following code example demonstrates how to use to count the elements in an array that satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet48"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet48"::: @@ -7475,14 +7475,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the maximum value in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the maximum value in `source`. ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence. + The following code example demonstrates how to use to determine the maximum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet52"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet52"::: @@ -7634,16 +7634,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element in `source` and returns the maximum value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element in `source` and returns the maximum value. ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet58"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet58"::: @@ -7941,14 +7941,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the minimum value in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the minimum value in `source`. ## Examples - The following code example demonstrates how to use to determine the minimum value in a sequence. + The following code example demonstrates how to use to determine the minimum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet60"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet60"::: @@ -8101,16 +8101,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element in `source` and returns the minimum value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element in `source` and returns the minimum value. ## Examples - The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. + The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet68"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet68"::: @@ -8407,7 +8407,7 @@ The last chunk will contain the remaining elements and may be of a smaller size. that represents calling `OfType` itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The `OfType` method generates a that represents calling `OfType` itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The query behavior that occurs as a result of executing an expression tree that represents calling `OfType` depends on the implementation of the type of the `source` parameter. The expected behavior is that it filters out any elements in `source` that are not of type `TResult`. @@ -8663,16 +8663,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. ## Examples - The following code example demonstrates how to use to sort the elements of a sequence. + The following code example demonstrates how to use to sort the elements of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet70"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet70"::: @@ -8767,11 +8767,11 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. The `comparer` parameter is used to compare keys. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. The `comparer` parameter is used to compare keys. ]]> @@ -8863,11 +8863,11 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. ]]> @@ -8959,16 +8959,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. The `comparer` parameter is used to compare keys. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. The `comparer` parameter is used to compare keys. ## Examples - The following code example demonstrates how to use to sort the elements of a sequence in descending order by using a custom comparer. + The following code example demonstrates how to use to sort the elements of a sequence in descending order by using a custom comparer. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet71"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet71"::: @@ -9257,14 +9257,14 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it reverses the order of the elements in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it reverses the order of the elements in `source`. ## Examples - The following code example demonstrates how to use to reverse the order of elements in an array. + The following code example demonstrates how to use to reverse the order of elements in an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet74"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet74"::: @@ -9564,16 +9564,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depend on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into a different form. + The query behavior that occurs as a result of executing an expression tree that represents calling depend on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into a different form. ## Examples - The following code example demonstrates how to use to project over a sequence of values and use the index of each element in the projected form. + The following code example demonstrates how to use to project over a sequence of values and use the index of each element in the projected form. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet76"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet76"::: @@ -9658,16 +9658,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into a different form. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into a different form. ## Examples - The following code example demonstrates how to use to project over a sequence of values. + The following code example demonstrates how to use to project over a sequence of values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet75"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet75"::: @@ -9762,16 +9762,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into an enumerable form. It then concatenates the enumerable results into a single, one-dimensional sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into an enumerable form. It then concatenates the enumerable results into a single, one-dimensional sequence. ## Examples - The following code example demonstrates how to use to perform a one-to-many projection over an array. + The following code example demonstrates how to use to perform a one-to-many projection over an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet77"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet77"::: @@ -9856,16 +9856,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into an enumerable form. Each enumerable result incorporates the index of the source element. It then concatenates the enumerable results into a single, one-dimensional sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into an enumerable form. Each enumerable result incorporates the index of the source element. It then concatenates the enumerable results into a single, one-dimensional sequence. ## Examples - The following code example demonstrates how to use to perform a one-to-many projection over an array and use the index of each source element. + The following code example demonstrates how to use to perform a one-to-many projection over an array and use the index of each source element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet78"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet78"::: @@ -9961,16 +9961,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `collectionSelector` on each element of `source` to project it into an enumerable form. Then the function represented by `resultSelector` is invoked on each element in each intermediate sequence. The resulting values are concatenated into a single, one-dimensional sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `collectionSelector` on each element of `source` to project it into an enumerable form. Then the function represented by `resultSelector` is invoked on each element in each intermediate sequence. The resulting values are concatenated into a single, one-dimensional sequence. ## Examples - The following code example demonstrates how to use to perform a one-to-many projection over an array. This example uses a result selector function to keep the source element that corresponds to each intermediate sequence in scope for the final call to `Select`. + The following code example demonstrates how to use to perform a one-to-many projection over an array. This example uses a result selector function to keep the source element that corresponds to each intermediate sequence in scope for the final call to `Select`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet124"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet124"::: @@ -10066,11 +10066,11 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `collectionSelector` on each element of `source` to project it into an enumerable form. Each enumerable result incorporates the source element's index. Then the function represented by `resultSelector` is invoked on each element in each intermediate sequence. The resulting values are concatenated into a single, one-dimensional sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `collectionSelector` on each element of `source` to project it into an enumerable form. Each enumerable result incorporates the source element's index. Then the function represented by `resultSelector` is invoked on each element in each intermediate sequence. The resulting values are concatenated into a single, one-dimensional sequence. ]]> @@ -10154,14 +10154,14 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that it determines if the two source sequences are equal. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that it determines if the two source sequences are equal. ## Examples - The following code example demonstrates how to use to determine whether two sequences are equal. In this example the sequences are equal. + The following code example demonstrates how to use to determine whether two sequences are equal. In this example the sequences are equal. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet32"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet32"::: @@ -10253,9 +10253,9 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that it determines if the two source sequences are equal by using `comparer` to compare elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that it determines if the two source sequences are equal by using `comparer` to compare elements. ]]> @@ -10379,14 +10379,14 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source`. ## Examples - The following code example demonstrates how to use to select the only element of an array. + The following code example demonstrates how to use to select the only element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet79"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet79"::: @@ -10468,16 +10468,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source` that satisfies the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source` that satisfies the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to select the only element of an array that satisfies a condition. + The following code example demonstrates how to use to select the only element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet81"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet81"::: @@ -10571,21 +10571,21 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source`, or a default value if `source` is empty. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source`, or a default value if `source` is empty. - The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use to select the only element of an array. The second query demonstrates that returns a default value when the sequence does not contain exactly one element. + The following code example demonstrates how to use to select the only element of an array. The second query demonstrates that returns a default value when the sequence does not contain exactly one element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet83"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet83"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the element. The following code example uses both techniques to obtain a default value of 1 if a collection of page numbers is empty. Because the default value for an integer is 0, which is not usually a valid page number, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the element. The following code example uses both techniques to obtain a default value of 1 if a collection of page numbers is empty. Because the default value for an integer is 0, which is not usually a valid page number, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet133"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet133"::: @@ -10664,16 +10664,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source` that satisfies the condition specified by `predicate`, or a default value if no such element exists. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source` that satisfies the condition specified by `predicate`, or a default value if no such element exists. ## Examples - The following code example demonstrates how to use to select the only element of an array that satisfies a condition. The second query demonstrates that returns a default value when the sequence does not contain exactly one element that satisfies the condition. + The following code example demonstrates how to use to select the only element of an array that satisfies a condition. The second query demonstrates that returns a default value when the sequence does not contain exactly one element that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet85"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet85"::: @@ -10868,14 +10868,14 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it skips the first `count` elements in `source` and returns the remaining elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it skips the first `count` elements in `source` and returns the remaining elements. ## Examples - The following code example demonstrates how to use to skip a specified number of elements in a sorted array and return the remaining elements. + The following code example demonstrates how to use to skip a specified number of elements in a sorted array and return the remaining elements. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet87"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet87"::: @@ -11030,16 +11030,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns false. That element and all the remaining elements are returned. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns false. That element and all the remaining elements are returned. ## Examples - The following code example demonstrates how to use to skip elements of an array as long as a condition is true. + The following code example demonstrates how to use to skip elements of an array as long as a condition is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet88"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet88"::: @@ -11115,16 +11115,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns false. That element and all the remaining elements are returned. The index of each source element is provided as the second argument to `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns false. That element and all the remaining elements are returned. The index of each source element is provided as the second argument to `predicate`. ## Examples - The following code example demonstrates how to use to skip elements of an array as long as a condition that depends on the element's index is true. + The following code example demonstrates how to use to skip elements of an array as long as a condition that depends on the element's index is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet89"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet89"::: @@ -11191,9 +11191,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11248,9 +11248,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11304,9 +11304,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11361,9 +11361,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11418,9 +11418,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11475,9 +11475,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11531,9 +11531,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11588,9 +11588,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11645,14 +11645,14 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ## Examples - The following code example demonstrates how to use to sum the values of a sequence. + The following code example demonstrates how to use to sum the values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet121"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet121"::: @@ -11709,14 +11709,14 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ## Examples - The following code example demonstrates how to use to sum the values of a sequence. + The following code example demonstrates how to use to sum the values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet120"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet120"::: @@ -11792,16 +11792,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -11880,14 +11880,14 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -11965,16 +11965,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12053,16 +12053,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12141,16 +12141,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12229,16 +12229,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12316,16 +12316,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12404,16 +12404,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12492,16 +12492,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12579,16 +12579,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12666,14 +12666,14 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it takes the first `count` elements from the start of `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it takes the first `count` elements from the start of `source`. ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence. + The following code example demonstrates how to use to return elements from the start of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet99"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet99"::: @@ -12885,16 +12885,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns `false`. It returns all the elements up until that point. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns `false`. It returns all the elements up until that point. ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition is true. + The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet100"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet100"::: @@ -12970,16 +12970,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns `false`. It returns all the elements up until that point. The index of each source element is provided as the second argument to `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns `false`. It returns all the elements up until that point. The index of each source element is provided as the second argument to `predicate`. ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition that uses the index of the element is true. + The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition that uses the index of the element is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet101"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet101"::: @@ -13074,16 +13074,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. ## Examples - The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence. + The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet102"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet102"::: @@ -13178,11 +13178,11 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. The `comparer` parameter is used to compare key values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. The `comparer` parameter is used to compare key values. ]]> @@ -13274,11 +13274,11 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. ]]> @@ -13370,16 +13370,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. The `comparer` parameter is used to compare key values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. The `comparer` parameter is used to compare key values. ## Examples - The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence in descending order by using a custom comparer. + The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence in descending order by using a custom comparer. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet103"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet103"::: @@ -13465,14 +13465,14 @@ If `count` is not a positive number, this method returns an empty queryable sequ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the set union of the elements in `source1` and `source2` is returned. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the set union of the elements in `source1` and `source2` is returned. ## Examples - The following code example demonstrates how to use to obtain the set union of two sequences. + The following code example demonstrates how to use to obtain the set union of two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet109"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet109"::: @@ -13558,9 +13558,9 @@ If `count` is not a positive number, this method returns an empty queryable sequ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the set union of the elements in `source1` and `source2` is returned. The `comparer` parameter is used to compare values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the set union of the elements in `source1` and `source2` is returned. The `comparer` parameter is used to compare values. ]]> @@ -13788,16 +13788,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the elements from `source` that satisfy the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the elements from `source` that satisfy the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to filter a sequence. + The following code example demonstrates how to use to filter a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet110"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet110"::: @@ -13873,16 +13873,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the elements from `source` that satisfy the condition specified by `predicate`. The index of each source element is provided as the second argument to `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the elements from `source` that satisfy the condition specified by `predicate`. The index of each source element is provided as the second argument to `predicate`. ## Examples - The following code example demonstrates how to use to filter a sequence based on a predicate that incorporates the index of each element. + The following code example demonstrates how to use to filter a sequence based on a predicate that incorporates the index of each element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet111"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet111"::: @@ -14054,14 +14054,14 @@ If `count` is not a positive number, this method returns an empty queryable sequ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. The method merges each element of the first sequence with an element that has the same index in the second sequence. If the sequences do not have the same number of elements, the method merges sequences until it reaches the end of one of them. For example, if one sequence has three elements and the other one has four, the resulting sequence will have only three elements. ## Examples - The following code example demonstrates how to use the method to merge two sequences. + The following code example demonstrates how to use the method to merge two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet200"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet200"::: From 418e41993c4853132b424fc6113ef93811162b0d Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:06:01 -0700 Subject: [PATCH 3/8] Accessibility and Microsoft* --- xml/Accessibility/IAccIdentity.xml | 18 +- xml/Accessibility/IAccPropServices.xml | 130 ++-- xml/Accessibility/IAccessible.xml | 198 +++---- xml/Accessibility/IAccessibleHandler.xml | 20 +- .../GenerateTemporaryTargetAssembly.xml | 2 +- .../RuntimeBinderException.xml | 12 +- ...RuntimeBinderInternalCompilerException.xml | 12 +- xml/Microsoft.CSharp/CSharpCodeProvider.xml | 2 +- xml/Microsoft.JScript.Vsa/JSVsaError.xml | 2 +- xml/Microsoft.JScript/ErrorObject.xml | 10 +- .../IDebugVsaScriptCodeItem.xml | 10 +- xml/Microsoft.JScript/JSParser.xml | 20 +- xml/Microsoft.JScript/JSScanner.xml | 20 +- xml/Microsoft.JScript/ScriptFunction.xml | 40 +- xml/Microsoft.SqlServer.Server/Format.xml | 56 +- .../IBinarySerialize.xml | 66 +-- xml/Microsoft.SqlServer.Server/SqlContext.xml | 2 +- .../SqlDataRecord.xml | 4 +- .../SqlFacetAttribute.xml | 2 +- .../SqlFunctionAttribute.xml | 6 +- .../SqlMetaData.xml | 28 +- .../SqlMethodAttribute.xml | 2 +- xml/Microsoft.SqlServer.Server/SqlPipe.xml | 22 +- .../SqlTriggerContext.xml | 2 +- .../SqlUserDefinedAggregateAttribute.xml | 2 +- .../SqlUserDefinedTypeAttribute.xml | 12 +- .../VisualBasicSettingsConverter.xml | 50 +- .../VisualBasic.xml | 20 +- .../VisualBasicImportReference.xml | 10 +- .../VisualBasicReference`1.xml | 30 +- .../VisualBasicValue`1.xml | 30 +- .../ApplicationBase.xml | 16 +- .../AssemblyInfo.xml | 4 +- .../AuthenticationMode.xml | 14 +- .../BuiltInRoleConverter.xml | 4 +- .../CantStartSingleInstanceException.xml | 12 +- .../ConsoleApplicationBase.xml | 6 +- .../NoStartupFormException.xml | 16 +- .../ShutdownMode.xml | 2 +- .../UnhandledExceptionEventArgs.xml | 38 +- .../User.xml | 12 +- .../WebUser.xml | 2 +- .../WindowsFormsApplicationBase.xml | 48 +- .../ADODC.xml | 20 +- .../ADODCArray.xml | 32 +- .../BaseControlArray.xml | 10 +- .../BaseDataEnvironment.xml | 294 ++++----- .../BaseOcxArray.xml | 20 +- .../ButtonArray.xml | 34 +- .../CheckBoxArray.xml | 32 +- .../CheckedListBoxArray.xml | 34 +- .../ColorDialogArray.xml | 10 +- .../ComboBoxArray.xml | 28 +- .../DirListBox.xml | 10 +- .../DirListBoxArray.xml | 32 +- .../DriveListBox.xml | 4 +- .../DriveListBoxArray.xml | 32 +- .../FileListBoxArray.xml | 32 +- .../FixedLengthString.xml | 6 +- .../FontDialogArray.xml | 10 +- .../FormShowConstants.xml | 2 +- .../GroupBoxArray.xml | 32 +- .../HScrollBarArray.xml | 30 +- .../ImageListArray.xml | 10 +- .../LabelArray.xml | 32 +- .../ListBoxArray.xml | 32 +- .../ListBoxItem.xml | 10 +- .../ListViewArray.xml | 42 +- .../MBinding.xml | 102 ++-- .../MBindingCollection.xml | 4 +- .../MaskedTextBoxArray.xml | 34 +- .../MenuItemArray.xml | 10 +- .../OpenFileDialogArray.xml | 10 +- .../PanelArray.xml | 32 +- .../PictureBoxArray.xml | 28 +- .../PrintDialogArray.xml | 10 +- .../ProgressBarArray.xml | 24 +- .../RadioButtonArray.xml | 32 +- .../RichTextBoxArray.xml | 28 +- .../SaveFileDialogArray.xml | 10 +- .../StatusBarArray.xml | 28 +- .../StatusStripArray.xml | 28 +- .../Support.xml | 30 +- .../TabControlArray.xml | 36 +- .../TextBoxArray.xml | 28 +- .../TimerArray.xml | 10 +- .../ToolBarArray.xml | 28 +- .../ToolStripArray.xml | 28 +- .../ToolStripMenuItemArray.xml | 14 +- .../TreeViewArray.xml | 28 +- .../VScrollBarArray.xml | 30 +- .../WebBrowserArray.xml | 74 +-- .../WebClass.xml | 124 ++-- .../WebItem.xml | 92 +-- .../ZOrderConstants.xml | 2 +- .../NewLateBinding.xml | 40 +- .../Operators.xml | 398 ++++++------- .../ProjectData.xml | 70 +-- .../StringType.xml | 270 ++++----- xml/Microsoft.VisualBasic.Devices/Audio.xml | 558 +++++++++--------- .../Computer.xml | 4 +- .../Keyboard.xml | 12 +- xml/Microsoft.VisualBasic.Devices/Network.xml | 18 +- xml/Microsoft.VisualBasic.Devices/Ports.xml | 34 +- .../DeleteDirectoryOption.xml | 10 +- .../FileSystem.xml | 18 +- .../MalformedLineException.xml | 32 +- .../RecycleOption.xml | 18 +- .../SearchOption.xml | 10 +- .../TextFieldParser.xml | 6 +- xml/Microsoft.VisualBasic.FileIO/UIOption.xml | 10 +- xml/Microsoft.VisualBasic.Logging/AspLog.xml | 4 +- .../FileLogTraceListener.xml | 60 +- xml/Microsoft.VisualBasic.Logging/Log.xml | 4 +- .../ContextValue`1.xml | 2 +- .../FileSystemProxy.xml | 18 +- xml/Microsoft.VisualBasic/AudioPlayMode.xml | 10 +- xml/Microsoft.VisualBasic/Collection.xml | 20 +- xml/Microsoft.VisualBasic/Conversion.xml | 8 +- xml/Microsoft.VisualBasic/DateAndTime.xml | 24 +- xml/Microsoft.VisualBasic/DateInterval.xml | 14 +- xml/Microsoft.VisualBasic/ErrObject.xml | 4 +- xml/Microsoft.VisualBasic/FileSystem.xml | 4 +- xml/Microsoft.VisualBasic/Interaction.xml | 24 +- xml/Microsoft.VisualBasic/OpenMode.xml | 26 +- xml/Microsoft.VisualBasic/SpcInfo.xml | 28 +- xml/Microsoft.VisualBasic/Strings.xml | 20 +- xml/Microsoft.VisualBasic/TabInfo.xml | 28 +- xml/Microsoft.VisualBasic/VBCodeProvider.xml | 2 +- .../ReverseBidirectionalIterator`1.xml | 12 +- .../CriticalHandleMinusOneIsInvalid.xml | 2 +- .../CriticalHandleZeroOrMinusOneIsInvalid.xml | 2 +- .../SafeFileHandle.xml | 2 +- .../SafeHandleMinusOneIsInvalid.xml | 2 +- .../SafeHandleZeroOrMinusOneIsInvalid.xml | 2 +- .../SafeMemoryMappedFileHandle.xml | 2 +- .../SafeMemoryMappedViewHandle.xml | 2 +- .../SafeNCryptKeyHandle.xml | 2 +- .../SafeNCryptProviderHandle.xml | 2 +- .../SafeNCryptSecretHandle.xml | 2 +- .../SafePipeHandle.xml | 2 +- .../SafeProcessHandle.xml | 2 +- .../SafeRegistryHandle.xml | 4 +- .../SafeWaitHandle.xml | 2 +- xml/Microsoft.Win32/CommonDialog.xml | 8 +- xml/Microsoft.Win32/FileDialog.xml | 22 +- .../IntranetZoneCredentialPolicy.xml | 2 +- xml/Microsoft.Win32/Registry.xml | 58 +- xml/Microsoft.Win32/RegistryHive.xml | 24 +- xml/Microsoft.Win32/RegistryKey.xml | 86 +-- xml/Microsoft.Win32/RegistryOptions.xml | 10 +- xml/Microsoft.Win32/RegistryValueKind.xml | 28 +- xml/Microsoft.Win32/RegistryValueOptions.xml | 24 +- xml/Microsoft.Win32/RegistryView.xml | 2 +- xml/Microsoft.Win32/SystemEvents.xml | 2 +- xml/Microsoft.Windows.Themes/BulletChrome.xml | 20 +- xml/Microsoft.Windows.Themes/ButtonChrome.xml | 16 +- .../ClassicBorderDecorator.xml | 14 +- .../DataGridHeaderBorder.xml | 4 +- .../ListBoxChrome.xml | 6 +- xml/Microsoft.Windows.Themes/ScrollChrome.xml | 12 +- .../SystemDropShadowChrome.xml | 4 +- 162 files changed, 2470 insertions(+), 2470 deletions(-) diff --git a/xml/Accessibility/IAccIdentity.xml b/xml/Accessibility/IAccIdentity.xml index 5af4dcf9fa8..8d5c8697133 100644 --- a/xml/Accessibility/IAccIdentity.xml +++ b/xml/Accessibility/IAccIdentity.xml @@ -32,11 +32,11 @@ The and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see [IAccIdentity::GetIdentityString](/windows/win32/api/oleacc/nf-oleacc-iaccidentity-getidentitystring). - + ]]> @@ -68,11 +68,11 @@ Address of a variable that receives the length, in bytes, of the callee-allocated identity string. The and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see [IAccIdentity::GetIdentityString](/windows/win32/api/oleacc/nf-oleacc-iaccidentity-getidentitystring). - + , see [IAccIdentity::GetIdentityString](/windows/win32/api/oleacc/nf-oleacc-iaccidentity-getidentitystring). + ]]> diff --git a/xml/Accessibility/IAccPropServices.xml b/xml/Accessibility/IAccPropServices.xml index 545016d13d1..4ff42f79793 100644 --- a/xml/Accessibility/IAccPropServices.xml +++ b/xml/Accessibility/IAccPropServices.xml @@ -32,11 +32,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -77,11 +77,11 @@ Specifies the number of properties in the array. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -124,11 +124,11 @@ Specifies the number of properties in the array. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). + ]]> @@ -162,11 +162,11 @@ Specifies the number of properties in the array. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -207,11 +207,11 @@ Pointer to a buffer that receives the length of the identity string. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -254,11 +254,11 @@ Pointer to a buffer that receives the length of the identity string. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -298,11 +298,11 @@ Pointer to a buffer that receives the child ID of the accessible element. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) IAccPropServices interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -382,11 +382,11 @@ Pointer to a buffer that receives the child ID of the accessible element. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) IAccPropServices interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -467,11 +467,11 @@ Specifies a new value for the property. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -516,11 +516,11 @@ May be ANNO_THIS, indicating that the annotation affects the indicated accessible element only; or ANNO_CONTAINER, indicating that it applies to the element and its immediate element children. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -561,11 +561,11 @@ Specifies a new value for the property. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -608,11 +608,11 @@ Specifies a new value for that property. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -659,11 +659,11 @@ May be ANNO_THIS, indicating that the annotation affects the indicated accessible element only; or ANNO_CONTAINER, indicating that it applies to the element and its immediate element children. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -706,11 +706,11 @@ Specifies a new value for that property. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -748,11 +748,11 @@ May be ANNO_THIS, indicating that the annotation affects the indicated accessible element only; or ANNO_CONTAINER, indicating that it applies to the element and its immediate element children. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> @@ -786,11 +786,11 @@ Specifies a new value for the property. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see the documentation about [Dynamic Annotation](/windows/desktop/winauto/dynamic-annotation-common). - + ]]> diff --git a/xml/Accessibility/IAccessible.xml b/xml/Accessibility/IAccessible.xml index 5bae4a4068a..b3353f2d896 100644 --- a/xml/Accessibility/IAccessible.xml +++ b/xml/Accessibility/IAccessible.xml @@ -33,11 +33,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see [IAccessible interface](/windows/win32/api/oleacc/nn-oleacc-iaccessible). - + ]]> @@ -89,11 +89,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. An object. - , see [IAccessible::get_accChild](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accchild). - + , see [IAccessible::get_accChild](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accchild). + ]]> @@ -141,11 +141,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. An integer representing the count. - , see [IAccessible::get_accChildCount](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accchildcount). - + , see [IAccessible::get_accChildCount](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accchildcount). + ]]> @@ -197,11 +197,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. A string representing the action. - , see [IAccessible::get_accDefaultAction](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accdefaultaction). - + , see [IAccessible::get_accDefaultAction](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accdefaultaction). + ]]> @@ -253,11 +253,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. A string representing the description. - , see [IAccessible::get_accDescription](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accdescription). - + , see [IAccessible::get_accDescription](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accdescription). + ]]> @@ -303,11 +303,11 @@ This parameter is intended for internal use only. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see [IAccessible::accDoDefaultAction](/windows/win32/api/oleacc/nf-oleacc-iaccessible-accdodefaultaction). - + , see [IAccessible::accDoDefaultAction](/windows/win32/api/oleacc/nf-oleacc-iaccessible-accdodefaultaction). + ]]> @@ -355,11 +355,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. If successful, returns S_OK. Otherwise, returns another standard COM error code. - , see [IAccessible::get_accFocus](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accfocus). - + , see [IAccessible::get_accFocus](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accfocus). + ]]> @@ -411,11 +411,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. A string. - , see [IAccessible::get_accHelp](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_acchelp). - + , see [IAccessible::get_accHelp](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_acchelp). + ]]> @@ -469,11 +469,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. An integer. - , see [IAccessible::get_accHelpTopic](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_acchelptopic). - + , see [IAccessible::get_accHelpTopic](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_acchelptopic). + ]]> @@ -523,11 +523,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. An object. - , see [IAccessible::accHitTest](/windows/win32/api/oleacc/nf-oleacc-iaccessible-acchittest). - + , see [IAccessible::accHitTest](/windows/win32/api/oleacc/nf-oleacc-iaccessible-acchittest). + ]]> @@ -579,11 +579,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. A string. - , see [IAccessible::get_accKeyboardShortcut](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_acckeyboardshortcut). - + , see [IAccessible::get_accKeyboardShortcut](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_acckeyboardshortcut). + ]]> @@ -637,11 +637,11 @@ This parameter is intended for internal use only. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see [IAccessible::accLocation](/windows/win32/api/oleacc/nf-oleacc-iaccessible-acclocation). - + , see [IAccessible::accLocation](/windows/win32/api/oleacc/nf-oleacc-iaccessible-acclocation). + ]]> @@ -709,11 +709,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. A string. - , see [IAccessible::get_accName](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accname). - + , see [IAccessible::get_accName](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accname). + ]]> @@ -762,11 +762,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. If successful, returns S_OK. For other possible return values, see the documentation for . - , see [IAccessible::accNavigate](/windows/win32/api/oleacc/nf-oleacc-iaccessible-accnavigate). - + , see [IAccessible::accNavigate](/windows/win32/api/oleacc/nf-oleacc-iaccessible-accnavigate). + ]]> @@ -814,11 +814,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. An object. - , see [IAccessible::get_accParent](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accparent). - + , see [IAccessible::get_accParent](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accparent). + ]]> @@ -870,11 +870,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. An object. - , see [IAccessible::get_accRole](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accrole). - + , see [IAccessible::get_accRole](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accrole). + ]]> @@ -922,11 +922,11 @@ This parameter is intended for internal use only. The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see [IAccessible::accSelect](/windows/win32/api/oleacc/nf-oleacc-iaccessible-accselect). - + , see [IAccessible::accSelect](/windows/win32/api/oleacc/nf-oleacc-iaccessible-accselect). + ]]> @@ -974,11 +974,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. An object. - , see [IAccessible::get_accSelection](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accselection). - + , see [IAccessible::get_accSelection](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accselection). + ]]> @@ -1030,11 +1030,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. An object. - , see [IAccessible::get_accState](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accstate). - + , see [IAccessible::get_accState](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accstate). + ]]> @@ -1102,11 +1102,11 @@ The interface and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. A string. - , see [IAccessible::get_accValue](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accvalue). - + , see [IAccessible::get_accValue](/windows/win32/api/oleacc/nf-oleacc-iaccessible-get_accvalue). + ]]> diff --git a/xml/Accessibility/IAccessibleHandler.xml b/xml/Accessibility/IAccessibleHandler.xml index 5af72a409ed..cffa9f35e50 100644 --- a/xml/Accessibility/IAccessibleHandler.xml +++ b/xml/Accessibility/IAccessibleHandler.xml @@ -41,11 +41,11 @@ The and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see [IAccessibleHandler::AccessibleObjectFromID](/windows/win32/api/oleacc/nf-oleacc-iaccessiblehandler-accessibleobjectfromid). - + , see [IAccessibleHandler::AccessibleObjectFromID](/windows/win32/api/oleacc/nf-oleacc-iaccessiblehandler-accessibleobjectfromid). + ]]> @@ -78,11 +78,11 @@ Specifies the address of a pointer variable that receives the address of the object's IAccessible interface. The and all of its exposed members are part of a managed wrapper for the Component Object Model (COM) interface. - , see [IAccessibleHandler::AccessibleObjectFromID](/windows/win32/api/oleacc/nf-oleacc-iaccessiblehandler-accessibleobjectfromid). - + , see [IAccessibleHandler::AccessibleObjectFromID](/windows/win32/api/oleacc/nf-oleacc-iaccessiblehandler-accessibleobjectfromid). + ]]> diff --git a/xml/Microsoft.Build.Tasks.Windows/GenerateTemporaryTargetAssembly.xml b/xml/Microsoft.Build.Tasks.Windows/GenerateTemporaryTargetAssembly.xml index 11fed9b31f4..9d981188d81 100644 --- a/xml/Microsoft.Build.Tasks.Windows/GenerateTemporaryTargetAssembly.xml +++ b/xml/Microsoft.Build.Tasks.Windows/GenerateTemporaryTargetAssembly.xml @@ -270,7 +270,7 @@ ## Remarks The property is an optional task parameter. It's a diagnostic parameter, and it defaults to `false`. - The only debugging information that is generated consists of the temporary project that is created to generate the temporary target assembly. The temporary project is normally deleted at the end of the MSBuild task. When is enabled, the temporary project is retained for inspection by the developer. + The only debugging information that is generated consists of the temporary project that is created to generate the temporary target assembly. The temporary project is normally deleted at the end of the MSBuild task. When is enabled, the temporary project is retained for inspection by the developer. ]]> diff --git a/xml/Microsoft.CSharp.RuntimeBinder/RuntimeBinderException.xml b/xml/Microsoft.CSharp.RuntimeBinder/RuntimeBinderException.xml index 3d947403c7b..73dc4f40161 100644 --- a/xml/Microsoft.CSharp.RuntimeBinder/RuntimeBinderException.xml +++ b/xml/Microsoft.CSharp.RuntimeBinder/RuntimeBinderException.xml @@ -91,8 +91,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||The localized error message string.| +||`null`.| +||The localized error message string.| ]]> @@ -139,8 +139,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||The error message string specified in `message`.| +||`null`.| +||The error message string specified in `message`.| ]]> @@ -242,8 +242,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||The error message string specified in `message`.| +||`null`.| +||The error message string specified in `message`.| ]]> diff --git a/xml/Microsoft.CSharp.RuntimeBinder/RuntimeBinderInternalCompilerException.xml b/xml/Microsoft.CSharp.RuntimeBinder/RuntimeBinderInternalCompilerException.xml index 188d6a36f5d..664682a4f1c 100644 --- a/xml/Microsoft.CSharp.RuntimeBinder/RuntimeBinderInternalCompilerException.xml +++ b/xml/Microsoft.CSharp.RuntimeBinder/RuntimeBinderInternalCompilerException.xml @@ -91,8 +91,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||The localized error message string.| +||`null`.| +||The localized error message string.| ]]> @@ -139,8 +139,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||The error message string specified in `message`.| +||`null`.| +||The error message string specified in `message`.| ]]> @@ -242,8 +242,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||The error message string specified in `message`.| +||`null`.| +||The error message string specified in `message`.| ]]> diff --git a/xml/Microsoft.CSharp/CSharpCodeProvider.xml b/xml/Microsoft.CSharp/CSharpCodeProvider.xml index 41cca07413d..6adfb45b785 100644 --- a/xml/Microsoft.CSharp/CSharpCodeProvider.xml +++ b/xml/Microsoft.CSharp/CSharpCodeProvider.xml @@ -361,7 +361,7 @@ In .NET Framework apps, you can obtain the value for `providerOptions` from the ## Examples - The following code example shows the use of the method to create a code fragment to be used in a CodeDOM graph. This code example is part of a larger example provided for the method of the class. + The following code example shows the use of the method to create a code fragment to be used in a CodeDOM graph. This code example is part of a larger example provided for the method of the class. :::code language="csharp" source="~/snippets/csharp/Microsoft.CSharp/CSharpCodeProvider/GenerateCodeFromMember/program.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/Microsoft.CSharp/CSharpCodeProvider/GenerateCodeFromMember/module1.vb" id="Snippet3"::: diff --git a/xml/Microsoft.JScript.Vsa/JSVsaError.xml b/xml/Microsoft.JScript.Vsa/JSVsaError.xml index 048413324ad..22b8e027a9e 100644 --- a/xml/Microsoft.JScript.Vsa/JSVsaError.xml +++ b/xml/Microsoft.JScript.Vsa/JSVsaError.xml @@ -2160,7 +2160,7 @@ ## Remarks Exception string: The specified element could not be saved. - Thrown by the method and methods when a call to the `SaveElement` method fails. The `InnerException` property of the class is set to the actual exception thrown by the underlying code (for example, an out of disk space exception). For more information, see . The `SaveSourceState` method returns the `SaveElementFailed` exception from the `SaveElement` method back to the caller. + Thrown by the method and methods when a call to the `SaveElement` method fails. The `InnerException` property of the class is set to the actual exception thrown by the underlying code (for example, an out of disk space exception). For more information, see . The `SaveSourceState` method returns the `SaveElementFailed` exception from the `SaveElement` method back to the caller. ]]> diff --git a/xml/Microsoft.JScript/ErrorObject.xml b/xml/Microsoft.JScript/ErrorObject.xml index a97af49fa29..00da86bcb08 100644 --- a/xml/Microsoft.JScript/ErrorObject.xml +++ b/xml/Microsoft.JScript/ErrorObject.xml @@ -93,11 +93,11 @@ Specifies a number or code for the error. - can be a member, a , or another -related error number or code. - + can be a member, a , or another -related error number or code. + ]]> diff --git a/xml/Microsoft.JScript/IDebugVsaScriptCodeItem.xml b/xml/Microsoft.JScript/IDebugVsaScriptCodeItem.xml index 248c9817e59..08eb4783622 100644 --- a/xml/Microsoft.JScript/IDebugVsaScriptCodeItem.xml +++ b/xml/Microsoft.JScript/IDebugVsaScriptCodeItem.xml @@ -50,11 +50,11 @@ When implemented in a class, evaluates the block, expression, or statement represented by the code item and returns the value. It is typically called by a debugger that needs to evaluate an expression (in a Watch window, for example). For expressions, the value is the result of the expression. For blocks and statements, the resulting expression is the last expression calculated by the block or statement. A value that represents the evaluation of the statement, expression, or block. - method is functionally identical to the method. Only the marshaling attributes differ. This version of the interface allows an unmanaged debugger to obtain the return value as an `IUnknown` pointer rather than a `VARIANT`. - + method is functionally identical to the method. Only the marshaling attributes differ. This version of the interface allows an unmanaged debugger to obtain the return value as an `IUnknown` pointer rather than a `VARIANT`. + ]]> diff --git a/xml/Microsoft.JScript/JSParser.xml b/xml/Microsoft.JScript/JSParser.xml index 113606a4c6f..719063cf516 100644 --- a/xml/Microsoft.JScript/JSParser.xml +++ b/xml/Microsoft.JScript/JSParser.xml @@ -74,11 +74,11 @@ Parses the source code. The root of the abstract syntax tree that is created by parsing the code. - constructor. - + constructor. + ]]> @@ -110,11 +110,11 @@ Parses the source code. Use this method instead of when the source code is inside an method call. The root of the abstract syntax tree that is created by parsing the code. - constructor. - + constructor. + ]]> diff --git a/xml/Microsoft.JScript/JSScanner.xml b/xml/Microsoft.JScript/JSScanner.xml index 15c75034b3d..5e757b7eedb 100644 --- a/xml/Microsoft.JScript/JSScanner.xml +++ b/xml/Microsoft.JScript/JSScanner.xml @@ -200,11 +200,11 @@ Gets the source code that is associated with this scanner object. The source code to scan. - method or to the method. - + method or to the method. + ]]> @@ -391,11 +391,11 @@ to indicate authoring mode; otherwise, . Sets a flag that indicates whether the scanner is operating in authoring mode. - diff --git a/xml/Microsoft.JScript/ScriptFunction.xml b/xml/Microsoft.JScript/ScriptFunction.xml index db7cf56d172..184a1c83379 100644 --- a/xml/Microsoft.JScript/ScriptFunction.xml +++ b/xml/Microsoft.JScript/ScriptFunction.xml @@ -44,11 +44,11 @@ The name of the object that this function constructs. Initializes a new instance of the class. - by using a , the parent is a . - + by using a , the parent is a . + ]]> @@ -125,11 +125,11 @@ Gets the prototype object for this constructor function. The prototype object for this constructor function. - by using a , the prototype is a . - + by using a , the prototype is a . + ]]> @@ -206,11 +206,11 @@ Invokes a method of the prototype-based object, passing in the specified arguments. The result of the call to the method. - often acts as a constructor or create instance call. - + often acts as a constructor or create instance call. + ]]> @@ -321,11 +321,11 @@ Gets or sets the prototype object for this constructor function. The prototype object for this constructor function. - by using a , the prototype is a . - + by using a , the prototype is a . + ]]> diff --git a/xml/Microsoft.SqlServer.Server/Format.xml b/xml/Microsoft.SqlServer.Server/Format.xml index c6981a9dfaf..1cff9a02c9d 100644 --- a/xml/Microsoft.SqlServer.Server/Format.xml +++ b/xml/Microsoft.SqlServer.Server/Format.xml @@ -27,47 +27,47 @@ Used by and to indicate the serialization format of a user-defined type (UDT) or aggregate. - and to indicate the serialization format of a user-defined type (UDT) or aggregate. Use of the `Native` and `UserDefined` enumeration members has special requirements. +## Remarks + +This enumeration is used by and to indicate the serialization format of a user-defined type (UDT) or aggregate. Use of the `Native` and `UserDefined` enumeration members has special requirements. - `Format.Native` - The requirements for the `Format.Native` format are: - + The requirements for the `Format.Native` format are: + - The with a property value of must be applied to the aggregate or UDT if it is defined in a class and not a structure. This controls the physical layout of the data fields and is used to force the members to be laid out sequentially in the order they appear. SQL Server uses this attribute to determine the field order for UDTs with multiple fields. - - - The type must contain at least one member (serialized values cannot be zero bytes in size). - - - All the fields of the aggregate must be *blittable*; that is, they must have a common representation in both managed and unmanaged memory and not require special handling by the interop marshaler. - - - All the fields of the UDT should be of one of the following types that can be serialized: `bool`, `byte`, `sbyte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `float`, `double`, , , , , , , , , or other value types defined by the user that contain fields of one of these types. - - - The aggregate must not specify a value for `MaxByteSize`. - - - The aggregate must not have any [NonSerialized] fields. - - - Fields must not be marked as an explicit layout (with a of ). + + - The type must contain at least one member (serialized values cannot be zero bytes in size). + + - All the fields of the aggregate must be *blittable*; that is, they must have a common representation in both managed and unmanaged memory and not require special handling by the interop marshaler. + + - All the fields of the UDT should be of one of the following types that can be serialized: `bool`, `byte`, `sbyte`, `short`, `ushort`, `int`, `uint`, `long`, `ulong`, `float`, `double`, , , , , , , , , or other value types defined by the user that contain fields of one of these types. + + - The aggregate must not specify a value for `MaxByteSize`. + + - The aggregate must not have any [NonSerialized] fields. + + - Fields must not be marked as an explicit layout (with a of ). - `Format.UserDefined` The requirements for the `Format.UserDefined` format are: - - The aggregate must specify a value for `MaxByteSize`. - - - Specify the attribute property. The default value is `false`. - - - If you omit any field in the or methods, the state of that field is not serialized. + - The aggregate must specify a value for `MaxByteSize`. + + - Specify the attribute property. The default value is `false`. -## Examples + - If you omit any field in the or methods, the state of that field is not serialized. + +## Examples + +The following example shows the `UserDefinedType` attribute of the Point UDT. The UDT is byte-ordered, is named "Point", has a validation method named "ValidatePoint", and uses the native serialization format. -The following example shows the `UserDefinedType` attribute of the Point UDT. The UDT is byte-ordered, is named "Point", has a validation method named "ValidatePoint", and uses the native serialization format. - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_ADO.NET/DataWorks SqlUserDefinedTypeAttribute Example/CS/source.cs" id="Snippet1"::: -:::code language="vb" source="~/snippets/visualbasic/Microsoft.SqlServer.Server/Format/Overview/source.vb" id="Snippet1"::: - +:::code language="vb" source="~/snippets/visualbasic/Microsoft.SqlServer.Server/Format/Overview/source.vb" id="Snippet1"::: + ]]> diff --git a/xml/Microsoft.SqlServer.Server/IBinarySerialize.xml b/xml/Microsoft.SqlServer.Server/IBinarySerialize.xml index 30d5ccbe50a..3253b276637 100644 --- a/xml/Microsoft.SqlServer.Server/IBinarySerialize.xml +++ b/xml/Microsoft.SqlServer.Server/IBinarySerialize.xml @@ -25,15 +25,15 @@ Provides custom implementation for user-defined type (UDT) and user-defined aggregate serialization and deserialization. - .`Native` or .`UserDefined`. - - .`Native` allows SQL Server to handle serialization and deserialization automatically, but the format has restrictions on the kind of types it can handle. .`UserDefined` allows user-defined types and aggregates to handle their own serialization. User-defined types and aggregates must be marked with .`UserDefined` in the `SqlUserDefinedType` or `SqlUserDefinedAggregate` attribute, and must implement the interface. - - Note that even with custom serialization, the total size of each instance must be under the maximum allowed limit, currently 8000 bytes. - + .`Native` or .`UserDefined`. + + .`Native` allows SQL Server to handle serialization and deserialization automatically, but the format has restrictions on the kind of types it can handle. .`UserDefined` allows user-defined types and aggregates to handle their own serialization. User-defined types and aggregates must be marked with .`UserDefined` in the `SqlUserDefinedType` or `SqlUserDefinedAggregate` attribute, and must implement the interface. + + Note that even with custom serialization, the total size of each instance must be under the maximum allowed limit, currently 8000 bytes. + ]]> @@ -65,19 +65,19 @@ The stream from which the object is deserialized. Generates a user-defined type (UDT) or user-defined aggregate from its binary form. - method must reconstitute your object using the information written by the method. - - - -## Examples - The following example shows the implementation of the method of a UDT, which uses a to de-serialize a previously persisted UDT. This example assumes that the UDT has two data properties: `StringValue` and `DoubleValue`. - + method must reconstitute your object using the information written by the method. + + + +## Examples + The following example shows the implementation of the method of a UDT, which uses a to de-serialize a previously persisted UDT. This example assumes that the UDT has two data properties: `StringValue` and `DoubleValue`. + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_ADO.NET/DataWorks IBinarySerialize Samples/CS/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/Microsoft.SqlServer.Server/IBinarySerialize/Read/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/Microsoft.SqlServer.Server/IBinarySerialize/Read/source.vb" id="Snippet1"::: + ]]> @@ -109,19 +109,19 @@ The stream to which the UDT or user-defined aggregate is serialized. Converts a user-defined type (UDT) or user-defined aggregate into its binary format so that it may be persisted. - method to reconstitute your UDT or user-defined aggregate. - - - -## Examples - The following example shows the implementation of the method of a UDT, which uses a to serialize the UDT in the user-defined binary format. The purpose of the null character padding is to ensure that the string value is completely separated from the double value, so that one UDT is compared to another in Transact-SQL code, string bytes are compared to string bytes and double bytes are compared to double bytes. - + method to reconstitute your UDT or user-defined aggregate. + + + +## Examples + The following example shows the implementation of the method of a UDT, which uses a to serialize the UDT in the user-defined binary format. The purpose of the null character padding is to ensure that the string value is completely separated from the double value, so that one UDT is compared to another in Transact-SQL code, string bytes are compared to string bytes and double bytes are compared to double bytes. + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_ADO.NET/DataWorks IBinarySerialize Samples/CS/source.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/Microsoft.SqlServer.Server/IBinarySerialize/Read/source.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/Microsoft.SqlServer.Server/IBinarySerialize/Read/source.vb" id="Snippet2"::: + ]]> diff --git a/xml/Microsoft.SqlServer.Server/SqlContext.xml b/xml/Microsoft.SqlServer.Server/SqlContext.xml index 862dc0309cb..9dd862b391e 100644 --- a/xml/Microsoft.SqlServer.Server/SqlContext.xml +++ b/xml/Microsoft.SqlServer.Server/SqlContext.xml @@ -25,7 +25,7 @@ ## Examples - The following example creates a new and its . The example then marks the beginning of a result set using the method, sends records with example data back to the client using the method, and marks the end of the result set with the method. + The following example creates a new and its . The example then marks the beginning of a result set using the method, sends records with example data back to the client using the method, and marks the end of the result set with the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_ADO.NET/DataWorks SqlPipe.SendResultsRow/CS/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/Microsoft.SqlServer.Server/SqlPipe/SendResultsEnd/source.vb" id="Snippet1"::: diff --git a/xml/Microsoft.SqlServer.Server/SqlDataRecord.xml b/xml/Microsoft.SqlServer.Server/SqlDataRecord.xml index 8451896a5d0..93678ee4b8a 100644 --- a/xml/Microsoft.SqlServer.Server/SqlDataRecord.xml +++ b/xml/Microsoft.SqlServer.Server/SqlDataRecord.xml @@ -275,7 +275,7 @@ ## Remarks This method enables you to obtain a binary value either in a single call or in chunks. Getting the value in chunks is useful for large values or values of unknown size. - To obtain the value in several chunks, allocate a byte array of the chunk-size and call repeatedly, adjusting the `fieldOffset` parameter accordingly in each call. + To obtain the value in several chunks, allocate a byte array of the chunk-size and call repeatedly, adjusting the `fieldOffset` parameter accordingly in each call. ]]> @@ -374,7 +374,7 @@ ## Remarks This method enables you to obtain a character value either in a single call or in chunks. Getting the value in chunks is useful for large values or values of unknown size. - To obtain the value in several chunks, allocate a char array of the chunk-size and call repeatedly adjusting the `fieldOffset` parameter accordingly in each call. + To obtain the value in several chunks, allocate a char array of the chunk-size and call repeatedly adjusting the `fieldOffset` parameter accordingly in each call. ]]> diff --git a/xml/Microsoft.SqlServer.Server/SqlFacetAttribute.xml b/xml/Microsoft.SqlServer.Server/SqlFacetAttribute.xml index 8fa5ec2a088..13f7bbf6c6c 100644 --- a/xml/Microsoft.SqlServer.Server/SqlFacetAttribute.xml +++ b/xml/Microsoft.SqlServer.Server/SqlFacetAttribute.xml @@ -43,7 +43,7 @@ To specify the on an input p The table below captures the matrix of valid values for the various properties for specific field types. In this table, "Y" indicates that the property is valid, and "N" indicates that the property is not valid. - The specified must be compatible with the field type. If the property is not valid, type registration will report an error if the user specifies a non-default value for the property. The maximum values for and properties are 38. For the property, the value should be in the range of 1-8000 for binary and non-Unicode data, 1-4000 for Unicode data, or -1. All other values are not valid. + The specified must be compatible with the field type. If the property is not valid, type registration will report an error if the user specifies a non-default value for the property. The maximum values for and properties are 38. For the property, the value should be in the range of 1-8000 for binary and non-Unicode data, 1-4000 for Unicode data, or -1. All other values are not valid. |Type|IsFixedLength|MaxSize|Precision|Scale|IsNullable| |----------|-------------------|-------------|---------------|-----------|----------------| diff --git a/xml/Microsoft.SqlServer.Server/SqlFunctionAttribute.xml b/xml/Microsoft.SqlServer.Server/SqlFunctionAttribute.xml index b39b3df95e6..41cb4204e07 100644 --- a/xml/Microsoft.SqlServer.Server/SqlFunctionAttribute.xml +++ b/xml/Microsoft.SqlServer.Server/SqlFunctionAttribute.xml @@ -100,7 +100,7 @@ . is also required when connecting to remote servers if transactions integration is required (the default). + The default is . is also required when connecting to remote servers if transactions integration is required (the default). If a Transact-SQL query is executed from inside a table-valued function (TVF), the property should be set. @@ -172,9 +172,9 @@ The property is also useful for indexing the result of the function in the form of indexed computed columns and indexed views. If this property is not specified, the function is assumed to be non-deterministic. - Functions that access local data can be deterministic. The data access characteristic is captured separately by the and properties. + Functions that access local data can be deterministic. The data access characteristic is captured separately by the and properties. - Note that data access to remote servers (for example, using a to connect to another SQL Server instance) is available in user-defined functions. However, you must still honor the declaration. If the common language runtime (CLR) function is marked as deterministic, it should not cause side-effects in the remote server. While side-effects against the context connection are restricted, SQL Server will not enforce the restriction for side-effects over remote connections. + Note that data access to remote servers (for example, using a to connect to another SQL Server instance) is available in user-defined functions. However, you must still honor the declaration. If the common language runtime (CLR) function is marked as deterministic, it should not cause side-effects in the remote server. While side-effects against the context connection are restricted, SQL Server will not enforce the restriction for side-effects over remote connections. The default value of this attribute is `false`. diff --git a/xml/Microsoft.SqlServer.Server/SqlMetaData.xml b/xml/Microsoft.SqlServer.Server/SqlMetaData.xml index 086b42a20eb..344e719e646 100644 --- a/xml/Microsoft.SqlServer.Server/SqlMetaData.xml +++ b/xml/Microsoft.SqlServer.Server/SqlMetaData.xml @@ -90,7 +90,7 @@ ## Remarks Only the following are allowed to be passed to the constructor as `dbType`: `Bit`, `BigInt`, `DateTime`, `Decimal`, `Float`, `Int`, `Money`, `Numeric`, `SmallDateTime`, `SmallInt`, `SmallMoney`, `TimeStamp`, `TinyInt`, `UniqueIdentifier`, `Xml`. - The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): + The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): |SqlDbType|Maximum length|Precision|Scale|Locale|Compare options| |---------------|--------------------|---------------|-----------|------------|---------------------| @@ -162,11 +162,11 @@ ## Remarks Only the following are allowed to be passed to the constructor as `dbType`: `Binary`, `Char`, `Image`, `NChar`, `Ntext`, `NVarChar`, `Text`, `VarBinary`, `VarChar`. - Only a `maxLength` specification of , or -1 is allowed for a `dbType` of `Text`, `NText`, or `Image`. + Only a `maxLength` specification of , or -1 is allowed for a `dbType` of `Text`, `NText`, or `Image`. - For a `dbType` of `Varchar`, `Nvarchar`, or `VarBinary`, a length specification of , or -1, declares the metadata as varchar(max), nvarchar(max), or nvarbinary(max), respectively. + For a `dbType` of `Varchar`, `Nvarchar`, or `VarBinary`, a length specification of , or -1, declares the metadata as varchar(max), nvarchar(max), or nvarbinary(max), respectively. - The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): + The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): | SqlDbType | Precision | Scale | Locale | Compare options | |-----------|-----------|-------|-----------|-----------------------------------------| @@ -225,7 +225,7 @@ ## Remarks Only the following `SqlDbType` is allowed to be passed to the constructor as `dbType`: `UDT`. - The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): + The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): |SqlDbType|Maximum length|Precision|Scale|Locale|Compare options| |---------------|--------------------|---------------|-----------|------------|---------------------| @@ -277,7 +277,7 @@ ## Remarks Only the following `SqlDbType` is allowed to be passed to the constructor as `dbType`: `Decimal`. - The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): + The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): |SqlDbType|Maximum length|Precision|Scale|Locale|Compare options| |---------------|--------------------|---------------|-----------|------------|---------------------| @@ -363,11 +363,11 @@ ## Remarks Only the following are allowed to be passed to the constructor as `dbType`: `Char`, `NChar`, `Ntext`, `NVarChar`, `Text`, `VarChar`. - Only a `maxLength` specification of , or -1, is allowed for a `dbType` of `Text` or `NText`. + Only a `maxLength` specification of , or -1, is allowed for a `dbType` of `Text` or `NText`. - For a `dbType` of `Varchar` or `Nvarchar`, a length specification of , or -1, declares the metadata as varchar(max) and nvarchar(max), respectively. + For a `dbType` of `Varchar` or `Nvarchar`, a length specification of , or -1, declares the metadata as varchar(max) and nvarchar(max), respectively. - The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): + The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): |SqlDbType|Precision|Scale| |---------------|---------------|-----------| @@ -636,7 +636,7 @@ ## Remarks Only the following are allowed to be passed to the constructor as `dbType`: `BigInt`, `Bit`, `BitInt`, `DateTime`, `Decimal`, `Float`, `Image`, `Int`, `Money`, `Ntext`, `Numeric`, `Real`, `SmallDateTime`, `SmallInt`, `SmallMoney`, `Text`, `TimeStamp`, `TinyInt`, `UniqueIdentifier`, `Variant`, `Xml`. - The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): + The following are the default values assigned to `dbType`, depending on the `SqlDbType` (the , , , and properties are set to `null`): |SqlDbType|Maximum length|Precision|Scale|Locale|Compare options| |---------------|--------------------|---------------|-----------|------------|---------------------| @@ -2634,7 +2634,7 @@ ## Remarks The default value is `null`. - Returns `null` if is not a UDT type. `Null` may also returned for valid UDT result sets where the assembly is not available to the application. + Returns `null` if is not a UDT type. `Null` may also returned for valid UDT result sets where the assembly is not available to the application. ]]> @@ -2752,7 +2752,7 @@ ## Remarks The default value is `null`. - This property may be `null` if the collection is defined within the current database. It is also `null` if there is no schema collection, in which case and are also null. + This property may be `null` if the collection is defined within the current database. It is also `null` if there is no schema collection, in which case and are also null. ]]> @@ -2792,7 +2792,7 @@ ## Remarks The default value is `null`. - This value is `null` if there is no associated schema collection. If the value is `null`, then and are also `null`. + This value is `null` if there is no associated schema collection. If the value is `null`, then and are also `null`. ]]> @@ -2832,7 +2832,7 @@ ## Remarks The default value is `null`. - This value may be `null` if the collection is defined within the current database and default schema. It is also null if there is no schema collection, in which case and are also `null`. + This value may be `null` if the collection is defined within the current database and default schema. It is also null if there is no schema collection, in which case and are also `null`. ]]> diff --git a/xml/Microsoft.SqlServer.Server/SqlMethodAttribute.xml b/xml/Microsoft.SqlServer.Server/SqlMethodAttribute.xml index 79f7315e2f8..bd959e3e1c6 100644 --- a/xml/Microsoft.SqlServer.Server/SqlMethodAttribute.xml +++ b/xml/Microsoft.SqlServer.Server/SqlMethodAttribute.xml @@ -146,7 +146,7 @@ The default value of the `InvokeIfReceiverIsNull` property is `false`. That is, The default value of the property is `false`. - A property can be a mutator if is used on the setter and is set to `true`. However, a property setter is implicitly treated as a mutator, so it is not necessary to set the property of the to `true`. + A property can be a mutator if is used on the setter and is set to `true`. However, a property setter is implicitly treated as a mutator, so it is not necessary to set the property of the to `true`. ]]> diff --git a/xml/Microsoft.SqlServer.Server/SqlPipe.xml b/xml/Microsoft.SqlServer.Server/SqlPipe.xml index 191f2648ae7..56696206d12 100644 --- a/xml/Microsoft.SqlServer.Server/SqlPipe.xml +++ b/xml/Microsoft.SqlServer.Server/SqlPipe.xml @@ -116,7 +116,7 @@ with the command text "EXEC Procedure2". Procedure2 is also a managed stored procedure. If Procedure2 now calls , the row is sent to Procedure1's reader, not to the client. + The **Send** method sends data straight to the client or caller. It is usually the client that consumes the output from the **Pipe** method, but in the case of nested CLR stored procedures the output consumer can also be a stored procedure. For example, Procedure1 calls with the command text "EXEC Procedure2". Procedure2 is also a managed stored procedure. If Procedure2 now calls , the row is sent to Procedure1's reader, not to the client. ]]> @@ -212,7 +212,7 @@ ## Examples - The following example uses the method to send a message string directly to the client. + The following example uses the method to send a message string directly to the client. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_ADO.NET/DataWorks SqlPipe.Send/CS/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/Microsoft.SqlServer.Server/SqlPipe/Send/source.vb" id="Snippet1"::: @@ -246,12 +246,12 @@ . This method, along with and , allow stored procedures to send custom result sets to the client. + Managed stored procedures can send result sets to clients that are not implementing a . This method, along with and , allow stored procedures to send custom result sets to the client. ## Examples - The following example creates a new and its . The example then marks the beginning of a result set using the method, sends records with example data back to the client using the method, and marks the end of the result set with the method. + The following example creates a new and its . The example then marks the beginning of a result set using the method, sends records with example data back to the client using the method, and marks the end of the result set with the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_ADO.NET/DataWorks SqlPipe.SendResultsEnd/CS/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/Microsoft.SqlServer.Server/SqlContext/Overview/source.vb" id="Snippet1"::: @@ -289,14 +289,14 @@ . This method, along with and , allows stored procedures to send custom result sets to the client. + Managed stored procedures can send result sets to clients that are not implementing a . This method, along with and , allows stored procedures to send custom result sets to the client. - The method sends a single row of data back to the client. Rows can subsequently be returned to the caller by calling , one time for each row being sent. After all the rows have been sent, a call to the method is required to mark the end of the result set. + The method sends a single row of data back to the client. Rows can subsequently be returned to the caller by calling , one time for each row being sent. After all the rows have been sent, a call to the method is required to mark the end of the result set. ## Examples - The following example creates a new and its . The example then marks the beginning of a result set using the method, sends records with example data back to the client using the method, and marks the end of the result set with the method. + The following example creates a new and its . The example then marks the beginning of a result set using the method, sends records with example data back to the client using the method, and marks the end of the result set with the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_ADO.NET/DataWorks SqlPipe.SendResultsRow/CS/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/Microsoft.SqlServer.Server/SqlPipe/SendResultsEnd/source.vb" id="Snippet1"::: @@ -335,18 +335,18 @@ . This method, along with and , allow stored procedures to send custom result sets to the client. + Managed stored procedures can send result sets to clients that are not implementing a . This method, along with and , allow stored procedures to send custom result sets to the client. - The method marks the beginning of a result set, and uses the record parameter to construct the metadata that describes the result set. All the subsequent rows, sent using the method, must match that metadata definition. + The method marks the beginning of a result set, and uses the record parameter to construct the metadata that describes the result set. All the subsequent rows, sent using the method, must match that metadata definition. - Note that after calling , only and can be called. Any other method in the same instance of throws an . sets back to the initial state where other methods can be called. + Note that after calling , only and can be called. Any other method in the same instance of throws an . sets back to the initial state where other methods can be called. After control returns to Transact-SQL from CLR execution, do not attempt to use a static or local variable initialized to CLR memory. For example, do not store an instance of an in process class, for example `SQLDataRecord`, which will be used after control returns from CLR. One exception is the `SQLMetaData` in process class. ## Examples - The following example creates a new and its . The example then marks the beginning of a result set using the method, sends records with example data back to the client using the method, and marks the end of the result set with the method. + The following example creates a new and its . The example then marks the beginning of a result set using the method, sends records with example data back to the client using the method, and marks the end of the result set with the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_ADO.NET/DataWorks SqlPipe.SendResultsStart/CS/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/Microsoft.SqlServer.Server/SqlPipe/SendResultsStart/source.vb" id="Snippet1"::: diff --git a/xml/Microsoft.SqlServer.Server/SqlTriggerContext.xml b/xml/Microsoft.SqlServer.Server/SqlTriggerContext.xml index 8b332f0c229..fe3c89cb02a 100644 --- a/xml/Microsoft.SqlServer.Server/SqlTriggerContext.xml +++ b/xml/Microsoft.SqlServer.Server/SqlTriggerContext.xml @@ -60,7 +60,7 @@ property is useful to determine the maximum ordinal that allows for a given trigger invocation. + property is useful to determine the maximum ordinal that allows for a given trigger invocation. ]]> diff --git a/xml/Microsoft.SqlServer.Server/SqlUserDefinedAggregateAttribute.xml b/xml/Microsoft.SqlServer.Server/SqlUserDefinedAggregateAttribute.xml index 9d3898115cf..ae158ae044d 100644 --- a/xml/Microsoft.SqlServer.Server/SqlUserDefinedAggregateAttribute.xml +++ b/xml/Microsoft.SqlServer.Server/SqlUserDefinedAggregateAttribute.xml @@ -294,7 +294,7 @@ The maximum size allowed is 2 gigabytes (GB). You can specify a number from 1 to 8000 bytes, or -1 to represent a value larger than 8000 bytes, up to 2 gigabytes. - For an aggregate with user-defined serialization specified, refers to the total size of the serialized data. Consider an aggregate serializing a string of 10 characters (). When the string is serialized using a , the total size of the serialized string is 22 bytes: 2 bytes per Unicode UTF-16 character, multiplied by the maximum number of characters, plus 2 control bytes of overhead incurred from serializing a binary stream. So, when determining the value of , the total size of the serialized data must be considered: the size of the data serialized in binary form plus the overhead incurred by serialization. + For an aggregate with user-defined serialization specified, refers to the total size of the serialized data. Consider an aggregate serializing a string of 10 characters (). When the string is serialized using a , the total size of the serialized string is 22 bytes: 2 bytes per Unicode UTF-16 character, multiplied by the maximum number of characters, plus 2 control bytes of overhead incurred from serializing a binary stream. So, when determining the value of , the total size of the serialized data must be considered: the size of the data serialized in binary form plus the overhead incurred by serialization. ]]> diff --git a/xml/Microsoft.SqlServer.Server/SqlUserDefinedTypeAttribute.xml b/xml/Microsoft.SqlServer.Server/SqlUserDefinedTypeAttribute.xml index 2f7e57225d4..8a60855462b 100644 --- a/xml/Microsoft.SqlServer.Server/SqlUserDefinedTypeAttribute.xml +++ b/xml/Microsoft.SqlServer.Server/SqlUserDefinedTypeAttribute.xml @@ -146,7 +146,7 @@ ## Remarks When set to `true`, the property in effect guarantees that the serialized binary data can be used for semantic ordering of the information. Thus, each instance of a byte-ordered UDT object can only have one serialized representation. When a comparison operation is performed in SQL Server on the serialized bytes, its results should be the same as if the same comparison operation had taken place in managed code. - The following features are supported when is set to `true`: + The following features are supported when is set to `true`: - The ability to create indexes on columns of this type. @@ -158,7 +158,7 @@ - The ability to persist computed columns of this type. - Note that both the `Native` and `UserDefined` serialization formats support the following comparison operators when is set to `true`: + Note that both the `Native` and `UserDefined` serialization formats support the following comparison operators when is set to `true`: - Equal to (=) @@ -204,7 +204,7 @@ . This attribute is only relevant for UDTs with `UserDefined` serialization . + If set to `true`, all instances of UDTs corresponding to this common language runtime (CLR) type must have a length in bytes exactly equal to . This attribute is only relevant for UDTs with `UserDefined` serialization . ]]> @@ -239,11 +239,11 @@ ## Remarks You must specify the property with the `UserDefined` serialization . - When connecting to SQL Server 2005 or earlier, must be between 1 and 8000. + When connecting to SQL Server 2005 or earlier, must be between 1 and 8000. - When connecting to SQL Server 2008 or later, set between 1 and 8000, for a type whose instances are always 8,000 bytes or less. For types that can have instances larger than 8000, specify -1. + When connecting to SQL Server 2008 or later, set between 1 and 8000, for a type whose instances are always 8,000 bytes or less. For types that can have instances larger than 8000, specify -1. - For a UDT with user-defined serialization specified, refers to the total size of the UDT in its serialized form as defined by the user. Consider a UDT with a property of a string of 10 characters (). When the UDT is serialized using a , the total size of the serialized string is 22 bytes: 2 bytes per Unicode UTF-16 character, multiplied by the maximum number of characters, plus 2 control bytes of overhead incurred from serializing a binary stream. So, when determining the value of , the total size of the serialized UDT must be considered: the size of the data serialized in binary form plus the overhead incurred by serialization. + For a UDT with user-defined serialization specified, refers to the total size of the UDT in its serialized form as defined by the user. Consider a UDT with a property of a string of 10 characters (). When the UDT is serialized using a , the total size of the serialized string is 22 bytes: 2 bytes per Unicode UTF-16 character, multiplied by the maximum number of characters, plus 2 control bytes of overhead incurred from serializing a binary stream. So, when determining the value of , the total size of the serialized UDT must be considered: the size of the data serialized in binary form plus the overhead incurred by serialization. This property should not be used with `Native` serialization . diff --git a/xml/Microsoft.VisualBasic.Activities.XamlIntegration/VisualBasicSettingsConverter.xml b/xml/Microsoft.VisualBasic.Activities.XamlIntegration/VisualBasicSettingsConverter.xml index ccf6ecf9a02..2392c48c215 100644 --- a/xml/Microsoft.VisualBasic.Activities.XamlIntegration/VisualBasicSettingsConverter.xml +++ b/xml/Microsoft.VisualBasic.Activities.XamlIntegration/VisualBasicSettingsConverter.xml @@ -16,11 +16,11 @@ Converts a instance to the specified type. - facilitates the deserialization of Visual Basic expressions from XAML. - + facilitates the deserialization of Visual Basic expressions from XAML. + ]]> @@ -76,11 +76,11 @@ if the specified type can be converted from; otherwise, . - , this method returns `true`; otherwise, the determination is made by calling the base class method . - + , this method returns `true`; otherwise, the determination is made by calling the base class method . + ]]> @@ -112,11 +112,11 @@ if a instance can be converted to an instance of the specified type; otherwise, . - ; otherwise, the determination is made by calling the base class method . - + ; otherwise, the determination is made by calling the base class method . + ]]> @@ -149,11 +149,11 @@ Converts the specified object to a instance. An object that represents the converted value. - . If the conversion cannot be made, a is thrown. - + . If the conversion cannot be made, a is thrown. + ]]> @@ -188,11 +188,11 @@ Converts a instance to the specified type. The converted value. - . If the conversion cannot be made, a is thrown. - + . If the conversion cannot be made, a is thrown. + ]]> diff --git a/xml/Microsoft.VisualBasic.Activities/VisualBasic.xml b/xml/Microsoft.VisualBasic.Activities/VisualBasic.xml index 7b09639a7bf..3bf2f4e3aa3 100644 --- a/xml/Microsoft.VisualBasic.Activities/VisualBasic.xml +++ b/xml/Microsoft.VisualBasic.Activities/VisualBasic.xml @@ -16,11 +16,11 @@ Provides an attached property store for . - allows for an instance of to be attached to the top level activity in a workflow defined in a XAML file, thus defining the settings for all and expressions in that workflow. - + allows for an instance of to be attached to the top level activity in a workflow defined in a XAML file, thus defining the settings for all and expressions in that workflow. + ]]> @@ -100,11 +100,11 @@ The instance to attach. Attaches a instance to an object for use by its implementation. - exists for the activity author who is creating a new activity in a class. Any required by the new activity's implementation should be attached to the activity in the constructor using . - + exists for the activity author who is creating a new activity in a class. Any required by the new activity's implementation should be attached to the activity in the constructor using . + ]]> diff --git a/xml/Microsoft.VisualBasic.Activities/VisualBasicImportReference.xml b/xml/Microsoft.VisualBasic.Activities/VisualBasicImportReference.xml index 2a169ce3530..b5d92be2327 100644 --- a/xml/Microsoft.VisualBasic.Activities/VisualBasicImportReference.xml +++ b/xml/Microsoft.VisualBasic.Activities/VisualBasicImportReference.xml @@ -20,11 +20,11 @@ Represents an assembly reference and the namespace imported from that assembly. - and to provide assembly references and namespaces required for expression compilation. - + and to provide assembly references and namespaces required for expression compilation. + ]]> diff --git a/xml/Microsoft.VisualBasic.Activities/VisualBasicReference`1.xml b/xml/Microsoft.VisualBasic.Activities/VisualBasicReference`1.xml index 163101a3d7a..974c67b3ab6 100644 --- a/xml/Microsoft.VisualBasic.Activities/VisualBasicReference`1.xml +++ b/xml/Microsoft.VisualBasic.Activities/VisualBasicReference`1.xml @@ -41,11 +41,11 @@ The type of the expression. Contains an expression in Visual Basic syntax that evaluates to an l-value, which supports binding of the arguments. - @@ -148,11 +148,11 @@ if the can be converted into a string; otherwise, . - @@ -183,11 +183,11 @@ Converts the to a . A string representation of the . - surrounded by brackets. - + surrounded by brackets. + ]]> diff --git a/xml/Microsoft.VisualBasic.Activities/VisualBasicValue`1.xml b/xml/Microsoft.VisualBasic.Activities/VisualBasicValue`1.xml index a76736a214e..72d776804c7 100644 --- a/xml/Microsoft.VisualBasic.Activities/VisualBasicValue`1.xml +++ b/xml/Microsoft.VisualBasic.Activities/VisualBasicValue`1.xml @@ -41,11 +41,11 @@ The type of the expression. Contains an expression in Visual Basic syntax that evaluates to an r-value, which supports binding of arguments. - @@ -148,11 +148,11 @@ if the can be converted into a string; otherwise, . - @@ -183,11 +183,11 @@ Converts the to a . A string representation of the . - surrounded by brackets. - + surrounded by brackets. + ]]> diff --git a/xml/Microsoft.VisualBasic.ApplicationServices/ApplicationBase.xml b/xml/Microsoft.VisualBasic.ApplicationServices/ApplicationBase.xml index 40dc19afddf..336a5f2cd03 100644 --- a/xml/Microsoft.VisualBasic.ApplicationServices/ApplicationBase.xml +++ b/xml/Microsoft.VisualBasic.ApplicationServices/ApplicationBase.xml @@ -139,11 +139,11 @@ property. determines the default formats for dates, times, currency, numbers, sorting order of text, string comparisons, and casing for all computations on that thread. + The `My.Application.ChangeCulture` method changes the current thread's property. determines the default formats for dates, times, currency, numbers, sorting order of text, string comparisons, and casing for all computations on that thread. To retrieve the current culture, you can use the property or the property. - The setting is different from a language setting. It contains only data related to the standard settings for a geographical region. Therefore, the property can only be set to a specific culture or to the . + The setting is different from a language setting. It contains only data related to the standard settings for a geographical region. Therefore, the property can only be set to a specific culture or to the . Use the `My.Application.ChangeUICulture` method to change the culture that the current thread uses for retrieving culture-specific resources. @@ -294,9 +294,9 @@ ## Remarks The `My.Application.CurrentCulture` property gets the object that the current thread uses for string manipulation and string formatting. This object is identical to the one returned by the property, which controls many of the string-related computations on that thread. The property determines the default formats for dates, times, currency, and numbers. It also determines how to sort, compare, and capitalize strings. - To change the culture, you can use the method or assign a different object to the property. + To change the culture, you can use the method or assign a different object to the property. - The setting is different from a language setting. It contains only data related to the standard settings for a geographical region. + The setting is different from a language setting. It contains only data related to the standard settings for a geographical region. Use the `My.Application.CurrentUICulture` property to get the culture that the current thread uses for retrieving culture-specific resources. @@ -367,7 +367,7 @@ , except that this method raises an exception if the environment variable specified by `name` does not exist. + The `My.Application.GetEnvironmentVariable` method returns the environment variable with the name `name`. This method is similar to , except that this method raises an exception if the environment variable specified by `name` does not exist. ## Availability by Project Type @@ -527,9 +527,9 @@ ## Remarks The `My.Application.CurrentUICulture` property gets the object that the current thread uses for retrieving culture-specific resources. This object is identical to the one returned by the property. The property determines the culture used by the Resource Manager and the `My.Resources` object, information it needs to look up culture-specific resources at run time. - To change the culture, you can use the method or assign a different object to the property. + To change the culture, you can use the method or assign a different object to the property. - The setting is different from a language setting. It contains only data related to the standard settings for a geographical region. + The setting is different from a language setting. It contains only data related to the standard settings for a geographical region. Use the `My.Application.CurrentCulture` property to get the culture that the current thread uses for string manipulation and string formatting. @@ -548,7 +548,7 @@ ## Examples - This example uses the `My.Application.CurrentCulture` property to cache the current culture before changing it by using . The `My.Application.ChangeUICulture` method sets the culture that the `My.Resources` object uses for retrieving resources. + This example uses the `My.Application.CurrentCulture` property to cache the current culture before changing it by using . The `My.Application.ChangeUICulture` method sets the culture that the `My.Resources` object uses for retrieving resources. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.ApplicationServices/ApplicationBase/ChangeUICulture/Form1.vb" id="Snippet10"::: diff --git a/xml/Microsoft.VisualBasic.ApplicationServices/AssemblyInfo.xml b/xml/Microsoft.VisualBasic.ApplicationServices/AssemblyInfo.xml index 7ddf32b942e..594e550e9b1 100644 --- a/xml/Microsoft.VisualBasic.ApplicationServices/AssemblyInfo.xml +++ b/xml/Microsoft.VisualBasic.ApplicationServices/AssemblyInfo.xml @@ -460,7 +460,7 @@ method. + The `My.Application.Info.LoadedAssemblies` property is similar to the method. ## Availability by Project Type @@ -814,7 +814,7 @@ object containing the version number of the application. You can use the , , , and properties of the object to access specific version information about the application. + The `My.Application.Info.Version` property gets a object containing the version number of the application. You can use the , , , and properties of the object to access specific version information about the application. ClickOnce-deployed applications should use the property of the property. diff --git a/xml/Microsoft.VisualBasic.ApplicationServices/AuthenticationMode.xml b/xml/Microsoft.VisualBasic.ApplicationServices/AuthenticationMode.xml index bc1ceb9454c..5ff463bb52e 100644 --- a/xml/Microsoft.VisualBasic.ApplicationServices/AuthenticationMode.xml +++ b/xml/Microsoft.VisualBasic.ApplicationServices/AuthenticationMode.xml @@ -26,13 +26,13 @@ Indicates how a Visual Basic application authenticates the user for the object. - constructor. For more information, see [Extending the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/customizing-extending-my/extending-the-visual-basic-application-model). - - A Visual Basic application that uses the Visual Basic Application Model can specify whether it uses Windows authentication or custom authentication. You can also configure the authentication mode in the Visual Studio Integrated Development Environment. For more information, see [Application Page, Project Designer (Visual Basic)](https://learn.microsoft.com/visualstudio/ide/reference/application-page-project-designer-visual-basic). - + constructor. For more information, see [Extending the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/customizing-extending-my/extending-the-visual-basic-application-model). + + A Visual Basic application that uses the Visual Basic Application Model can specify whether it uses Windows authentication or custom authentication. You can also configure the authentication mode in the Visual Studio Integrated Development Environment. For more information, see [Application Page, Project Designer (Visual Basic)](https://learn.microsoft.com/visualstudio/ide/reference/application-page-project-designer-visual-basic). + ]]> diff --git a/xml/Microsoft.VisualBasic.ApplicationServices/BuiltInRoleConverter.xml b/xml/Microsoft.VisualBasic.ApplicationServices/BuiltInRoleConverter.xml index 79624995a22..368bfe1fb92 100644 --- a/xml/Microsoft.VisualBasic.ApplicationServices/BuiltInRoleConverter.xml +++ b/xml/Microsoft.VisualBasic.ApplicationServices/BuiltInRoleConverter.xml @@ -25,7 +25,7 @@ For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). > [!CAUTION] -> You should never create an instance of a class. Instead, call the method of the class. For more information, see the examples in the base class. +> You should never create an instance of a class. Instead, call the method of the class. For more information, see the examples in the base class. ]]> @@ -143,7 +143,7 @@ on the object if the object is valid and if the destination type is . + The most common types to convert to and convert from are string objects. The default implementation makes a call to on the object if the object is valid and if the destination type is . The `context` parameter can be used to extract additional information about the environment this converter is being invoked from. This can be `Nothing`, so always check. Also, properties on the context object can return `Nothing`. diff --git a/xml/Microsoft.VisualBasic.ApplicationServices/CantStartSingleInstanceException.xml b/xml/Microsoft.VisualBasic.ApplicationServices/CantStartSingleInstanceException.xml index 5f7852348fa..cc53f999998 100644 --- a/xml/Microsoft.VisualBasic.ApplicationServices/CantStartSingleInstanceException.xml +++ b/xml/Microsoft.VisualBasic.ApplicationServices/CantStartSingleInstanceException.xml @@ -96,8 +96,8 @@ |Property|Value| |-|-| -||A null reference (`Nothing` in Visual Basic).| -||The localized error message string.| +||A null reference (`Nothing` in Visual Basic).| +||The localized error message string.| ]]> @@ -150,8 +150,8 @@ |Property|Value| |-|-| -||A null reference (`Nothing` in Visual Basic)| -||The `message` string.| +||A null reference (`Nothing` in Visual Basic)| +||The `message` string.| ]]> @@ -265,8 +265,8 @@ |Property|Value| |-|-| -||The `inner` reference.| -||The `message` string.| +||The `inner` reference.| +||The `message` string.| ]]> diff --git a/xml/Microsoft.VisualBasic.ApplicationServices/ConsoleApplicationBase.xml b/xml/Microsoft.VisualBasic.ApplicationServices/ConsoleApplicationBase.xml index cd8517bcf3a..6b58e4df763 100644 --- a/xml/Microsoft.VisualBasic.ApplicationServices/ConsoleApplicationBase.xml +++ b/xml/Microsoft.VisualBasic.ApplicationServices/ConsoleApplicationBase.xml @@ -142,7 +142,7 @@ > The `My.Application.CommandLineArgs` property returns only the command-line arguments. This is different from the behavior of the property, which returns the application name in addition to the arguments. > [!NOTE] -> In an application that is ClickOnce deployed, use the property of the `My.Application.Deployment` object to get the command-line arguments. For more information, see . +> In an application that is ClickOnce deployed, use the property of the `My.Application.Deployment` object to get the command-line arguments. For more information, see . The following table lists examples of tasks involving the `My.Application.CommandLineArgs` property. @@ -223,7 +223,7 @@ ## Examples - This example downloads and installs the update after checking that the application is network-deployed. The method does not update the application unless it is out of date. The application has to restart to use the update. + This example downloads and installs the update after checking that the application is network-deployed. The method does not update the application unless it is out of date. The application has to restart to use the update. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.ApplicationServices/ApplicationBase/Overview/Form1.vb" id="Snippet4"::: @@ -339,7 +339,7 @@ ## Examples - This example downloads and installs the update after checking that the application is deployed from a network. The method does not update the application unless it is out of date. The application has to restart to use the update. + This example downloads and installs the update after checking that the application is deployed from a network. The method does not update the application unless it is out of date. The application has to restart to use the update. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.ApplicationServices/ApplicationBase/Overview/Form1.vb" id="Snippet4"::: diff --git a/xml/Microsoft.VisualBasic.ApplicationServices/NoStartupFormException.xml b/xml/Microsoft.VisualBasic.ApplicationServices/NoStartupFormException.xml index 65716cfcd93..23286e83acb 100644 --- a/xml/Microsoft.VisualBasic.ApplicationServices/NoStartupFormException.xml +++ b/xml/Microsoft.VisualBasic.ApplicationServices/NoStartupFormException.xml @@ -40,7 +40,7 @@ property before running the method. If the property is not set, the Visual Basic Application Model raises this exception. For more information, see [Extending the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/customizing-extending-my/extending-the-visual-basic-application-model). + The Visual Basic Application Model requires that the application set the property before running the method. If the property is not set, the Visual Basic Application Model raises this exception. For more information, see [Extending the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/customizing-extending-my/extending-the-visual-basic-application-model). > [!NOTE] > For information about how to set the startup form by using the **Project Designer**, see [Application Page, Project Designer (Visual Basic)](https://learn.microsoft.com/visualstudio/ide/reference/application-page-project-designer-visual-basic). @@ -91,14 +91,14 @@ property before running the method. If the property is not set, the Visual Basic Application Model raises this exception. For more information, see [Extending the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/customizing-extending-my/extending-the-visual-basic-application-model). + The Visual Basic Application Model requires that the application set the property before running the method. If the property is not set, the Visual Basic Application Model raises this exception. For more information, see [Extending the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/customizing-extending-my/extending-the-visual-basic-application-model). The following table shows the initial property values for an instance of . |Property|Value| |-|-| -||A null reference (`Nothing` in Visual Basic).| -||The localized error-message string.| +||A null reference (`Nothing` in Visual Basic).| +||The localized error-message string.| ]]> @@ -151,8 +151,8 @@ |Property|Value| |-|-| -||A null reference (`Nothing` in Visual Basic)| -||The `message` string.| +||A null reference (`Nothing` in Visual Basic)| +||The `message` string.| ]]> @@ -266,8 +266,8 @@ |Property|Value| |-|-| -||The `inner` reference.| -||The `message` string.| +||The `inner` reference.| +||The `message` string.| ]]> diff --git a/xml/Microsoft.VisualBasic.ApplicationServices/ShutdownMode.xml b/xml/Microsoft.VisualBasic.ApplicationServices/ShutdownMode.xml index cddf6b098ec..8b13ac89ac8 100644 --- a/xml/Microsoft.VisualBasic.ApplicationServices/ShutdownMode.xml +++ b/xml/Microsoft.VisualBasic.ApplicationServices/ShutdownMode.xml @@ -29,7 +29,7 @@ property. By default, the method checks the value of the property to determine if the application should shut down. + You can set the shutdown mode for an application through the property. By default, the method checks the value of the property to determine if the application should shut down. ]]> diff --git a/xml/Microsoft.VisualBasic.ApplicationServices/UnhandledExceptionEventArgs.xml b/xml/Microsoft.VisualBasic.ApplicationServices/UnhandledExceptionEventArgs.xml index 4158b8e5170..1cdbc09afef 100644 --- a/xml/Microsoft.VisualBasic.ApplicationServices/UnhandledExceptionEventArgs.xml +++ b/xml/Microsoft.VisualBasic.ApplicationServices/UnhandledExceptionEventArgs.xml @@ -41,13 +41,13 @@ Provides data for the event. - event occurs when an unhandled exception occurs in an application that implements the Visual Basic Application Model. For more information, see [Overview of the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/development-with-my/overview-of-the-visual-basic-application-model). - - contains the that occurred and indicates whether the application should exit upon exiting the exception handler. - + event occurs when an unhandled exception occurs in an application that implements the Visual Basic Application Model. For more information, see [Overview of the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/development-with-my/overview-of-the-visual-basic-application-model). + + contains the that occurred and indicates whether the application should exit upon exiting the exception handler. + ]]> @@ -96,13 +96,13 @@ The that occurred. Initializes a new instance of the class. - event occurs when an unhandled exception occurs in an application that implements the Visual Basic Application Model. For more information, see [Overview of the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/development-with-my/overview-of-the-visual-basic-application-model). - - contains the that occurred and indicates whether the application should exit upon exiting the exception handler. - + event occurs when an unhandled exception occurs in an application that implements the Visual Basic Application Model. For more information, see [Overview of the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/development-with-my/overview-of-the-visual-basic-application-model). + + contains the that occurred and indicates whether the application should exit upon exiting the exception handler. + ]]> @@ -153,11 +153,11 @@ Indicates whether the application should exit upon exiting the exception handler. A that indicates whether the application should exit upon exiting the exception handler. - event. If is `True`, then the application exits. Otherwise, the application continues to run. For more information, see [Overview of the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/development-with-my/overview-of-the-visual-basic-application-model). - + event. If is `True`, then the application exits. Otherwise, the application continues to run. For more information, see [Overview of the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/development-with-my/overview-of-the-visual-basic-application-model). + ]]> diff --git a/xml/Microsoft.VisualBasic.ApplicationServices/User.xml b/xml/Microsoft.VisualBasic.ApplicationServices/User.xml index 40318989a04..f3f1c061cc9 100644 --- a/xml/Microsoft.VisualBasic.ApplicationServices/User.xml +++ b/xml/Microsoft.VisualBasic.ApplicationServices/User.xml @@ -41,7 +41,7 @@ For Windows applications, this property provides the same functionality as the property. For Web applications, this property provides the same functionality as the property of the object returned by the property. > [!NOTE] -> For Windows applications, only projects built on the **Windows Application** template initialize the `My.User` object by default. In all other Windows project types, you must initialize the `My.User` object by calling the method explicitly or by assigning a value to . +> For Windows applications, only projects built on the **Windows Application** template initialize the `My.User` object by default. In all other Windows project types, you must initialize the `My.User` object by calling the method explicitly or by assigning a value to . ## Examples This example checks if the application is using Windows or custom authentication, and uses that information to parse the `My.User.Name` property. @@ -216,7 +216,7 @@ . + You can use the `My.User.InitializeWithWindowsUser` method to set the thread's current principal to the Windows user that started the application. The Visual Basic Application Model in a Windows application calls this method at startup by default. In other project types, you must set the thread's current principal by calling this method explicitly or by assigning a value to . In Windows projects, the `My.User` object is based on the thread's current principal; therefore, this method can change the information `My.User` returns. In an ASP.NET application, the `My.User` object is based on the current HTTP request's user identity, and is unaffected by this method. @@ -392,9 +392,9 @@ ## Remarks The `My.User.IsInRole` method allows your code to determine if the current user is a member of the specified role. - The overload of the `My.User.IsInRole` method that takes a string provides easy access to the method of the current principal. + The overload of the `My.User.IsInRole` method that takes a string provides easy access to the method of the current principal. - The overload of the `My.User.IsInRole` method that takes a `BuiltInRole` enumeration behaves differently, depending on the current principal. If it is a Windows user principal (), this function converts `role` to the equivalent enumeration and returns the result of calling . If the current principal is any other principal, this function passes the name of the enumeration value in `role` to the principal's method. + The overload of the `My.User.IsInRole` method that takes a `BuiltInRole` enumeration behaves differently, depending on the current principal. If it is a Windows user principal (), this function converts `role` to the equivalent enumeration and returns the result of calling . If the current principal is any other principal, this function passes the name of the enumeration value in `role` to the principal's method. > [!NOTE] > The exact behavior of the `My.User` object depends on the type of the application and on the operating system on which the application runs. For more information, see the class overview. @@ -467,9 +467,9 @@ ## Remarks The `My.User.IsInRole` method allows your code to determine if the current user is a member of the specified role. - The overload of the `My.User.IsInRole` method that takes a string provides easy access to the method of the current principal. + The overload of the `My.User.IsInRole` method that takes a string provides easy access to the method of the current principal. - The overload of the `My.User.IsInRole` method that takes a `BuiltInRole` enumeration behaves differently, depending on the current principal. If it is a Windows user principal (), this function converts `role` to the equivalent enumeration and returns the result of calling . If the current principal is any other principal, this function passes the name of the enumeration value in `role` to the principal's method. + The overload of the `My.User.IsInRole` method that takes a `BuiltInRole` enumeration behaves differently, depending on the current principal. If it is a Windows user principal (), this function converts `role` to the equivalent enumeration and returns the result of calling . If the current principal is any other principal, this function passes the name of the enumeration value in `role` to the principal's method. > [!NOTE] > The exact behavior of the `My.User` object depends on the type of the application and on the operating system on which the application runs. For more information, see the class overview. diff --git a/xml/Microsoft.VisualBasic.ApplicationServices/WebUser.xml b/xml/Microsoft.VisualBasic.ApplicationServices/WebUser.xml index bb8e55d10c2..0f1195ecac2 100644 --- a/xml/Microsoft.VisualBasic.ApplicationServices/WebUser.xml +++ b/xml/Microsoft.VisualBasic.ApplicationServices/WebUser.xml @@ -27,7 +27,7 @@ For Windows applications, this property provides the same functionality as the property. For Web applications, this property provides the same functionality as the property of the object returned by the property. > [!NOTE] -> For Windows applications, only projects built on the **Windows Application** template initialize the `My.User` object by default. In all other Windows project types, you must initialize the `My.User` object by calling the method explicitly or by assigning a value to . +> For Windows applications, only projects built on the **Windows Application** template initialize the `My.User` object by default. In all other Windows project types, you must initialize the `My.User` object by calling the method explicitly or by assigning a value to . ## Examples This example checks if the application is using Windows or custom authentication, and uses that information to parse the `My.User.Name` property. diff --git a/xml/Microsoft.VisualBasic.ApplicationServices/WindowsFormsApplicationBase.xml b/xml/Microsoft.VisualBasic.ApplicationServices/WindowsFormsApplicationBase.xml index c9b98c0e6e1..09fdac06bde 100644 --- a/xml/Microsoft.VisualBasic.ApplicationServices/WindowsFormsApplicationBase.xml +++ b/xml/Microsoft.VisualBasic.ApplicationServices/WindowsFormsApplicationBase.xml @@ -43,7 +43,7 @@ ## Examples - This example uses a loop to iterate through the application's open forms, selects the forms that can be accessed directly by the current thread, and displays their titles in a control. For information about how to access the open forms, see . + This example uses a loop to iterate through the application's open forms, selects the forms that can be accessed directly by the current thread, and displays their titles in a control. For information about how to access the open forms, see . :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.ApplicationServices/ApplicationBase/Overview/Form1.vb" id="Snippet10"::: @@ -302,7 +302,7 @@ method. + The `My.Application.DoEvents` method allows your application to handle other events that might be raised while you code runs. The `My.Application.DoEvents` method has the same behavior as the method. When you run a Windows Forms application, it creates a new form, which then waits for events to be handled. Each time the form handles an event, such as a button click, it processes all the code associated with that event. All other events wait in the queue. While your code handles the event, your application does not respond. For example, the window does not repaint if another window is dragged on top. @@ -392,7 +392,7 @@ method uses this property to determine whether to call . + The method uses this property to determine whether to call . ]]> @@ -536,7 +536,7 @@ method uses this property to determine whether this application is a single-instance application. + The method uses this property to determine whether this application is a single-instance application. ]]> @@ -642,7 +642,7 @@ This property supports the Visual Basic Application model. For more information, see [Overview of the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/development-with-my/overview-of-the-visual-basic-application-model). - You should set the `My.Application.MinimumSplashScreenDisplayTime` property in a method that overrides the or method. Code that overrides methods of the class should be entered in the ApplicationEvents.vb file, which is hidden by default. + You should set the `My.Application.MinimumSplashScreenDisplayTime` property in a method that overrides the or method. Code that overrides methods of the class should be entered in the ApplicationEvents.vb file, which is hidden by default. To access the Code Editor window for overriding members: @@ -717,7 +717,7 @@ For more information, see [Application Page, Project Designer (Visual Basic)](ht ## Remarks An application raises the `NetworkAvailabilityChanged` event every time that the availability of the network changes. You can use the property of the `e` parameter to get the new state of the network connection. To get the current state of the network connection, use the property. - This event is raised on the application's main thread with the other user-interface events. This enables the event handler to access directly the application's UI. However, if the application is busy handling another user-interface event when this event is raised, this event cannot be processed until the other event handler finishes or calls the method. + This event is raised on the application's main thread with the other user-interface events. This enables the event handler to access directly the application's UI. However, if the application is busy handling another user-interface event when this event is raised, this event cannot be processed until the other event handler finishes or calls the method. The event provides the same functionality as this event but is available for all application types. @@ -808,7 +808,7 @@ For more information, see [Application Page, Project Designer (Visual Basic)](ht ## Remarks By default, this method does nothing. However, when you select a main form for your application in the Visual Basic **Project Designer**, the designer overrides this method with a method that sets the property to a new instance of the main form. - This method is called by the method. + This method is called by the method. ]]> @@ -854,9 +854,9 @@ For more information, see [Application Page, Project Designer (Visual Basic)](ht method with a method that sets the property to a new instance of the splash-screen form. + By default, this method does nothing. If you select a splash screen for your application in the Visual Basic **Project Designer**, the designer overrides the method with a method that sets the property to a new instance of the splash-screen form. - This method is called by the method. + This method is called by the method. ]]> @@ -914,9 +914,9 @@ For more information, see [Application Page, Project Designer (Visual Basic)](ht This method calls the following methods: -- . +- . -- . +- . ]]> @@ -971,11 +971,11 @@ For more information, see [Application Page, Project Designer (Visual Basic)](ht ## Remarks By default, before it enters the Windows Forms message loop, this method calls the `OnCreateMainForm` (to create the application's main form) and `HideSplashScreen` (to close the splash screen) methods: -- . Provides a way for a designer to emit code that initializes the main form. +- . Provides a way for a designer to emit code that initializes the main form. - By default, this method does nothing. However, when you select a main form for your application in the Visual Basic **Project Designer**, the designer overrides the method with a method that sets the property to a new instance of the main form. + By default, this method does nothing. However, when you select a main form for your application in the Visual Basic **Project Designer**, the designer overrides the method with a method that sets the property to a new instance of the main form. -- . If the application has a splash screen defined and it is open, this method closes the splash screen. +- . If the application has a splash screen defined and it is open, this method closes the splash screen. By default, this method closes the splash screen. @@ -1076,7 +1076,7 @@ For more information, see [Application Page, Project Designer (Visual Basic)](ht event. The event handler can set the property of the event argument. If is `True`, this method returns `False` to cancel the application startup. Otherwise, this method returns `True`. + By default, this method raises the event. The event handler can set the property of the event argument. If is `True`, this method returns `False` to cancel the application startup. Otherwise, this method returns `True`. ]]> @@ -1131,7 +1131,7 @@ For more information, see [Application Page, Project Designer (Visual Basic)](ht event. The event handler can set the property of the event argument. If is `True`, the method activates the main form. Otherwise, the main form is left in its current state. + By default, this method raises the event. The event handler can set the property of the event argument. If is `True`, the method activates the main form. Otherwise, the main form is left in its current state. ]]> @@ -1184,7 +1184,7 @@ For more information, see [Application Page, Project Designer (Visual Basic)](ht event as long as a debugger is not attached and the user is handling the `UnhandledException` event. The event handler can set the property. If is `False`, or if the event is not handled, the application exits upon return from the exception handler. Otherwise, control of the application is returned to the Windows Forms message loop. + By default, this method raises the event as long as a debugger is not attached and the user is handling the `UnhandledException` event. The event handler can set the property. If is `False`, or if the event is not handled, the application exits upon return from the exception handler. Otherwise, control of the application is returned to the Windows Forms message loop. ]]> @@ -1367,7 +1367,7 @@ For more information, see [Application Page, Project Designer (Visual Basic)](ht method of the `My.Settings` object. For more information about changing and saving settings, see [Application Properties](/previous-versions/visualstudio/visual-studio-2015/ide/application-properties). + The `SaveMySettingsOnExit` property allows the user to change how the application saves settings, at run time. You can explicitly save setting changes by using the method of the `My.Settings` object. For more information about changing and saving settings, see [Application Properties](/previous-versions/visualstudio/visual-studio-2015/ide/application-properties). The changes to this property are not persisted when the application closes. To change the `SaveMySettingsOnExit` property permanently, you must change the setting in the **Project Designer**: @@ -1449,9 +1449,9 @@ To change the setting in the Project Designer: ## Remarks By default, this method calls `OnCreateSplashScreen` in a thread-safe way. - The method contains the code that displays the splash screen for at least the number of milliseconds specified by the property. To use this functionality, you must set the `My.Application.MinimumSplashScreenDisplayTime` property in a method that overrides the or method, or add the splash screen to your application using the **Project Designer**. For more information, see . + The method contains the code that displays the splash screen for at least the number of milliseconds specified by the property. To use this functionality, you must set the `My.Application.MinimumSplashScreenDisplayTime` property in a method that overrides the or method, or add the splash screen to your application using the **Project Designer**. For more information, see . - This method is called by the method. + This method is called by the method. ]]> @@ -1573,7 +1573,7 @@ For more information, see [Application Page, Project Designer (Visual Basic)](ht method checks the value of this property to determine if the application should shut down when the main form is closed, or if another open form should be promoted as the new main form. + The method checks the value of this property to determine if the application should shut down when the main form is closed, or if another open form should be promoted as the new main form. ]]> @@ -1776,7 +1776,7 @@ For more information, see [Application Page, Project Designer (Visual Basic)](ht This event is part of the Visual Basic Application model. For more information, see [Overview of the Visual Basic Application Model](/dotnet/visual-basic/developing-apps/development-with-my/overview-of-the-visual-basic-application-model). - This event is raised on the application's main thread with the other user-interface events. This allows the event handler to access directly the application's user interface. However, if the application is busy handling another user-interface event when this event is raised, this event cannot be processed until the other event handler finishes or calls the method. + This event is raised on the application's main thread with the other user-interface events. This allows the event handler to access directly the application's user interface. However, if the application is busy handling another user-interface event when this event is raised, this event cannot be processed until the other event handler finishes or calls the method. > [!NOTE] > The `StartupNextInstance` event is raised only in single-instance applications. To enable single-instance behavior for your application, you must check the **Make single instance application** check box in the Project Designer. @@ -1798,7 +1798,7 @@ To access the Code Editor window for application events: |To|See| |-|-| -|Check the command-line arguments of the first application instance|| +|Check the command-line arguments of the first application instance|| ## Availability by Project Type @@ -1868,7 +1868,7 @@ To access the Code Editor window for application events: You can use the property of the `e` parameter to access the unhandled exception that caused this event. - You can use the property of the `e` parameter to control whether the application exits. By default, is `True`. Therefore, the application exits after completing the `UnhandledException` event handler. You can set the value to `False` in the `UnhandledException` event handler to keep the application running, and have it return to a waiting state. + You can use the property of the `e` parameter to control whether the application exits. By default, is `True`. Therefore, the application exits after completing the `UnhandledException` event handler. You can set the value to `False` in the `UnhandledException` event handler to keep the application running, and have it return to a waiting state. The code for the `UnhandledException` event handler is stored in the ApplicationEvents.vb file, which is hidden by default. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ADODC.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ADODC.xml index 90c480ce2db..6c275db7130 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ADODC.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ADODC.xml @@ -190,9 +190,9 @@ return values are determined by the location of the current row pointer if this pointer is valid. If either `BOF` or is `true`, there is no current row, and any attempt to reference data causes an exception. + The `BOF` and return values are determined by the location of the current row pointer if this pointer is valid. If either `BOF` or is `true`, there is no current row, and any attempt to reference data causes an exception. - You can use the `BOF` and properties to determine whether an object contains rows or whether you have gone beyond the limits of an as you move from row to row. + You can use the `BOF` and properties to determine whether an object contains rows or whether you have gone beyond the limits of an as you move from row to row. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -238,7 +238,7 @@ is the current row. + Use this property to specify the behavior when the `MovePrevious` button is pressed and the first row of a is the current row. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -284,7 +284,7 @@ , the provider fetches the first 10 records into local memory. Therefore, as you move forward from the current record, the provider returns the data values from the local memory buffer. As soon as you move past the last record, the next 10 records are fetched from the data source into the cache. + The `CacheSize` value tells the provider how many records to keep in its buffer and how many records to fetch at one time to local memory. For example, when set to 10, after opening the first , the provider fetches the first 10 records into local memory. Therefore, as you move forward from the current record, the provider returns the data values from the local memory buffer. As soon as you move past the last record, the next 10 records are fetched from the data source into the cache. While you can change value during the life of the cursor, the change only affects the number of records in the cache after the next fetch from the data source. @@ -574,7 +574,7 @@ . + Determines the cursor type to use when opening a . > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -614,7 +614,7 @@ method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the disposing parameter set to `false`. + This method is called by the public `Dispose()` method and the method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the disposing parameter set to `false`. When the disposing parameter is `true`, this method releases all resources held by any managed objects that this control references. This method invokes the `Dispose()` method of each referenced object. @@ -701,9 +701,9 @@ and `EOF` return values are determined by the location of the current row pointer if this pointer is valid. If either or `EOF` is `true`, there is no current row, and any attempt to reference data causes an exception. + The and `EOF` return values are determined by the location of the current row pointer if this pointer is valid. If either or `EOF` is `true`, there is no current row, and any attempt to reference data causes an exception. - You can use the and `EOF` properties to determine whether an object contains rows or whether you have gone beyond the limits of an as you move from row to row. + You can use the and `EOF` properties to determine whether an object contains rows or whether you have gone beyond the limits of an as you move from row to row. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -749,7 +749,7 @@ is the current row. + Use this property to specify the behavior when the `MoveNext` button is pressed when the first row of a is the current row. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1675,7 +1675,7 @@ are supplied, the control uses the values to create a connection string ( property). + The user-name syntax depends on the data source. When a `UserName` and are supplied, the control uses the values to create a connection string ( property). > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ADODCArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ADODCArray.xml index fcea85cfa1c..2628907369f 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ADODCArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ADODCArray.xml @@ -81,7 +81,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate an , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -119,7 +119,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate an , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -779,7 +779,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -789,7 +789,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -1047,7 +1047,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1189,7 +1189,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1428,7 +1428,7 @@ MsgBox(CStr(ADODCArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1463,7 +1463,7 @@ MsgBox(CStr(ADODCArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1473,7 +1473,7 @@ MsgBox(CStr(ADODCArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1646,7 +1646,7 @@ MsgBox(CStr(ADODCArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2155,7 +2155,7 @@ MsgBox(CStr(ADODCArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2237,7 +2237,7 @@ MsgBox(CStr(ADODCArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should be called only when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2483,7 +2483,7 @@ MsgBox(CStr(ADODCArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2497,7 +2497,7 @@ MsgBox(CStr(ADODCArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2548,7 +2548,7 @@ MsgBox(CStr(ADODCArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2562,7 +2562,7 @@ MsgBox(CStr(ADODCArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/BaseControlArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/BaseControlArray.xml index 10498503570..4a9777d2a4f 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/BaseControlArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/BaseControlArray.xml @@ -501,7 +501,7 @@ method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the disposing parameter set to `false`. + This method is called by the public `Dispose()` method and the method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the disposing parameter set to `false`. When the disposing parameter is `true`, this method releases all resources held by any managed objects that this control references. This method invokes the `Dispose()` method of each referenced object. @@ -702,7 +702,7 @@ function to determine the size of a control array. + The `LBound` function is used with the function to determine the size of a control array. The class is the base class for all control arrays used in applications upgraded from Visual Basic 6.0. @@ -811,7 +811,7 @@ and `EndInit` methods prevents the control from being used before it is fully initialized. The initialization occurs at run time. + Design environments typically use this method to finish the initialization of a component that is used on a form or used by another component. The `EndInit` method ends the initialization. Using the and `EndInit` methods prevents the control from being used before it is fully initialized. The initialization occurs at run time. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -844,7 +844,7 @@ function to determine the size of a control array. + The `UBound` function is used with the function to determine the size of a control array. The class is the base class for all control arrays used in applications upgraded from Visual Basic 6.0. @@ -884,7 +884,7 @@ This method is the equivalent of the Visual Basic 6.0 `Unload` function for dynamically removing a control array element. > [!NOTE] -> Only controls that were added dynamically by using the method can be removed from the control array. +> Only controls that were added dynamically by using the method can be removed from the control array. The class is the base class for all control arrays that are used in applications upgraded from Visual Basic 6.0. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/BaseDataEnvironment.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/BaseDataEnvironment.xml index ed08741f546..ee9e38b5cb0 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/BaseDataEnvironment.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/BaseDataEnvironment.xml @@ -30,13 +30,13 @@ Emulates a Visual Basic 6.0 in applications that have been upgraded from Visual Basic 6.0. - @@ -57,13 +57,13 @@ Initializes a new instance of the class. - @@ -101,13 +101,13 @@ The listener to add. This method is not implemented in the class. - class. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -147,13 +147,13 @@ Gets a collection of objects for use in an application upgraded from Visual Basic 6.0. A collection of objects. - @@ -188,13 +188,13 @@ Gets a collection of objects for use in an application upgraded from Visual Basic 6.0. A collection of objects. - @@ -234,13 +234,13 @@ Gets a collection of objects for use in an application upgraded from Visual Basic 6.0. A collection of objects. - @@ -275,13 +275,13 @@ Gets a collection of objects for use in an application upgraded from Visual Basic 6.0. A collection of objects. - @@ -318,13 +318,13 @@ Releases the unmanaged resources that are used by a . - method. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + method. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -353,15 +353,15 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources that are used by a , and optionally releases the managed resources. - method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the disposing parameter set to `false`. - - When the disposing parameter is `true`, this method releases all resources held by any managed objects that this control references. This method invokes the `Dispose()` method of each referenced object. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the disposing parameter set to `false`. + + When the disposing parameter is `true`, this method releases all resources held by any managed objects that this control references. This method invokes the `Dispose()` method of each referenced object. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -393,13 +393,13 @@ Overrides the method. - @@ -433,13 +433,13 @@ Invokes a method based on an object. An that contains the object. - @@ -465,15 +465,15 @@ Gets a count of objects. An that contains the count. - @@ -503,15 +503,15 @@ . - class. - - When an application is upgraded to Visual Basic, a `BaseDataEnvironment` is created to enable the ADO-related code. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class. + + When an application is upgraded to Visual Basic, a `BaseDataEnvironment` is created to enable the ADO-related code. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -535,11 +535,11 @@ Contains the collection. - @@ -563,11 +563,11 @@ Contains the collection. - @@ -591,11 +591,11 @@ Contains a collection. - @@ -619,11 +619,11 @@ Contains the collection. - @@ -648,13 +648,13 @@ Gets the object. A object. - @@ -694,13 +694,13 @@ Gets a collection of objects for use in an application upgraded from Visual Basic 6.0. A collection of objects. - @@ -735,13 +735,13 @@ Gets a collection of objects for use in an application upgraded from Visual Basic 6.0. A collection of objects. - @@ -778,15 +778,15 @@ Not applicable. This method is not implemented in the class. - class. - - When an application is upgraded to Visual Basic, a `BaseDataEnvironment` is created to enable the ADO-related code. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class. + + When an application is upgraded to Visual Basic, a `BaseDataEnvironment` is created to enable the ADO-related code. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/BaseOcxArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/BaseOcxArray.xml index 7b7ff21798c..de58028a0ec 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/BaseOcxArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/BaseOcxArray.xml @@ -69,7 +69,7 @@ method to create the initial element in the array. + When you instantiate a `BaseOcxArray`, you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -107,7 +107,7 @@ method to create the initial element in the array. + When you instantiate a `BaseOcxArray`, you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -415,7 +415,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -447,7 +447,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -457,7 +457,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -750,7 +750,7 @@ of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -856,7 +856,7 @@ or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -870,7 +870,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -921,7 +921,7 @@ or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -935,7 +935,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ButtonArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ButtonArray.xml index a5fac61ec40..8cc21175f52 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ButtonArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ButtonArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -877,7 +877,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -887,7 +887,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -999,7 +999,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1035,7 +1035,7 @@ or . + This method can be used to retrieve the index for the or . > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1141,7 +1141,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1347,7 +1347,7 @@ MsgBox(CStr(ButtonArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1382,7 +1382,7 @@ MsgBox(CStr(ButtonArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1392,7 +1392,7 @@ MsgBox(CStr(ButtonArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1674,7 +1674,7 @@ MsgBox(CStr(ButtonArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2135,7 +2135,7 @@ MsgBox(CStr(ButtonArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get it's property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get it's property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2217,7 +2217,7 @@ MsgBox(CStr(ButtonArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2499,7 +2499,7 @@ MsgBox(CStr(ButtonArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2513,7 +2513,7 @@ MsgBox(CStr(ButtonArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2564,7 +2564,7 @@ MsgBox(CStr(ButtonArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2578,7 +2578,7 @@ MsgBox(CStr(ButtonArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/CheckBoxArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/CheckBoxArray.xml index c40847ff434..c7ff71ec0a8 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/CheckBoxArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/CheckBoxArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -979,7 +979,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -989,7 +989,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -1101,7 +1101,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1243,7 +1243,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1449,7 +1449,7 @@ MsgBox(CStr(CheckBoxArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1484,7 +1484,7 @@ MsgBox(CStr(CheckBoxArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1494,7 +1494,7 @@ MsgBox(CStr(CheckBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1778,7 +1778,7 @@ MsgBox(CStr(CheckBoxArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2239,7 +2239,7 @@ MsgBox(CStr(CheckBoxArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get it's property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get it's property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2321,7 +2321,7 @@ MsgBox(CStr(CheckBoxArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2603,7 +2603,7 @@ MsgBox(CStr(CheckBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2617,7 +2617,7 @@ MsgBox(CStr(CheckBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2668,7 +2668,7 @@ MsgBox(CStr(CheckBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2682,7 +2682,7 @@ MsgBox(CStr(CheckBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/CheckedListBoxArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/CheckedListBoxArray.xml index 43aeae77e28..e28777cc2b7 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/CheckedListBoxArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/CheckedListBoxArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -807,7 +807,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -817,7 +817,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -1029,7 +1029,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1171,7 +1171,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1445,7 +1445,7 @@ MsgBox(CStr(CheckedListBoxArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1480,7 +1480,7 @@ MsgBox(CStr(CheckedListBoxArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1490,7 +1490,7 @@ MsgBox(CStr(CheckedListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1837,7 +1837,7 @@ MsgBox(CStr(CheckedListBoxArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2269,7 +2269,7 @@ MsgBox(CStr(CheckedListBoxArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get it's property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get it's property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2375,7 +2375,7 @@ MsgBox(CStr(CheckedListBoxArray(1).Text)) is changed by either a programmatic modification or user interaction. + This event is raised if the is changed by either a programmatic modification or user interaction. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -2420,7 +2420,7 @@ MsgBox(CStr(CheckedListBoxArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2668,7 +2668,7 @@ MsgBox(CStr(CheckedListBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2682,7 +2682,7 @@ MsgBox(CStr(CheckedListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2733,7 +2733,7 @@ MsgBox(CStr(CheckedListBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2747,7 +2747,7 @@ MsgBox(CStr(CheckedListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ColorDialogArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ColorDialogArray.xml index 2a8e3211270..13782eb149f 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ColorDialogArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ColorDialogArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -195,7 +195,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -302,7 +302,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -427,7 +427,7 @@ MsgBox(CStr(ColorDialogArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ComboBoxArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ComboBoxArray.xml index e15169f2479..dddf8592a59 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ComboBoxArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ComboBoxArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1213,7 +1213,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1354,7 +1354,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1594,7 +1594,7 @@ MsgBox(CStr(ComboBoxArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1629,7 +1629,7 @@ MsgBox(CStr(ComboBoxArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1639,7 +1639,7 @@ MsgBox(CStr(ComboBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2019,7 +2019,7 @@ MsgBox(CStr(ComboBoxArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2447,7 +2447,7 @@ MsgBox(CStr(ComboBoxArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2631,7 +2631,7 @@ MsgBox(CStr(ComboBoxArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2947,7 +2947,7 @@ MsgBox(CStr(ComboBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2961,7 +2961,7 @@ MsgBox(CStr(ComboBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -3012,7 +3012,7 @@ MsgBox(CStr(ComboBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -3026,7 +3026,7 @@ MsgBox(CStr(ComboBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/DirListBox.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/DirListBox.xml index f320b3eae87..71358e2bafe 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/DirListBox.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/DirListBox.xml @@ -32,7 +32,7 @@ ## Remarks Use this control to display a hierarchical list of directories. You can create dialog boxes that, for example, enable a user to open a file from a list of files in all available directories. - Set the , , and properties to enable a user to access items in a list. If you also display the and controls, you can write code to synchronize them with the control and with each other. + Set the , , and properties to enable a user to access items in a list. If you also display the and controls, you can write code to synchronize them with the control and with each other. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -240,7 +240,7 @@ and properties. + Use this property to access list items. The `DirList` property works together with the and properties. For a control, the `Index` number sequence is based on the current directories and subdirectories when the control is created at run time. @@ -286,7 +286,7 @@ and properties. + Use this property to return the number of subdirectories in the currently selected directory. The `DirListCount` property works together with the and properties. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -330,7 +330,7 @@ and properties. + Use this property to return the index of the currently selected directory. The `DirListIndex` property works together with the and properties. The expression `instance.DirList(instance.DirListIndex)` returns the string for the currently selected directory. @@ -374,7 +374,7 @@ method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the disposing parameter set to `false`. + This method is called by the public `Dispose()` method and the method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the disposing parameter set to `false`. When the disposing parameter is `true`, this method releases all resources held by any managed objects that this control references. This method invokes the `Dispose()` method of each referenced object. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/DirListBoxArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/DirListBoxArray.xml index 31f2768055f..ef6c639edd9 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/DirListBoxArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/DirListBoxArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -769,7 +769,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -779,7 +779,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -891,7 +891,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1033,7 +1033,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1273,7 +1273,7 @@ MsgBox(CStr(DirListBoxArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1308,7 +1308,7 @@ MsgBox(CStr(DirListBoxArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1318,7 +1318,7 @@ MsgBox(CStr(DirListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1525,7 +1525,7 @@ MsgBox(CStr(DirListBoxArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -1885,7 +1885,7 @@ MsgBox(CStr(DirListBoxArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2035,7 +2035,7 @@ MsgBox(CStr(DirListBoxArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2283,7 +2283,7 @@ MsgBox(CStr(DirListBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2297,7 +2297,7 @@ MsgBox(CStr(DirListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2348,7 +2348,7 @@ MsgBox(CStr(DirListBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2362,7 +2362,7 @@ MsgBox(CStr(DirListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/DriveListBox.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/DriveListBox.xml index fd8b6b356b5..975f3921a93 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/DriveListBox.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/DriveListBox.xml @@ -196,7 +196,7 @@ method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the disposing parameter set to `false`. + This method is called by the public `Dispose()` method and the method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the disposing parameter set to `false`. When the disposing parameter is `true`, this method releases all resources held by any managed objects that this control references. This method invokes the `Dispose()` method of each referenced object. @@ -980,7 +980,7 @@ method. + All messages are sent to the `WndProc` method after being filtered through the method. The `WndProc` method corresponds exactly to the Windows `WindowProc` function. For more information about processing Windows messages, see [WindowProc callback function](https://learn.microsoft.com/previous-versions/windows/desktop/legacy/ms633573(v=vs.85)). diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/DriveListBoxArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/DriveListBoxArray.xml index d45ee9e3328..99c2c335a7a 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/DriveListBoxArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/DriveListBoxArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -836,7 +836,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -846,7 +846,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -958,7 +958,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1100,7 +1100,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1340,7 +1340,7 @@ MsgBox(CStr(DriveListBoxArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1375,7 +1375,7 @@ MsgBox(CStr(DriveListBoxArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1385,7 +1385,7 @@ MsgBox(CStr(DriveListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1592,7 +1592,7 @@ MsgBox(CStr(DriveListBoxArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -1952,7 +1952,7 @@ MsgBox(CStr(DriveListBoxArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2136,7 +2136,7 @@ MsgBox(CStr(DriveListBoxArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2418,7 +2418,7 @@ MsgBox(CStr(DriveListBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2432,7 +2432,7 @@ MsgBox(CStr(DriveListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2483,7 +2483,7 @@ MsgBox(CStr(DriveListBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2497,7 +2497,7 @@ MsgBox(CStr(DriveListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/FileListBoxArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/FileListBoxArray.xml index 15f496d7308..176f8d191f9 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/FileListBoxArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/FileListBoxArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -735,7 +735,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -745,7 +745,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -857,7 +857,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -999,7 +999,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1239,7 +1239,7 @@ MsgBox(CStr(FileListBoxArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1274,7 +1274,7 @@ MsgBox(CStr(FileListBoxArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1284,7 +1284,7 @@ MsgBox(CStr(FileListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1491,7 +1491,7 @@ MsgBox(CStr(FileListBoxArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -1909,7 +1909,7 @@ MsgBox(CStr(FileListBoxArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2059,7 +2059,7 @@ MsgBox(CStr(FileListBoxArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2307,7 +2307,7 @@ MsgBox(CStr(FileListBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2321,7 +2321,7 @@ MsgBox(CStr(FileListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2372,7 +2372,7 @@ MsgBox(CStr(FileListBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2386,7 +2386,7 @@ MsgBox(CStr(FileListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/FixedLengthString.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/FixedLengthString.xml index e6d2911ade3..4d397f48a93 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/FixedLengthString.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/FixedLengthString.xml @@ -28,7 +28,7 @@ ## Remarks In Visual Basic 6.0, a `String` could be declared with a fixed length. In Visual Basic, fixed-length strings are no longer supported and a new is allocated every time the length of the is changed. - The `FixedLengthString` class can be used to emulate the behavior of a Visual Basic 6.0 string, which enables you to declare a string with a fixed length. A `FixedLengthString` cannot be converted to a ; you must either reference the property or call the method to convert the type. + The `FixedLengthString` class can be used to emulate the behavior of a Visual Basic 6.0 string, which enables you to declare a string with a fixed length. A `FixedLengthString` cannot be converted to a ; you must either reference the property or call the method to convert the type. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -257,7 +257,7 @@ End Sub class can be used to emulate the behavior of a Visual Basic 6.0 string, which enables you to declare a string with a fixed length. A cannot be converted to a ; you must either reference the property or call the method to convert the type. + The class can be used to emulate the behavior of a Visual Basic 6.0 string, which enables you to declare a string with a fixed length. A cannot be converted to a ; you must either reference the property or call the method to convert the type. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -308,7 +308,7 @@ End Sub class can be used to emulate the behavior of a Visual Basic 6.0 string, which enables you to declare a string with a fixed length. A cannot be converted to a ; you must either reference the property or call the method to convert the type. + The class can be used to emulate the behavior of a Visual Basic 6.0 string, which enables you to declare a string with a fixed length. A cannot be converted to a ; you must either reference the property or call the method to convert the type. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/FontDialogArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/FontDialogArray.xml index c57ed9f644b..eea260ccf6f 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/FontDialogArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/FontDialogArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -229,7 +229,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -336,7 +336,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -461,7 +461,7 @@ MsgBox(CStr(FontDialogArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/FormShowConstants.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/FormShowConstants.xml index a3a343b7e0c..2890907fb20 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/FormShowConstants.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/FormShowConstants.xml @@ -25,7 +25,7 @@ and . + In Visual Basic 6.0, the `Modal` parameter of the `Show` method was used to determine whether a form would be shown as a modal dialog box. In Visual Basic, the `Modal` parameter is replaced by two different Show methods: and . These constants enable code that has been upgraded from Visual Basic 6.0 to continue to run without additional modification. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/GroupBoxArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/GroupBoxArray.xml index 3520f700529..319f7b13bab 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/GroupBoxArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/GroupBoxArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -841,7 +841,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -851,7 +851,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -963,7 +963,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1105,7 +1105,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1212,7 +1212,7 @@ MsgBox(CStr(GroupBoxArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1247,7 +1247,7 @@ MsgBox(CStr(GroupBoxArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1257,7 +1257,7 @@ MsgBox(CStr(GroupBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1403,7 +1403,7 @@ MsgBox(CStr(GroupBoxArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -1731,7 +1731,7 @@ MsgBox(CStr(GroupBoxArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -1813,7 +1813,7 @@ MsgBox(CStr(GroupBoxArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2061,7 +2061,7 @@ MsgBox(CStr(GroupBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2075,7 +2075,7 @@ MsgBox(CStr(GroupBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2126,7 +2126,7 @@ MsgBox(CStr(GroupBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2140,7 +2140,7 @@ MsgBox(CStr(GroupBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/HScrollBarArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/HScrollBarArray.xml index 79b967defa3..75264191753 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/HScrollBarArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/HScrollBarArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate an , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate an , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -705,7 +705,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -715,7 +715,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -759,7 +759,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1112,7 +1112,7 @@ MsgBox(CStr(HScrollBarArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1147,7 +1147,7 @@ MsgBox(CStr(HScrollBarArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1157,7 +1157,7 @@ MsgBox(CStr(HScrollBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1348,7 +1348,7 @@ MsgBox(CStr(HScrollBarArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -1686,7 +1686,7 @@ MsgBox(CStr(HScrollBarArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -1800,7 +1800,7 @@ MsgBox(CStr(HScrollBarArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2048,7 +2048,7 @@ MsgBox(CStr(HScrollBarArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2062,7 +2062,7 @@ MsgBox(CStr(HScrollBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2113,7 +2113,7 @@ MsgBox(CStr(HScrollBarArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2127,7 +2127,7 @@ MsgBox(CStr(HScrollBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ImageListArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ImageListArray.xml index c15f17b3bc5..056fecdcbce 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ImageListArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ImageListArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate an , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate an , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -195,7 +195,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -267,7 +267,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -392,7 +392,7 @@ MsgBox(CStr(ImageListArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/LabelArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/LabelArray.xml index 04c70800b93..58dadcf2052 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/LabelArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/LabelArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -841,7 +841,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -851,7 +851,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -963,7 +963,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1105,7 +1105,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1178,7 +1178,7 @@ MsgBox(CStr(LabelArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1213,7 +1213,7 @@ MsgBox(CStr(LabelArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1223,7 +1223,7 @@ MsgBox(CStr(LabelArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1557,7 +1557,7 @@ MsgBox(CStr(LabelArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2020,7 +2020,7 @@ MsgBox(CStr(LabelArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2102,7 +2102,7 @@ MsgBox(CStr(LabelArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2384,7 +2384,7 @@ MsgBox(CStr(LabelArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2398,7 +2398,7 @@ MsgBox(CStr(LabelArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2449,7 +2449,7 @@ MsgBox(CStr(LabelArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2463,7 +2463,7 @@ MsgBox(CStr(LabelArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ListBoxArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ListBoxArray.xml index 88aa5580e04..599a5b9303d 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ListBoxArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ListBoxArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -909,7 +909,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -919,7 +919,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -1133,7 +1133,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1275,7 +1275,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1515,7 +1515,7 @@ MsgBox(CStr(ListBoxArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1550,7 +1550,7 @@ MsgBox(CStr(ListBoxArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1560,7 +1560,7 @@ MsgBox(CStr(ListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1929,7 +1929,7 @@ MsgBox(CStr(ListBoxArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2357,7 +2357,7 @@ MsgBox(CStr(ListBoxArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2507,7 +2507,7 @@ MsgBox(CStr(ListBoxArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2755,7 +2755,7 @@ MsgBox(CStr(ListBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2769,7 +2769,7 @@ MsgBox(CStr(ListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2820,7 +2820,7 @@ MsgBox(CStr(ListBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2834,7 +2834,7 @@ MsgBox(CStr(ListBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ListBoxItem.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ListBoxItem.xml index b9359149da8..5f043844ff0 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ListBoxItem.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ListBoxItem.xml @@ -28,7 +28,7 @@ ## Remarks In Visual Basic 6.0, the `ListBox` and `ComboBox` controls use a `List` property to store list items and an `ItemData` property to optionally store an `Integer` associated with each list item. In Visual Basic, the and controls use the property to store list items, and the `ItemData` property is no longer supported. - When a Visual Basic 6.0 application is upgraded to Visual Basic, the upgrade tools create a `ListBoxItem` class for each item in a or control. The and functions can then be used to enable any code that references the `ItemData` property. + When a Visual Basic 6.0 application is upgraded to Visual Basic, the upgrade tools create a `ListBoxItem` class for each item in a or control. The and functions can then be used to enable any code that references the `ItemData` property. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -74,7 +74,7 @@ class for each item in a or control. The and functions can then be used to enable any code that references the `ItemData` property. + When a Visual Basic 6.0 application is upgraded to Visual Basic, the upgrade tools create a class for each item in a or control. The and functions can then be used to enable any code that references the `ItemData` property. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -113,7 +113,7 @@ class for each item in a or control. The and functions can then be used to enable any code that references the `ItemData` property. + When a Visual Basic 6.0 application is upgraded to Visual Basic, the upgrade tools create a class for each item in a or control. The and functions can then be used to enable any code that references the `ItemData` property. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -143,7 +143,7 @@ class for each item in a or control. The and functions can then be used to enable any code that references the `ItemData` property. + When a Visual Basic 6.0 application is upgraded to Visual Basic, the upgrade tools create a class for each item in a or control. The and functions can then be used to enable any code that references the `ItemData` property. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -173,7 +173,7 @@ class for each item in a or control. The and functions can then be used to enable any code that references the `ItemData` property. + When a Visual Basic 6.0 application is upgraded to Visual Basic, the upgrade tools create a class for each item in a or control. The and functions can then be used to enable any code that references the `ItemData` property. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ListViewArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ListViewArray.xml index dfed6a94bc4..00c82d1e48f 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ListViewArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ListViewArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -149,7 +149,7 @@ ## Remarks The `AfterLabelEdit` event occurs when the user finishes modifying the text for an item. The new string that the user types for the item is passed to the event, and the event handler can reject the change. If the event handler rejects the change, the text reverts to the text as it was before the user began editing the item. - In order for the `AfterLabelEdit` event to be raised, the property of the control must be set to `true`. + In order for the `AfterLabelEdit` event to be raised, the property of the control must be set to `true`. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -569,7 +569,7 @@ of the will not change to the value. + The `ColumnReordered` event is a cancelable event and can be canceled by handling the event and setting the [System.Windows.Forms.ColumnReorderedEventArgs.Cancel](xref:System.ComponentModel.CancelEventArgs.Cancel) property to `true`. However, if the event is canceled, the of the will not change to the value. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1181,7 +1181,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -1191,7 +1191,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -1303,7 +1303,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1445,7 +1445,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1552,7 +1552,7 @@ MsgBox(CStr(ListViewArray(1).Text)) control. The user can activate an item with either a single-click or double-click, depending on the value of the property, or with the keyboard. From within the event handler for the `ItemActivate` event, you can reference the or properties to access the collection of items selected in the to determine which items are being activated. + The `ItemActivate` event occurs when the user activates one or more items in the control. The user can activate an item with either a single-click or double-click, depending on the value of the property, or with the keyboard. From within the event handler for the `ItemActivate` event, you can reference the or properties to access the collection of items selected in the to determine which items are being activated. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1652,7 +1652,7 @@ MsgBox(CStr(ListViewArray(1).Text)) method. You can use this event to perform the tasks necessary to drag items into and out of your application's control. + The `ItemDrag` event occurs when the user begins dragging an item. Typically the event handler for the `ItemDrag` event performs the task of dragging by calling the method. You can use this event to perform the tasks necessary to drag items into and out of your application's control. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1887,7 +1887,7 @@ MsgBox(CStr(ListViewArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1922,7 +1922,7 @@ MsgBox(CStr(ListViewArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1932,7 +1932,7 @@ MsgBox(CStr(ListViewArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2268,7 +2268,7 @@ MsgBox(CStr(ListViewArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2696,7 +2696,7 @@ MsgBox(CStr(ListViewArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2835,7 +2835,7 @@ MsgBox(CStr(ListViewArray(1).Text)) is in virtual mode and the or method is called. When handling this event, you should calculate which item from the list of items supplied by the Items property matches the search criteria and set the `SearchForVirtualItemEventArgs.Index` property to the index of the ListViewItem. If an item is not provided, and FindItemWithText will return a null reference (Nothing in Visual Basic). + This event occurs when a is in virtual mode and the or method is called. When handling this event, you should calculate which item from the list of items supplied by the Items property matches the search criteria and set the `SearchForVirtualItemEventArgs.Index` property to the index of the ListViewItem. If an item is not provided, and FindItemWithText will return a null reference (Nothing in Visual Basic). For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -2914,7 +2914,7 @@ MsgBox(CStr(ListViewArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -3162,7 +3162,7 @@ MsgBox(CStr(ListViewArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -3176,7 +3176,7 @@ MsgBox(CStr(ListViewArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -3227,7 +3227,7 @@ MsgBox(CStr(ListViewArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -3241,7 +3241,7 @@ MsgBox(CStr(ListViewArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/MBinding.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/MBinding.xml index 01c3762fe0b..8884da5aa33 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/MBinding.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/MBinding.xml @@ -34,11 +34,11 @@ Enables Windows Forms controls to be bound to ADO recordsets. This type is a managed equivalent of the Visual Basic 6.0 msbind library. - @@ -77,11 +77,11 @@ if data has changed; otherwise, . - @@ -115,11 +115,11 @@ Gets a data field. A that contains the data. - @@ -147,11 +147,11 @@ Gets or sets the data format for a data field. An interface. - @@ -188,13 +188,13 @@ Releases the unmanaged resources that are used by an . - method. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + method. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -223,15 +223,15 @@ to release both managed and unmanaged resources; to release only unmanaged resources. Releases the unmanaged resources that are used by an and, optionally, releases the managed resources. - method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the `disposing` parameter set to `false`. - - When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this control references. This method invokes the `Dispose()` method of each referenced object. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the `disposing` parameter set to `false`. + + When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this control references. This method invokes the `Dispose()` method of each referenced object. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -265,11 +265,11 @@ Gets the key value for a data field. A that contains the key value. - @@ -303,11 +303,11 @@ Gets a data object. An that contains data. - @@ -341,11 +341,11 @@ Gets the name of a property from a data object. A that contains the property name. - diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/MBindingCollection.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/MBindingCollection.xml index b7c861bc7e5..6b6798a1c96 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/MBindingCollection.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/MBindingCollection.xml @@ -349,7 +349,7 @@ method. + This method is called by the public `Dispose()` method and the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -385,7 +385,7 @@ method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the disposing parameter set to `false`. + This method is called by the public `Dispose()` method and the method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the disposing parameter set to `true`. invokes `Dispose` with the disposing parameter set to `false`. When the disposing parameter is `true`, this method releases all resources held by any managed objects that this control references. This method invokes the `Dispose()` method of each referenced object. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/MaskedTextBoxArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/MaskedTextBoxArray.xml index 043770228e4..33ccdb634ad 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/MaskedTextBoxArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/MaskedTextBoxArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -841,7 +841,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -851,7 +851,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -963,7 +963,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1139,7 +1139,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1413,7 +1413,7 @@ MsgBox(CStr(MaskedTextBoxArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1448,7 +1448,7 @@ MsgBox(CStr(MaskedTextBoxArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1458,7 +1458,7 @@ MsgBox(CStr(MaskedTextBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1569,7 +1569,7 @@ MsgBox(CStr(MaskedTextBoxArray(1).Text)) property is changed by either a programmatic modification or user interaction. This event is also raised if the is indirectly changed by a member such as , , , and . + This event is raised if the property is changed by either a programmatic modification or user interaction. This event is also raised if the is indirectly changed by a member such as , , , and . For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1891,7 +1891,7 @@ MsgBox(CStr(MaskedTextBoxArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2317,7 +2317,7 @@ MsgBox(CStr(MaskedTextBoxArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2399,7 +2399,7 @@ MsgBox(CStr(MaskedTextBoxArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should be called only when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2750,7 +2750,7 @@ MsgBox(CStr(MaskedTextBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2764,7 +2764,7 @@ MsgBox(CStr(MaskedTextBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2815,7 +2815,7 @@ MsgBox(CStr(MaskedTextBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2829,7 +2829,7 @@ MsgBox(CStr(MaskedTextBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/MenuItemArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/MenuItemArray.xml index ad6bab9a3e8..42ef3f73bf8 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/MenuItemArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/MenuItemArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -265,7 +265,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -337,7 +337,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -564,7 +564,7 @@ MsgBox(CStr(MenuItemArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/OpenFileDialogArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/OpenFileDialogArray.xml index 4bfc2e845cd..229bf65329e 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/OpenFileDialogArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/OpenFileDialogArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate an , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate an , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -227,7 +227,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -331,7 +331,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -456,7 +456,7 @@ MsgBox(CStr(OpenFileDialogArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/PanelArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/PanelArray.xml index a8ecee0a2be..c9d3ce7721a 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/PanelArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/PanelArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -909,7 +909,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -919,7 +919,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -1031,7 +1031,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1173,7 +1173,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1280,7 +1280,7 @@ MsgBox(CStr(PanelArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1315,7 +1315,7 @@ MsgBox(CStr(PanelArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1325,7 +1325,7 @@ MsgBox(CStr(PanelArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1655,7 +1655,7 @@ MsgBox(CStr(PanelArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2116,7 +2116,7 @@ MsgBox(CStr(PanelArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2230,7 +2230,7 @@ MsgBox(CStr(PanelArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should be called only when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2478,7 +2478,7 @@ MsgBox(CStr(PanelArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2492,7 +2492,7 @@ MsgBox(CStr(PanelArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2543,7 +2543,7 @@ MsgBox(CStr(PanelArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2557,7 +2557,7 @@ MsgBox(CStr(PanelArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/PictureBoxArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/PictureBoxArray.xml index df8580cf465..ead2fac3bb4 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/PictureBoxArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/PictureBoxArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -843,7 +843,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -985,7 +985,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1058,7 +1058,7 @@ MsgBox(CStr(PictureBoxArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1093,7 +1093,7 @@ MsgBox(CStr(PictureBoxArray(1).Text)) methods, and is false. If the image-load is canceled by calling the method the property of the will be set to true. If an exception or error occurs during the load process, it will be caught and the `Error` property of the will contain the exception information. + The `LoadCompleted` event occurs only when the image is loaded asynchronously by using one of the methods, and is false. If the image-load is canceled by calling the method the property of the will be set to true. If an exception or error occurs during the load process, it will be caught and the `Error` property of the will contain the exception information. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1127,7 +1127,7 @@ MsgBox(CStr(PictureBoxArray(1).Text)) methods. The progress percentage of the image load is reported with the property of the . + The `LoadProgressChanged` event occurs only when the image is loaded asynchronously by using one of the methods. The progress percentage of the image load is reported with the property of the . Handle the `LoadProgressChanged` event if you want to reflect the progress of an asynchronous image-loading operation in a or similar control. Use the property of the to update the progress value. @@ -1450,7 +1450,7 @@ MsgBox(CStr(PictureBoxArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -1911,7 +1911,7 @@ MsgBox(CStr(PictureBoxArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -1959,7 +1959,7 @@ MsgBox(CStr(PictureBoxArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2173,7 +2173,7 @@ MsgBox(CStr(PictureBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2187,7 +2187,7 @@ MsgBox(CStr(PictureBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2238,7 +2238,7 @@ MsgBox(CStr(PictureBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2252,7 +2252,7 @@ MsgBox(CStr(PictureBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/PrintDialogArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/PrintDialogArray.xml index a0692ef1f5a..67beba3212c 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/PrintDialogArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/PrintDialogArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -195,7 +195,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -302,7 +302,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -427,7 +427,7 @@ MsgBox(CStr(PrintDialogArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ProgressBarArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ProgressBarArray.xml index 4d3059b7c8e..8f3ac2350a0 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ProgressBarArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ProgressBarArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -777,7 +777,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -919,7 +919,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -992,7 +992,7 @@ MsgBox(CStr(ProgressBarArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1266,7 +1266,7 @@ MsgBox(CStr(ProgressBarArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -1692,7 +1692,7 @@ MsgBox(CStr(ProgressBarArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -1808,7 +1808,7 @@ MsgBox(CStr(ProgressBarArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2022,7 +2022,7 @@ MsgBox(CStr(ProgressBarArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2036,7 +2036,7 @@ MsgBox(CStr(ProgressBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2087,7 +2087,7 @@ MsgBox(CStr(ProgressBarArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2101,7 +2101,7 @@ MsgBox(CStr(ProgressBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/RadioButtonArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/RadioButtonArray.xml index 761c11918d5..7d63834dacf 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/RadioButtonArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/RadioButtonArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -945,7 +945,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -955,7 +955,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -1067,7 +1067,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1209,7 +1209,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1415,7 +1415,7 @@ MsgBox(CStr(RadioButtonArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1450,7 +1450,7 @@ MsgBox(CStr(RadioButtonArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1460,7 +1460,7 @@ MsgBox(CStr(RadioButtonArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1744,7 +1744,7 @@ MsgBox(CStr(RadioButtonArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2205,7 +2205,7 @@ MsgBox(CStr(RadioButtonArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2287,7 +2287,7 @@ MsgBox(CStr(RadioButtonArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2569,7 +2569,7 @@ MsgBox(CStr(RadioButtonArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2583,7 +2583,7 @@ MsgBox(CStr(RadioButtonArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2634,7 +2634,7 @@ MsgBox(CStr(RadioButtonArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2648,7 +2648,7 @@ MsgBox(CStr(RadioButtonArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/RichTextBoxArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/RichTextBoxArray.xml index 28d605bdce6..90a8d2c3dc7 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/RichTextBoxArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/RichTextBoxArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -871,7 +871,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1012,7 +1012,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1316,7 +1316,7 @@ MsgBox(CStr(RichTextBoxArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1351,7 +1351,7 @@ MsgBox(CStr(RichTextBoxArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1361,7 +1361,7 @@ MsgBox(CStr(RichTextBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1775,7 +1775,7 @@ MsgBox(CStr(RichTextBoxArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2236,7 +2236,7 @@ MsgBox(CStr(RichTextBoxArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2352,7 +2352,7 @@ MsgBox(CStr(RichTextBoxArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2634,7 +2634,7 @@ MsgBox(CStr(RichTextBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2648,7 +2648,7 @@ MsgBox(CStr(RichTextBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2699,7 +2699,7 @@ MsgBox(CStr(RichTextBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2713,7 +2713,7 @@ MsgBox(CStr(RichTextBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/SaveFileDialogArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/SaveFileDialogArray.xml index c33466d49b1..aa0214c37b9 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/SaveFileDialogArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/SaveFileDialogArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -227,7 +227,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -331,7 +331,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -456,7 +456,7 @@ MsgBox(CStr(SaveFileDialogArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/StatusBarArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/StatusBarArray.xml index 8081dc20aae..b2cd6b7431f 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/StatusBarArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/StatusBarArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -880,7 +880,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1021,7 +1021,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1227,7 +1227,7 @@ MsgBox(CStr(StatusBarArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1262,7 +1262,7 @@ MsgBox(CStr(StatusBarArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1272,7 +1272,7 @@ MsgBox(CStr(StatusBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1618,7 +1618,7 @@ MsgBox(CStr(StatusBarArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2079,7 +2079,7 @@ MsgBox(CStr(StatusBarArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2161,7 +2161,7 @@ MsgBox(CStr(StatusBarArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2443,7 +2443,7 @@ MsgBox(CStr(StatusBarArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2457,7 +2457,7 @@ MsgBox(CStr(StatusBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2508,7 +2508,7 @@ MsgBox(CStr(StatusBarArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2522,7 +2522,7 @@ MsgBox(CStr(StatusBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/StatusStripArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/StatusStripArray.xml index 90d6251cca9..71cde668e58 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/StatusStripArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/StatusStripArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -909,7 +909,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1050,7 +1050,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1386,7 +1386,7 @@ MsgBox(CStr(StatusStripArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1488,7 +1488,7 @@ MsgBox(CStr(StatusStripArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1498,7 +1498,7 @@ MsgBox(CStr(StatusStripArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1844,7 +1844,7 @@ MsgBox(CStr(StatusStripArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2303,7 +2303,7 @@ MsgBox(CStr(StatusStripArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2417,7 +2417,7 @@ MsgBox(CStr(StatusStripArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2699,7 +2699,7 @@ MsgBox(CStr(StatusStripArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2713,7 +2713,7 @@ MsgBox(CStr(StatusStripArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2764,7 +2764,7 @@ MsgBox(CStr(StatusStripArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2778,7 +2778,7 @@ MsgBox(CStr(StatusStripArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/Support.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/Support.xml index f2d24765d6f..49919a4bb58 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/Support.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/Support.xml @@ -75,7 +75,7 @@ ## Remarks The Visual Basic 6.0 `Variant` data type is no longer supported in Visual Basic. The `CopyArray` function is used by the upgrade tools to copy an `Array` to or from a `Variant` array. - To copy an array in Visual Basic, use the , or methods of the class. + To copy an array in Visual Basic, use the , or methods of the class. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -118,7 +118,7 @@ ## Remarks In Visual Basic 6.0, the `MouseIcon` property of a form or control could be used to load a custom `MousePointer` (cursor). In some cases, the image for the `MouseIcon` was stored as a `stdOle.IPicture`; this function is used by the upgrade tool to convert a to a `stdOle.IPicture`. - To convert a in Visual Basic, use the method of the class. + To convert a in Visual Basic, use the method of the class. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -598,7 +598,7 @@ is a property of the object. This function is used by the upgrade tools to convert a Visual Basic 6.0 `Font` to a . + In Visual Basic 6.0, the name of a font was specified by the `Font` property; in Visual Basic, is a property of the object. This function is used by the upgrade tools to convert a Visual Basic 6.0 `Font` to a . [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -641,7 +641,7 @@ is a property of the object. This function is used by the upgrade tools to convert a Visual Basic 6.0 `Font` to a . + In Visual Basic 6.0, the size of a font was specified by the `FontSize` property; in Visual Basic, is a property of the object. This function is used by the upgrade tools to convert a Visual Basic 6.0 `Font` to a . [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -1132,7 +1132,7 @@ in Visual Basic. + This function is used by the upgrade tools to replace the Visual Basic 6.0 `Screen.ActiveControl` property. It is the equivalent of calling in Visual Basic. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -1290,7 +1290,7 @@ . + This function is the equivalent of calling . [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -1333,7 +1333,7 @@ methods can be used to emulate the behavior of `ItemData`. + In Visual Basic 6.0, the `ItemData` property for a `ListBox` or `ComboBox` control could be set at design time in the **Properties** window to associate an `Integer` with a `ListBox` or `ComboBox` item. In Visual Basic, the `ItemData` property no longer exists; the `GetItemData` and methods can be used to emulate the behavior of `ItemData`. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -1376,7 +1376,7 @@ or property instead. + This function is used by the upgrade tools to emulate the Visual Basic 6.0 `List` property. In Visual Basic, use the or property instead. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -2421,7 +2421,7 @@ control no longer has `Default` or `Cancel` properties. The object has and properties that provide the same functionality; these properties take the name of a control as an argument. + In Visual Basic 6.0, the Boolean `Default` and `Cancel` properties of a `CommandButton` control determine whether the control responds to the ENTER or ESC keys, respectively. In Visual Basic, the control no longer has `Default` or `Cancel` properties. The object has and properties that provide the same functionality; these properties take the name of a control as an argument. This function is used by the upgrade tools to set the property of a based on the `Cancel` property of an upgraded Visual Basic 6.0 `CommandButton` control. @@ -2466,7 +2466,7 @@ control no longer has `Default` or `Cancel` properties. The object has and properties that provide the same functionality; these properties take the name of a control as an argument. + In Visual Basic 6.0, the Boolean `Default` and `Cancel` properties of a `CommandButton` control determine whether the control responds to the ENTER or ESC keys, respectively. In Visual Basic, the control no longer has `Default` or `Cancel` properties. The object has and properties that provide the same functionality; these properties take the name of a control as an argument. This function is used by the upgrade tools to set the property of a based on the `Default` property of an upgraded Visual Basic 6.0 `CommandButton` control. @@ -2512,7 +2512,7 @@ and `SetItemData` methods can be used to emulate the behavior of `ItemData`. + In Visual Basic 6.0, the `ItemData` property for a `ListBox` or `ComboBox` control could be set at design time in the **Properties** window to associate an `Integer` with a `ListBox` or `ComboBox` item. In Visual Basic, the `ItemData` property no longer exists; the and `SetItemData` methods can be used to emulate the behavior of `ItemData`. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -2556,7 +2556,7 @@ or property instead. + This function is used by the upgrade tools to emulate the Visual Basic 6.0 `List` property. In Visual Basic, use the or property instead. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -2690,7 +2690,7 @@ and methods. This function is used by the upgrade tools to map the Visual Basic 6.0 `Show` method to either the or method. + In Visual Basic 6.0, the `Show` method specified whether a Form would be displayed modally; in Visual Basic it is replaced by the and methods. This function is used by the upgrade tools to map the Visual Basic 6.0 `Show` method to either the or method. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] @@ -3206,7 +3206,7 @@ method, which returns `true` or `false`. + In Visual Basic 6.0, the `ValidateControls` method was used to force the `Validate` event for the control that has focus when a form is closed; if the `Validate` event fails, an error was raised. In Visual Basic, the `ValidateControls` method is replaced by the method, which returns `true` or `false`. This function is used by the upgrade tools to emulate the Visual Basic 6.0 behavior. @@ -3290,7 +3290,7 @@ and methods. This function is used by the upgrade tools to map between the methods. + In Visual Basic 6.0, the `ZOrder` method was used to specify the layering of controls; in Visual Basic .it is replaced by the and methods. This function is used by the upgrade tools to map between the methods. [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/TabControlArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/TabControlArray.xml index 1932d30c87a..afc78903182 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/TabControlArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/TabControlArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -551,7 +551,7 @@ These events let you perform tasks such as canceling a tab change if a is in an invalid state or updating the state of a newly displayed . - The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. + The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -597,7 +597,7 @@ These events let you perform tasks such as canceling a tab change if a is in an invalid state or updating the state of a newly displayed . - The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. + The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -973,7 +973,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1114,7 +1114,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1354,7 +1354,7 @@ MsgBox(CStr(TabControlArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1389,7 +1389,7 @@ MsgBox(CStr(TabControlArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1399,7 +1399,7 @@ MsgBox(CStr(TabControlArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1745,7 +1745,7 @@ MsgBox(CStr(TabControlArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2171,7 +2171,7 @@ MsgBox(CStr(TabControlArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2288,7 +2288,7 @@ MsgBox(CStr(TabControlArray(1).Text)) These events let you perform tasks such as canceling a tab change if a is in an invalid state or updating the state of a newly displayed . - The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. + The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -2368,7 +2368,7 @@ MsgBox(CStr(TabControlArray(1).Text)) These events let you perform tasks such as canceling a tab change if a is in an invalid state or updating the state of a newly displayed . - The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. + The current tab changes when the user clicks a tab, when you call the or method, or when you change the value of the or property. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -2413,7 +2413,7 @@ MsgBox(CStr(TabControlArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2661,7 +2661,7 @@ MsgBox(CStr(TabControlArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2675,7 +2675,7 @@ MsgBox(CStr(TabControlArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2726,7 +2726,7 @@ MsgBox(CStr(TabControlArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2740,7 +2740,7 @@ MsgBox(CStr(TabControlArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/TextBoxArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/TextBoxArray.xml index b77b1267346..474762b7f82 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/TextBoxArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/TextBoxArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1017,7 +1017,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1192,7 +1192,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1432,7 +1432,7 @@ MsgBox(CStr(TextBoxArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1467,7 +1467,7 @@ MsgBox(CStr(TextBoxArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1477,7 +1477,7 @@ MsgBox(CStr(TextBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1857,7 +1857,7 @@ MsgBox(CStr(TextBoxArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2317,7 +2317,7 @@ MsgBox(CStr(TextBoxArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2399,7 +2399,7 @@ MsgBox(CStr(TextBoxArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2715,7 +2715,7 @@ MsgBox(CStr(TextBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2729,7 +2729,7 @@ MsgBox(CStr(TextBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2780,7 +2780,7 @@ MsgBox(CStr(TextBoxArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2794,7 +2794,7 @@ MsgBox(CStr(TextBoxArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/TimerArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/TimerArray.xml index 20c2eb1ad5d..210ac1c50ac 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/TimerArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/TimerArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -195,7 +195,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -267,7 +267,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -392,7 +392,7 @@ MsgBox(CStr(TimerArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ToolBarArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ToolBarArray.xml index 3118bd27043..d8ae7c84290 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ToolBarArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ToolBarArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -943,7 +943,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1084,7 +1084,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1290,7 +1290,7 @@ MsgBox(CStr(ToolBarArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1325,7 +1325,7 @@ MsgBox(CStr(ToolBarArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1335,7 +1335,7 @@ MsgBox(CStr(ToolBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1681,7 +1681,7 @@ MsgBox(CStr(ToolBarArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2107,7 +2107,7 @@ MsgBox(CStr(ToolBarArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2155,7 +2155,7 @@ MsgBox(CStr(ToolBarArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2403,7 +2403,7 @@ MsgBox(CStr(ToolBarArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2417,7 +2417,7 @@ MsgBox(CStr(ToolBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2468,7 +2468,7 @@ MsgBox(CStr(ToolBarArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2482,7 +2482,7 @@ MsgBox(CStr(ToolBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ToolStripArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ToolStripArray.xml index 48b2c387a16..b160acf3214 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ToolStripArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ToolStripArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -909,7 +909,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1050,7 +1050,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1386,7 +1386,7 @@ MsgBox(CStr(ToolStripArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1488,7 +1488,7 @@ MsgBox(CStr(ToolStripArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1498,7 +1498,7 @@ MsgBox(CStr(ToolStripArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1844,7 +1844,7 @@ MsgBox(CStr(ToolStripArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2338,7 +2338,7 @@ MsgBox(CStr(ToolStripArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2452,7 +2452,7 @@ MsgBox(CStr(ToolStripArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2734,7 +2734,7 @@ MsgBox(CStr(ToolStripArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2748,7 +2748,7 @@ MsgBox(CStr(ToolStripArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2799,7 +2799,7 @@ MsgBox(CStr(ToolStripArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2813,7 +2813,7 @@ MsgBox(CStr(ToolStripArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ToolStripMenuItemArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ToolStripMenuItemArray.xml index bad2bddf1ec..e065cbf2f5d 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ToolStripMenuItemArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ToolStripMenuItemArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -395,7 +395,7 @@ from changes you made in response to the event. + Use the `DropDownClosed` event to restore the state of the from changes you made in response to the event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -595,7 +595,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -667,7 +667,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -866,7 +866,7 @@ MsgBox(CStr(ToolStripMenuItemArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -1233,7 +1233,7 @@ MsgBox(CStr(ToolStripMenuItemArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/TreeViewArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/TreeViewArray.xml index d8f4430aca3..644fcf91424 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/TreeViewArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/TreeViewArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1270,7 +1270,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1411,7 +1411,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1683,7 +1683,7 @@ MsgBox(CStr(TreeViewArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1718,7 +1718,7 @@ MsgBox(CStr(TreeViewArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1728,7 +1728,7 @@ MsgBox(CStr(TreeViewArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2074,7 +2074,7 @@ MsgBox(CStr(TreeViewArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -2602,7 +2602,7 @@ MsgBox(CStr(TreeViewArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -2718,7 +2718,7 @@ MsgBox(CStr(TreeViewArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2966,7 +2966,7 @@ MsgBox(CStr(TreeViewArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2980,7 +2980,7 @@ MsgBox(CStr(TreeViewArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -3031,7 +3031,7 @@ MsgBox(CStr(TreeViewArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -3045,7 +3045,7 @@ MsgBox(CStr(TreeViewArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/VScrollBarArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/VScrollBarArray.xml index e0d63a5dae7..9f0a43cfb47 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/VScrollBarArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/VScrollBarArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -705,7 +705,7 @@ or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: `Enter` @@ -715,7 +715,7 @@ - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: `Enter` @@ -759,7 +759,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1112,7 +1112,7 @@ MsgBox(CStr(VScrollBarArray(1).Text)) and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. + The `Layout` event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. The layout event can be suppressed by using the and methods. Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. For example, if you resize and move a control, each operation would raise a `Layout` event. For more information about how to handle events, see [Handling and Raising Events](/dotnet/standard/events/). @@ -1147,7 +1147,7 @@ MsgBox(CStr(VScrollBarArray(1).Text)) or method, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), or by calling the or method, focus events occur in the following order: @@ -1157,7 +1157,7 @@ MsgBox(CStr(VScrollBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1348,7 +1348,7 @@ MsgBox(CStr(VScrollBarArray(1).Text)) ## Remarks A typical use of `MouseHover` is to display a tool tip when the mouse pauses on a control within a specified area around the control (the "hover rectangle"). The pause required for this event to be raised is specified in milliseconds by the property. - The `MouseHover` event is defined and detected in connection with the and properties. + The `MouseHover` event is defined and detected in connection with the and properties. Mouse events occur in the following order: @@ -1686,7 +1686,7 @@ MsgBox(CStr(VScrollBarArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -1766,7 +1766,7 @@ MsgBox(CStr(VScrollBarArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -2014,7 +2014,7 @@ MsgBox(CStr(VScrollBarArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2028,7 +2028,7 @@ MsgBox(CStr(VScrollBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -2079,7 +2079,7 @@ MsgBox(CStr(VScrollBarArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -2093,7 +2093,7 @@ MsgBox(CStr(VScrollBarArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/WebBrowserArray.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/WebBrowserArray.xml index 1c6ff4d42f3..2167c7ca52f 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/WebBrowserArray.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/WebBrowserArray.xml @@ -77,7 +77,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -115,7 +115,7 @@ , you must also call the method to create the initial element in the array. + When you instantiate a , you must also call the method to create the initial element in the array. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -435,23 +435,23 @@ ## Remarks The control navigates to a new document whenever one of the following properties is set or methods is called: -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- - Handle the `DocumentCompleted` event to receive notification when the new document finishes loading. When the `DocumentCompleted` event occurs, the new document is fully loaded, which means you can access its contents through the , , or property. + Handle the `DocumentCompleted` event to receive notification when the new document finishes loading. When the `DocumentCompleted` event occurs, the new document is fully loaded, which means you can access its contents through the , , or property. To receive notification before navigation starts, handle the event. Handling this event lets you cancel navigation if certain conditions have not been met, for example, when the user has not completely filled out a form. Handle the event to receive notification when the control finishes navigation and has begun loading the document at the new location. @@ -521,7 +521,7 @@ method instead. + This method cannot be called from your application's code. Use the method instead. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -593,7 +593,7 @@ method. + This method cannot be called from your application's code. Use `AddHandler` to hook up events for any controls that are added by using the method. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -769,23 +769,23 @@ MsgBox(CStr(WebBrowserArray(1).Text)) ## Remarks The control navigates to a new document whenever one of the following properties is set or methods is called: -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- - Handle the `Navigated` event to receive notification when the control has navigated to a new document. When the `Navigated` event occurs, the new document has begun loading, which means you can access the loaded content through the , , and properties. Handle the event to receive notification when the control finishes loading the new document. + Handle the `Navigated` event to receive notification when the control has navigated to a new document. When the `Navigated` event occurs, the new document has begun loading, which means you can access the loaded content through the , , and properties. Handle the event to receive notification when the control finishes loading the new document. You can also receive notification before navigation starts by handling the event. Handling this event lets you cancel navigation if certain conditions have not been met, for example, the user has not filled out a form. @@ -823,21 +823,21 @@ MsgBox(CStr(WebBrowserArray(1).Text)) ## Remarks The control navigates to a new document whenever one of the following properties is set or methods is called: -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- You can handle the `Navigating` event to cancel navigation if certain conditions have not been met, for example, when the user has not completely filled out a form. To cancel navigation, set the `Cancel` property of the object passed to the event handler to `true`. You can also use this object to retrieve the URL of the new document through the property. If the new document will be displayed in a Web page frame, you can retrieve the name of the frame through the property. @@ -875,7 +875,7 @@ MsgBox(CStr(WebBrowserArray(1).Text)) control opens a separate browser window when the appropriate overload of the method is called or when the user clicks **Open in New Window** on the browser shortcut menu when the mouse pointer hovers over a hyperlink. You can disable the shortcut menu by setting the property to `false`. + The control opens a separate browser window when the appropriate overload of the method is called or when the user clicks **Open in New Window** on the browser shortcut menu when the mouse pointer hovers over a hyperlink. You can disable the shortcut menu by setting the property to `false`. The `NewWindow` event occurs before the new browser window is opened. You can handle this event, for example, to prevent the window from opening when certain conditions have not been met. @@ -1054,7 +1054,7 @@ MsgBox(CStr(WebBrowserArray(1).Text)) of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). + To determine the of the resized control, you can cast the `sender` parameter of the data to a and get its property (or and properties individually). To handle custom layouts, use the event instead of the `Resize` event. The event is raised in response to a `Resize` event, but also in response to other changes that affect the layout of the control. @@ -1102,7 +1102,7 @@ MsgBox(CStr(WebBrowserArray(1).Text)) method and specify the `Index`. + The `SetIndex` method should only be called when you are creating the initial element in the control array. To add subsequent elements, call the method and specify the `Index`. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. @@ -1246,7 +1246,7 @@ MsgBox(CStr(WebBrowserArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -1260,7 +1260,7 @@ MsgBox(CStr(WebBrowserArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: @@ -1311,7 +1311,7 @@ MsgBox(CStr(WebBrowserArray(1).Text)) or methods, or by setting the property to the current form, focus events occur in the following order: + When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the or methods, or by setting the property to the current form, focus events occur in the following order: @@ -1325,7 +1325,7 @@ MsgBox(CStr(WebBrowserArray(1).Text)) - When you change the focus by using the mouse or by calling the method, focus events occur in the following order: + When you change the focus by using the mouse or by calling the method, focus events occur in the following order: diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/WebClass.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/WebClass.xml index 59ce7d9405a..144687ffa1a 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/WebClass.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/WebClass.xml @@ -23,15 +23,15 @@ Enables upgraded Visual Basic 6.0 projects to run in ASP.NET. - objects for each `WebItem` and `Template` associated with the Visual Basic 6.0 `WebClass` project. Finally, in the `Page_Load` event procedure, you will see a call to the `WebClass` Compatibility runtime: . This enables the runtime to render the specified in the Request URL. This code is the only new code added to your upgraded project and serves only to emulate the underlying behavior of the Visual Basic 6.0 `WebClass` runtime. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + objects for each `WebItem` and `Template` associated with the Visual Basic 6.0 `WebClass` project. Finally, in the `Page_Load` event procedure, you will see a call to the `WebClass` Compatibility runtime: . This enables the runtime to render the specified in the Request URL. This code is the only new code added to your upgraded project and serves only to emulate the underlying behavior of the Visual Basic 6.0 `WebClass` runtime. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -60,13 +60,13 @@ A that contains the property for the Visual Basic 6.0 object. Initializes a new instance of the class. - class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -97,15 +97,15 @@ Gets the name that is used in code to identify a object. A that contains the name for the object. - class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -136,15 +136,15 @@ Gets or sets another object in the current object. A object. - to another during a single request. - - The class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + to another during a single request. + + The class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -172,13 +172,13 @@ An object. Renders a in a . - class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -213,13 +213,13 @@ Gets or sets a parameter that is appended to the end of any URL that is generated by using the method. A that contains the parameter that will be appended. - class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -258,13 +258,13 @@ Specifies the URL that the system must have to reference a in the browser. A that contains the URL. - class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -294,13 +294,13 @@ Specifies the URL that the system must have to reference a in the browser. A that contains the URL. - class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web-site project. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/WebItem.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/WebItem.xml index 55f943088d8..55697e37f7f 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/WebItem.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/WebItem.xml @@ -23,15 +23,15 @@ Enables upgraded Visual Basic 6.0 projects to run in ASP.NET. - object and then `WebItem` objects for each of the `WebItems` and `Templates` associated with the Visual Basic 6.0 `WebClass` project. Finally, in the `Page_Load` event procedure, you will see a call to the `WebClass` Compatibility runtime: . This enables the runtime to render the specified in the Request URL. This code is the only new code added to your upgraded project and only serves to emulate the underlying behavior of the Visual Basic 6.0 `WebClass` runtime. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + object and then `WebItem` objects for each of the `WebItems` and `Templates` associated with the Visual Basic 6.0 `WebClass` project. Finally, in the `Page_Load` event procedure, you will see a call to the `WebClass` Compatibility runtime: . This enables the runtime to render the specified in the Request URL. This code is the only new code added to your upgraded project and only serves to emulate the underlying behavior of the Visual Basic 6.0 `WebClass` runtime. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -59,13 +59,13 @@ Optional. The file name of a Visual Basic 6.0 that was associated with the Visual Basic 6.0 . Initializes a new instance of the class. - class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web site project. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web site project. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -96,15 +96,15 @@ Gets the name that is used in code to identify a object. A that contains the name for the object. - class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web site project. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web site project. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -140,13 +140,13 @@ if the text should be rescanned; otherwise . The default is . - class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web site project. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web site project. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -181,13 +181,13 @@ Gets or sets the string that is used to prefix replacement tag names in an HTML template. A that identifies the sequence used to recognize replacement tags in an HTML template. - class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web site project. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web site project. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> @@ -216,13 +216,13 @@ Optional. The file name of a Visual Basic 6.0 that was associated with the Visual Basic 6.0 . Processes an HTML template attached to a object and returns it to the browser. - class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web site project. - - [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] - + class is used by the upgrade tools to upgrade a Visual Basic 6.0 `WebClass` project to an ASP.NET Web site project. + + [!INCLUDE[Note_compatibility](~/includes/note-compatibility-md.md)] + ]]> diff --git a/xml/Microsoft.VisualBasic.Compatibility.VB6/ZOrderConstants.xml b/xml/Microsoft.VisualBasic.Compatibility.VB6/ZOrderConstants.xml index 09f40344d94..77b91d52162 100644 --- a/xml/Microsoft.VisualBasic.Compatibility.VB6/ZOrderConstants.xml +++ b/xml/Microsoft.VisualBasic.Compatibility.VB6/ZOrderConstants.xml @@ -25,7 +25,7 @@ and functions. These constants enable code that has been upgraded from Visual Basic 6.0 to continue to run without additional modification. + In Visual Basic, the Visual Basic `ZOrder` method is replaced by the and functions. These constants enable code that has been upgraded from Visual Basic 6.0 to continue to run without additional modification. > [!NOTE] > Functions and objects in the namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation. diff --git a/xml/Microsoft.VisualBasic.CompilerServices/NewLateBinding.xml b/xml/Microsoft.VisualBasic.CompilerServices/NewLateBinding.xml index 43f9147b7af..0cf848e5295 100644 --- a/xml/Microsoft.VisualBasic.CompilerServices/NewLateBinding.xml +++ b/xml/Microsoft.VisualBasic.CompilerServices/NewLateBinding.xml @@ -115,11 +115,11 @@ Executes a late-bound method or function call. This helper method is not meant to be called directly from your code. An instance of the call object. - . - + . + ]]> @@ -680,11 +680,11 @@ Executes a late-bound method or function call. This helper method is not meant to be called directly from your code. An instance of the call object. - . - + . + ]]> @@ -1276,11 +1276,11 @@ An enumeration member of type representing the type of procedure being called. The value of CallType can be , , or . Only is used. Executes a late-bound property set or field write call. This helper method is not meant to be called directly from your code. - . - + . + ]]> @@ -1360,11 +1360,11 @@ A value that specifies when the base reference of the late reference is an . Set to when the base reference of the late reference is an ; this allows you to generate a run-time exception for late assignments to fields of of value types. Otherwise, set to . Executes a late-bound property set or field write call. This helper method is not meant to be called directly from your code. - except that this method is use with complex expressions (for example, expressions in parentheses). - + except that this method is use with complex expressions (for example, expressions in parentheses). + ]]> diff --git a/xml/Microsoft.VisualBasic.CompilerServices/Operators.xml b/xml/Microsoft.VisualBasic.CompilerServices/Operators.xml index e6d5981a118..b38a1d40160 100644 --- a/xml/Microsoft.VisualBasic.CompilerServices/Operators.xml +++ b/xml/Microsoft.VisualBasic.CompilerServices/Operators.xml @@ -39,11 +39,11 @@ Provides late-bound math operators, such as and , which the Visual Basic compiler uses internally. - @@ -96,11 +96,11 @@ Represents the Visual Basic addition (+) operator. The sum of and . - @@ -153,11 +153,11 @@ Represents the Visual Basic operator. For operations, if both and evaluate to ; otherwise, . For bitwise operations, 1 if both and evaluate to 1; otherwise, 0. - @@ -196,48 +196,48 @@ - Value - + Value + - Condition - + Condition + - -1 - + -1 + - is less than . - + is less than . + - 0 - + 0 + - and are equal. - + and are equal. + - 1 - + 1 + - is greater than . - + is greater than . + - @@ -293,11 +293,11 @@ if and are equal; otherwise, . - @@ -353,11 +353,11 @@ if is greater than ; otherwise, . - @@ -413,11 +413,11 @@ if is greater than or equal to ; otherwise, . - @@ -473,11 +473,11 @@ if is less than ; otherwise, . - @@ -533,11 +533,11 @@ if is less than or equal to ; otherwise, . - @@ -593,11 +593,11 @@ if is not equal to ; otherwise, . - @@ -647,50 +647,50 @@ - Value - + Value + - Condition - + Condition + - -1 - + -1 + - is less than . - + is less than . + - 0 - + 0 + - is equal to . - + is equal to . + - 1 - + 1 + - is greater than . - + is greater than . + - method along with a value of `False` for the `TextCompare` argument. This performs a case-sensitive comparison that is either ordinal or based on the current culture, depending on the value of the [Option Compare](/dotnet/visual-basic/language-reference/statements/option-compare-statement) statement. - + method along with a value of `False` for the `TextCompare` argument. This performs a case-sensitive comparison that is either ordinal or based on the current culture, depending on the value of the [Option Compare](/dotnet/visual-basic/language-reference/statements/option-compare-statement) statement. + ]]> @@ -743,11 +743,11 @@ Represents the Visual Basic concatenation (&) operator. A string representing the concatenation of and . - @@ -802,11 +802,11 @@ Represents the overloaded Visual Basic equals (=) operator. The result of the overloaded equals operator. if operator overloading is not supported. - @@ -861,11 +861,11 @@ Represents the overloaded Visual Basic greater-than (>) operator. The result of the overloaded greater-than operator. if operator overloading is not supported. - @@ -920,11 +920,11 @@ Represents the overloaded Visual Basic greater-than or equal-to (>=) operator. The result of the overloaded greater-than or equal-to operator. if operator overloading is not supported. - @@ -979,11 +979,11 @@ Represents the overloaded Visual Basic less-than (<) operator. The result of the overloaded less-than operator. if operator overloading is not supported. - @@ -1038,11 +1038,11 @@ Represents the overloaded Visual Basic less-than or equal-to (<=) operator. The result of the overloaded less-than or equal-to operator. if operator overloading is not supported. - @@ -1097,11 +1097,11 @@ Represents the overloaded Visual Basic not-equal (<>) operator. The result of the overloaded not-equal operator. if operator overloading is not supported. - @@ -1154,11 +1154,11 @@ Represents the Visual Basic division (/) operator. The full quotient of divided by , including any remainder. - @@ -1211,11 +1211,11 @@ Represents the Visual Basic exponent (^) operator. The result of raised to the power of . - @@ -1334,11 +1334,11 @@ Represents the Visual Basic integer division (\\) operator. The integer quotient of divided by , which discards any remainder and retains only the integer portion. - @@ -1391,11 +1391,11 @@ Represents the Visual Basic arithmetic left shift (<<) operator. An integral numeric value. The result of shifting the bit pattern. The data type is the same as that of . - @@ -1434,11 +1434,11 @@ if the string representation of the value in satisfies the pattern that is contained in ; otherwise, . if both and are . - @@ -1477,11 +1477,11 @@ if the value in satisfies the pattern that is contained in ; otherwise, . if both and are empty. - @@ -1534,11 +1534,11 @@ Represents the Visual Basic operator. The remainder after is divided by . - @@ -1591,11 +1591,11 @@ Represents the Visual Basic multiply (*) operator. The product of and . - @@ -1646,11 +1646,11 @@ Represents the Visual Basic unary minus (-) operator. The negative value of . - @@ -1701,11 +1701,11 @@ Represents the Visual Basic operator. For operations, if is ; otherwise, . For bitwise operations, 1 if is 0; otherwise, 0. - @@ -1758,11 +1758,11 @@ Represents the Visual Basic operator. For operations, if both and evaluate to ; otherwise, . For bitwise operations, 0 if both and evaluate to 0; otherwise, 1. - @@ -1813,11 +1813,11 @@ Represents the Visual Basic unary plus (+) operator. The value of . (The sign of the is unchanged.) - @@ -1870,11 +1870,11 @@ Represents the Visual Basic arithmetic right shift (>>) operator. An integral numeric value. The result of shifting the bit pattern. The data type is the same as that of . - @@ -1927,11 +1927,11 @@ Represents the Visual Basic subtraction (-) operator. The difference between and . - @@ -1984,11 +1984,11 @@ Represents the Visual Basic operator. A or numeric value. For a comparison, the return value is the logical exclusion (exclusive logical disjunction) of two values. For bitwise (numeric) operations, the return value is a numeric value that represents the bitwise exclusion (exclusive bitwise disjunction) of two numeric bit patterns. For more information, see Xor Operator. - diff --git a/xml/Microsoft.VisualBasic.CompilerServices/ProjectData.xml b/xml/Microsoft.VisualBasic.CompilerServices/ProjectData.xml index aef727c0220..addc9873fc0 100644 --- a/xml/Microsoft.VisualBasic.CompilerServices/ProjectData.xml +++ b/xml/Microsoft.VisualBasic.CompilerServices/ProjectData.xml @@ -41,11 +41,11 @@ Provides helpers for the Visual Basic object. - . - + . + ]]> @@ -95,11 +95,11 @@ Performs the work for the method of the object. A helper method. - . - + . + ]]> @@ -143,11 +143,11 @@ Performs the work for the method of the object. A helper method. An object. - . - + . + ]]> @@ -193,11 +193,11 @@ Closes all files for the calling assembly and stops the process. - @@ -235,11 +235,11 @@ The Visual Basic compiler uses this helper method to capture exceptions in the object. - . - + . + ]]> @@ -291,11 +291,11 @@ The object to be caught. The Visual Basic compiler uses this helper method to capture exceptions in the object. - . - + . + ]]> @@ -350,11 +350,11 @@ The line number of the exception. The Visual Basic compiler uses this helper method to capture exceptions in the object. - . - + . + ]]> diff --git a/xml/Microsoft.VisualBasic.CompilerServices/StringType.xml b/xml/Microsoft.VisualBasic.CompilerServices/StringType.xml index 0d56bc0001d..41a325391c3 100644 --- a/xml/Microsoft.VisualBasic.CompilerServices/StringType.xml +++ b/xml/Microsoft.VisualBasic.CompilerServices/StringType.xml @@ -46,11 +46,11 @@ This class has been deprecated as of Visual Basic 2005. - @@ -95,11 +95,11 @@ Returns a value that corresponds to the specified . The value corresponding to . - @@ -144,11 +144,11 @@ Returns a value that corresponds to the specified . The value corresponding to . - @@ -193,11 +193,11 @@ Returns a value that corresponds to the specified . The value corresponding to . - @@ -242,11 +242,11 @@ Returns a value that corresponds to the specified date. The value corresponding to . - @@ -260,11 +260,11 @@ Returns a value that corresponds to a specified and optional number format information. - @@ -314,11 +314,11 @@ Returns a value that corresponds to the specified . The value corresponding to . - @@ -373,11 +373,11 @@ Returns a value that corresponds to a specified and number format information. The value corresponding to . - @@ -391,11 +391,11 @@ Returns a string that corresponds to a specified and optional number format information. - @@ -445,11 +445,11 @@ Returns a string value that corresponds to a specified . The value corresponding to . - @@ -504,11 +504,11 @@ Returns a string that corresponds to a specified and number format information. The string representation of . - @@ -553,11 +553,11 @@ Returns a value that corresponds to a specified . The value corresponding to . - @@ -602,11 +602,11 @@ Returns a value that corresponds to a specified (64-bit integer). The value corresponding to . - @@ -658,11 +658,11 @@ Returns a value that corresponds to the specified object. The value corresponding to . - @@ -707,11 +707,11 @@ Returns a value that corresponds to a specified (16-bit integer). The value corresponding to . - @@ -725,11 +725,11 @@ Returns a string value that corresponds to a specified and optional number format information. - @@ -779,11 +779,11 @@ Returns a string value that corresponds to a specified . The string value corresponding to . - @@ -838,11 +838,11 @@ Returns a string value that corresponds to a specified and number format information. The string value corresponding to . - @@ -900,11 +900,11 @@ Required. String value to overwrite the parameter with. Overwrites the parameter with the contents of the parameter. - @@ -955,47 +955,47 @@ - Value - + Value + - Condition - + Condition + - zero - + zero + - The two strings are equal. - + The two strings are equal. + - less than zero - + less than zero + - is less than . - + is less than . + - greater than zero - + greater than zero + - is greater than . - + is greater than . + - @@ -1045,11 +1045,11 @@ Compares the parameters and and returns the same results as the operator. A value indicating whether or not the string satisfies the pattern. If the value in string satisfies the pattern contained in pattern, result is . If the string does not satisfy the pattern, result is . If both string and pattern are empty strings, the result is . - @@ -1097,13 +1097,13 @@ Compares the parameters and and returns the same results as the operator, using binary comparison. A value indicating whether or not the string satisfies the pattern. If the value in string satisfies the pattern contained in pattern, result is . If the string does not satisfy the pattern, result is . If both string and pattern are empty strings, the result is . - except that it always performs a case-sensitive binary comparison. - + except that it always performs a case-sensitive binary comparison. + ]]> @@ -1151,13 +1151,13 @@ Compares the parameters and and returns the same results as the operator, using text comparison. A value indicating whether or not the string satisfies the pattern. If the value in string satisfies the pattern contained in pattern, result is . If the string does not satisfy the pattern, result is . If both string and pattern are empty strings, the result is . - except that it always performs a comparison based on a case-insensitive text sort order determined by your system's `LocaleID` value. - + except that it always performs a comparison based on a case-insensitive text sort order determined by your system's `LocaleID` value. + ]]> diff --git a/xml/Microsoft.VisualBasic.Devices/Audio.xml b/xml/Microsoft.VisualBasic.Devices/Audio.xml index d009b8307e0..6210730eb32 100644 --- a/xml/Microsoft.VisualBasic.Devices/Audio.xml +++ b/xml/Microsoft.VisualBasic.Devices/Audio.xml @@ -31,38 +31,38 @@ Provides methods for playing sounds. - @@ -105,11 +105,11 @@ Initializes a new instance of the class. - @@ -162,48 +162,48 @@ A containing the name of the sound file. Plays a .wav sound file. - method is called. The calling code continues to execute.| -|`AudioPlayMode.WaitToComplete`|Plays the sound and waits until it completes before the calling code continues.| - - Background playing lets the application execute other code while the sound plays. - - For more information, see [Playing Sounds](/dotnet/visual-basic/developing-apps/programming/computer-resources/playing-sounds). - -## Availability by Project Type - -|Project type|Available| -|-|-| -|Windows Application|**Yes**| -|Class Library|**Yes**| -|Console Application|**Yes**| -|Windows Control Library|**Yes**| -|Web Control Library|No| -|Windows Service|**Yes**| -|Web Site|No| - - - -## Examples - The `My.Computer.Audio.Play` method plays the specified sound in the background when `PlayMode.Background` is specified. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class1.vb" id="Snippet15"::: - - This code example can only run within a Windows Forms application. - - The file name should reference a .wav sound file on your system. - - To simplify the management of your sound files, consider storing the files as application resources. They can then be accessed through the `My.Resources` object. - + method is called. The calling code continues to execute.| +|`AudioPlayMode.WaitToComplete`|Plays the sound and waits until it completes before the calling code continues.| + + Background playing lets the application execute other code while the sound plays. + + For more information, see [Playing Sounds](/dotnet/visual-basic/developing-apps/programming/computer-resources/playing-sounds). + +## Availability by Project Type + +|Project type|Available| +|-|-| +|Windows Application|**Yes**| +|Class Library|**Yes**| +|Console Application|**Yes**| +|Windows Control Library|**Yes**| +|Web Control Library|No| +|Windows Service|**Yes**| +|Web Site|No| + + + +## Examples + The `My.Computer.Audio.Play` method plays the specified sound in the background when `PlayMode.Background` is specified. + + :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class1.vb" id="Snippet15"::: + + This code example can only run within a Windows Forms application. + + The file name should reference a .wav sound file on your system. + + To simplify the management of your sound files, consider storing the files as application resources. They can then be accessed through the `My.Resources` object. + ]]> @@ -255,48 +255,48 @@ mode for playing the sound. By default, . Plays a .wav sound file. - method is called. The calling code continues to execute.| -|`AudioPlayMode.WaitToComplete`|Plays the sound and waits until it completes before the calling code continues.| - - Background playing lets the application execute other code while the sound plays. - - For more information, see [Playing Sounds](/dotnet/visual-basic/developing-apps/programming/computer-resources/playing-sounds). - -## Availability by Project Type - -|Project type|Available| -|-|-| -|Windows Application|**Yes**| -|Class Library|**Yes**| -|Console Application|**Yes**| -|Windows Control Library|**Yes**| -|Web Control Library|No| -|Windows Service|**Yes**| -|Web Site|No| - - - -## Examples - The `My.Computer.Audio.Play` method plays the specified sound in the background when `PlayMode.Background` is specified. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class1.vb" id="Snippet15"::: - - This code example can only run within a Windows Forms application. - - The file name should reference a .wav sound file on your system. - - To simplify the management of your sound files, consider storing the files as application resources. They can then be accessed through the `My.Resources` object. - + method is called. The calling code continues to execute.| +|`AudioPlayMode.WaitToComplete`|Plays the sound and waits until it completes before the calling code continues.| + + Background playing lets the application execute other code while the sound plays. + + For more information, see [Playing Sounds](/dotnet/visual-basic/developing-apps/programming/computer-resources/playing-sounds). + +## Availability by Project Type + +|Project type|Available| +|-|-| +|Windows Application|**Yes**| +|Class Library|**Yes**| +|Console Application|**Yes**| +|Windows Control Library|**Yes**| +|Web Control Library|No| +|Windows Service|**Yes**| +|Web Site|No| + + + +## Examples + The `My.Computer.Audio.Play` method plays the specified sound in the background when `PlayMode.Background` is specified. + + :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class1.vb" id="Snippet15"::: + + This code example can only run within a Windows Forms application. + + The file name should reference a .wav sound file on your system. + + To simplify the management of your sound files, consider storing the files as application resources. They can then be accessed through the `My.Resources` object. + ]]> @@ -347,48 +347,48 @@ mode for playing the sound. By default, . Plays a .wav sound file. - method is called. The calling code continues to execute.| -|`AudioPlayMode.WaitToComplete`|Plays the sound and waits until it completes before the calling code continues.| - - Background playing lets the application execute other code while the sound plays. - - For more information, see [Playing Sounds](/dotnet/visual-basic/developing-apps/programming/computer-resources/playing-sounds). - -## Availability by Project Type - -|Project type|Available| -|-|-| -|Windows Application|**Yes**| -|Class Library|**Yes**| -|Console Application|**Yes**| -|Windows Control Library|**Yes**| -|Web Control Library|No| -|Windows Service|**Yes**| -|Web Site|No| - - - -## Examples - The `My.Computer.Audio.Play` method plays the specified sound in the background when `PlayMode.Background` is specified. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class1.vb" id="Snippet15"::: - - This code example can only run within a Windows Forms application. - - The file name should reference a .wav sound file on your system. - - To simplify the management of your sound files, consider storing the files as application resources. They can then be accessed through the `My.Resources` object. - + method is called. The calling code continues to execute.| +|`AudioPlayMode.WaitToComplete`|Plays the sound and waits until it completes before the calling code continues.| + + Background playing lets the application execute other code while the sound plays. + + For more information, see [Playing Sounds](/dotnet/visual-basic/developing-apps/programming/computer-resources/playing-sounds). + +## Availability by Project Type + +|Project type|Available| +|-|-| +|Windows Application|**Yes**| +|Class Library|**Yes**| +|Console Application|**Yes**| +|Windows Control Library|**Yes**| +|Web Control Library|No| +|Windows Service|**Yes**| +|Web Site|No| + + + +## Examples + The `My.Computer.Audio.Play` method plays the specified sound in the background when `PlayMode.Background` is specified. + + :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class1.vb" id="Snippet15"::: + + This code example can only run within a Windows Forms application. + + The file name should reference a .wav sound file on your system. + + To simplify the management of your sound files, consider storing the files as application resources. They can then be accessed through the `My.Resources` object. + ]]> @@ -439,48 +439,48 @@ mode for playing the sound. By default, . Plays a .wav sound file. - method is called. The calling code continues to execute.| -|`AudioPlayMode.WaitToComplete`|Plays the sound and waits until it completes before the calling code continues.| - - Background playing lets the application execute other code while the sound plays. - - For more information, see [Playing Sounds](/dotnet/visual-basic/developing-apps/programming/computer-resources/playing-sounds). - -## Availability by Project Type - -|Project type|Available| -|-|-| -|Windows Application|**Yes**| -|Class Library|**Yes**| -|Console Application|**Yes**| -|Windows Control Library|**Yes**| -|Web Control Library|No| -|Windows Service|**Yes**| -|Web Site|No| - - - -## Examples - The `My.Computer.Audio.Play` method plays the specified sound in the background when `PlayMode.Background` is specified. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class1.vb" id="Snippet15"::: - - This code example can only run within a Windows Forms application. - - The file name should reference a .wav sound file on your system. - - To simplify the management of your sound files, consider storing the files as application resources. They can then be accessed through the `My.Resources` object. - + method is called. The calling code continues to execute.| +|`AudioPlayMode.WaitToComplete`|Plays the sound and waits until it completes before the calling code continues.| + + Background playing lets the application execute other code while the sound plays. + + For more information, see [Playing Sounds](/dotnet/visual-basic/developing-apps/programming/computer-resources/playing-sounds). + +## Availability by Project Type + +|Project type|Available| +|-|-| +|Windows Application|**Yes**| +|Class Library|**Yes**| +|Console Application|**Yes**| +|Windows Control Library|**Yes**| +|Web Control Library|No| +|Windows Service|**Yes**| +|Web Site|No| + + + +## Examples + The `My.Computer.Audio.Play` method plays the specified sound in the background when `PlayMode.Background` is specified. + + :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class1.vb" id="Snippet15"::: + + This code example can only run within a Windows Forms application. + + The file name should reference a .wav sound file on your system. + + To simplify the management of your sound files, consider storing the files as application resources. They can then be accessed through the `My.Resources` object. + ]]> @@ -531,46 +531,46 @@ object representing the system sound to play. Plays a system sound. - class: - -- - -- - -- - -- - -- - - For more information, see [Playing Sounds](/dotnet/visual-basic/developing-apps/programming/computer-resources/playing-sounds). - -## Availability by Project Type - -|Project type|Available| -|-|-| -|Windows Application|**Yes**| -|Class Library|**Yes**| -|Console Application|**Yes**| -|Windows Control Library|**Yes**| -|Web Control Library|No| -|Windows Service|**Yes**| -|Web Site|No| - - - -## Examples - This example uses the `My.Computer.Audio.PlaySystemSound` method to play a system sound. - - :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class1.vb" id="Snippet17"::: - - This code example can run only within a Windows Forms application. - + class: + +- + +- + +- + +- + +- + + For more information, see [Playing Sounds](/dotnet/visual-basic/developing-apps/programming/computer-resources/playing-sounds). + +## Availability by Project Type + +|Project type|Available| +|-|-| +|Windows Application|**Yes**| +|Class Library|**Yes**| +|Console Application|**Yes**| +|Windows Control Library|**Yes**| +|Web Control Library|No| +|Windows Service|**Yes**| +|Web Site|No| + + + +## Examples + This example uses the `My.Computer.Audio.PlaySystemSound` method to play a system sound. + + :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class1.vb" id="Snippet17"::: + + This code example can run only within a Windows Forms application. + ]]> @@ -611,40 +611,40 @@ Stops a sound playing in the background. - Objects (Visual Basic) diff --git a/xml/Microsoft.VisualBasic.Devices/Computer.xml b/xml/Microsoft.VisualBasic.Devices/Computer.xml index 893351cbca3..d22d8f85300 100644 --- a/xml/Microsoft.VisualBasic.Devices/Computer.xml +++ b/xml/Microsoft.VisualBasic.Devices/Computer.xml @@ -431,9 +431,9 @@ ## Examples This example describes how to send strings to the computer's `COM1` serial port. - The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. + The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. - The method sends the data to the serial port. + The method sends the data to the serial port. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class2.vb" id="Snippet33"::: diff --git a/xml/Microsoft.VisualBasic.Devices/Keyboard.xml b/xml/Microsoft.VisualBasic.Devices/Keyboard.xml index c950750109e..d60abd197b6 100644 --- a/xml/Microsoft.VisualBasic.Devices/Keyboard.xml +++ b/xml/Microsoft.VisualBasic.Devices/Keyboard.xml @@ -490,7 +490,7 @@ and methods. + The `My.Computer.Keyboard.SendKeys` method provides functionality similar to the and methods. The `wait` argument is useful if the other application must finish before your application can continue. @@ -543,13 +543,13 @@ ## Examples -This example uses the `My.Computer.Keyboard.SendKeys` method to send keystrokes to an external application, the Notepad application, started by the method. +This example uses the `My.Computer.Keyboard.SendKeys` method to send keystrokes to an external application, the Notepad application, started by the method. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class2.vb" id="Snippet25"::: An exception is raised if an application with the requested process identifier cannot be found. -The call to the method requires full trust ( class). +The call to the method requires full trust ( class). ]]> @@ -600,7 +600,7 @@ The call to the method require and methods. + The `My.Computer.Keyboard.SendKeys` method provides functionality similar to the and methods. The `wait` argument is useful if the other application must finish before your application can continue. @@ -653,13 +653,13 @@ The call to the method require ## Examples -This example uses the `My.Computer.Keyboard.SendKeys` method to send keystrokes to an external application, the Notepad application, started by the method. +This example uses the `My.Computer.Keyboard.SendKeys` method to send keystrokes to an external application, the Notepad application, started by the method. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class2.vb" id="Snippet25"::: An exception is raised if an application with the requested process identifier cannot be found. -The call to the method requires full trust ( class). +The call to the method requires full trust ( class). ]]> diff --git a/xml/Microsoft.VisualBasic.Devices/Network.xml b/xml/Microsoft.VisualBasic.Devices/Network.xml index d40fafc65e5..f8598b0540f 100644 --- a/xml/Microsoft.VisualBasic.Devices/Network.xml +++ b/xml/Microsoft.VisualBasic.Devices/Network.xml @@ -141,7 +141,7 @@ method to instruct it to overwrite existing files, provide user credentials, or specify a specific timeout value. + If the destination file already exists, the `DownloadFile` method will not overwrite the existing file. You can use one of the other overloads of the method to instruct it to overwrite existing files, provide user credentials, or specify a specific timeout value. `DownloadFile` outputs trace information when you enable network tracing in your application. For more information, see [Enabling Network Tracing](/dotnet/framework/network-programming/enabling-network-tracing). @@ -223,7 +223,7 @@ method to instruct it to overwrite existing files, provide user credentials, or specify a specific timeout value. `DownloadFile` outputs trace information when you enable network tracing in your application. For more information, see [Enabling Network Tracing](/dotnet/framework/network-programming/enabling-network-tracing). + If the destination file already exists, the `DownloadFile` method will not overwrite the existing file. You can use one of the other overloads of the method to instruct it to overwrite existing files, provide user credentials, or specify a specific timeout value. `DownloadFile` outputs trace information when you enable network tracing in your application. For more information, see [Enabling Network Tracing](/dotnet/framework/network-programming/enabling-network-tracing). > [!NOTE] > The `DownloadFile` method does not send optional HTTP headers. Some servers may return 500 (Internal Server Error) if the optional user agent header is missing. To send optional headers, you must construct a request using the class. @@ -307,7 +307,7 @@ method to instruct it to overwrite existing files or specify a specific timeout value. + If the destination file already exists, the `DownloadFile` method will not overwrite the existing file. You can use one of the other overloads of the method to instruct it to overwrite existing files or specify a specific timeout value. `DownloadFile` outputs trace information when you enable network tracing in your application. For more information, see [Enabling Network Tracing](/dotnet/framework/network-programming/enabling-network-tracing). @@ -396,7 +396,7 @@ method to instruct it to overwrite existing files or specify a specific timeout value. + If the destination file already exists, the `DownloadFile` method will not overwrite the existing file. You can use one of the other overloads of the method to instruct it to overwrite existing files or specify a specific timeout value. `DownloadFile` outputs trace information when you enable network tracing in your application. For more information, see [Enabling Network Tracing](/dotnet/framework/network-programming/enabling-network-tracing). @@ -1125,7 +1125,7 @@ ## Remarks An application raises the `NetworkAvailabilityChanged` event every time the availability of the network changes. You can use the property of the `e` parameter to get the new state of the network connection. To get the current state of the network connection, use the property. - In a Windows Forms application, this event is raised on the application's main thread with the other user-interface events. This allows the event handler to access directly the application's user interface. However, if the application is busy handling another user-interface event when this event is raised, this event cannot be processed until the other event handler finishes or calls the method. + In a Windows Forms application, this event is raised on the application's main thread with the other user-interface events. This allows the event handler to access directly the application's user interface. However, if the application is busy handling another user-interface event when this event is raised, this event cannot be processed until the other event handler finishes or calls the method. You cannot use the `Handles` statement to handle the `NetworkAvailabilityChanged` event; you must use the `AddHandler` statement. @@ -1482,7 +1482,7 @@ method to provide user credentials or specify a specific timeout value. + You can use one of the other overloads of the method to provide user credentials or specify a specific timeout value. `My.Computer.Network.UploadFile` outputs trace information when you enable network tracing in your application. For more information, see [Enabling Network Tracing](/dotnet/framework/network-programming/enabling-network-tracing). @@ -1563,7 +1563,7 @@ method to provide user credentials or specify a specific timeout value. + You can use one of the other overloads of the method to provide user credentials or specify a specific timeout value. `My.Computer.Network.UploadFile` outputs trace information when you enable network tracing in your application. For more information, see [Enabling Network Tracing](/dotnet/framework/network-programming/enabling-network-tracing). @@ -1648,7 +1648,7 @@ method to specify a specific timeout value. + You can use one of the other overloads of the method to specify a specific timeout value. `My.Computer.Network.UploadFile` outputs trace information when you enable network tracing in your application. For more information, see [Enabling Network Tracing](/dotnet/framework/network-programming/enabling-network-tracing). @@ -1737,7 +1737,7 @@ method to specify a specific timeout value. + You can use one of the other overloads of the method to specify a specific timeout value. `My.Computer.Network.UploadFile` outputs trace information when you enable network tracing in your application. For more information, see [Enabling Network Tracing](/dotnet/framework/network-programming/enabling-network-tracing). diff --git a/xml/Microsoft.VisualBasic.Devices/Ports.xml b/xml/Microsoft.VisualBasic.Devices/Ports.xml index ac6947784f7..9c079450ba6 100644 --- a/xml/Microsoft.VisualBasic.Devices/Ports.xml +++ b/xml/Microsoft.VisualBasic.Devices/Ports.xml @@ -52,9 +52,9 @@ ## Examples This example describes how to send strings to the computer's `COM1` serial port. - The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. + The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. - The method sends the data to the serial port. + The method sends the data to the serial port. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class2.vb" id="Snippet33"::: @@ -137,7 +137,7 @@ ## Remarks The `My.Computer.Ports.OpenSerialPort` method creates and opens a object. The arguments to the `OpenSerialPort` method determine the settings of the object. - Your code should close the object when it is finished using the object. You can use the method to close the object explicitly or the `Using` statement to close it implicitly. See the example in this topic for more information. + Your code should close the object when it is finished using the object. You can use the method to close the object explicitly or the `Using` statement to close it implicitly. See the example in this topic for more information. The following table lists examples of tasks involving the `My.Computer.Ports.OpenSerialPort` method. @@ -164,9 +164,9 @@ ## Examples This example describes how to send strings to the computer's `COM1` serial port. - The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. + The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. - The method sends the data to the serial port. + The method sends the data to the serial port. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class2.vb" id="Snippet33"::: @@ -220,7 +220,7 @@ ## Remarks The `My.Computer.Ports.OpenSerialPort` method creates and opens a object. The arguments to the `OpenSerialPort` method determine the settings of the object. - Your code should close the object when it is finished using the object. You can use the method to close the object explicitly or the `Using` statement to close it implicitly. See the example in this topic for more information. + Your code should close the object when it is finished using the object. You can use the method to close the object explicitly or the `Using` statement to close it implicitly. See the example in this topic for more information. The following table lists examples of tasks involving the `My.Computer.Ports.OpenSerialPort` method. @@ -247,9 +247,9 @@ ## Examples This example describes how to send strings to the computer's `COM1` serial port. - The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. + The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. - The method sends the data to the serial port. + The method sends the data to the serial port. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class2.vb" id="Snippet33"::: @@ -308,7 +308,7 @@ ## Remarks The `My.Computer.Ports.OpenSerialPort` method creates and opens a object. The arguments to the `OpenSerialPort` method determine the settings of the object. - Your code should close the object when it is finished using the object. You can use the method to close the object explicitly or the `Using` statement to close it implicitly. See the example in this topic for more information. + Your code should close the object when it is finished using the object. You can use the method to close the object explicitly or the `Using` statement to close it implicitly. See the example in this topic for more information. The following table lists examples of tasks involving the `My.Computer.Ports.OpenSerialPort` method. @@ -335,9 +335,9 @@ ## Examples This example describes how to send strings to the computer's `COM1` serial port. - The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. + The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. - The method sends the data to the serial port. + The method sends the data to the serial port. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class2.vb" id="Snippet33"::: @@ -401,7 +401,7 @@ ## Remarks The `My.Computer.Ports.OpenSerialPort` method creates and opens a object. The arguments to the `OpenSerialPort` method determine the settings of the object. - Your code should close the object when it is finished using the object. You can use the method to close the object explicitly or the `Using` statement to close it implicitly. See the example in this topic for more information. + Your code should close the object when it is finished using the object. You can use the method to close the object explicitly or the `Using` statement to close it implicitly. See the example in this topic for more information. The following table lists examples of tasks involving the `My.Computer.Ports.OpenSerialPort` method. @@ -428,9 +428,9 @@ ## Examples This example describes how to send strings to the computer's `COM1` serial port. - The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. + The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. - The method sends the data to the serial port. + The method sends the data to the serial port. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class2.vb" id="Snippet33"::: @@ -497,7 +497,7 @@ ## Remarks The `My.Computer.Ports.OpenSerialPort` method creates and opens a object. The arguments to the `OpenSerialPort` method determine the settings of the object. - Your code should close the object when it is finished using the object. You can use the method to close the object explicitly or the `Using` statement to close it implicitly. See the example in this topic for more information. + Your code should close the object when it is finished using the object. You can use the method to close the object explicitly or the `Using` statement to close it implicitly. See the example in this topic for more information. The following table lists examples of tasks involving the `My.Computer.Ports.OpenSerialPort` method. @@ -524,9 +524,9 @@ ## Examples This example describes how to send strings to the computer's `COM1` serial port. - The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. + The `Using` block allows the application to close the serial port even if it generates an exception. All code that manipulates the serial port should appear within this block, or within a `Try...Catch...Finally` block with a call to use the method. - The method sends the data to the serial port. + The method sends the data to the serial port. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic.Devices/Audio/Overview/Class2.vb" id="Snippet33"::: diff --git a/xml/Microsoft.VisualBasic.FileIO/DeleteDirectoryOption.xml b/xml/Microsoft.VisualBasic.FileIO/DeleteDirectoryOption.xml index bd3d102c876..0ab12163798 100644 --- a/xml/Microsoft.VisualBasic.FileIO/DeleteDirectoryOption.xml +++ b/xml/Microsoft.VisualBasic.FileIO/DeleteDirectoryOption.xml @@ -28,11 +28,11 @@ Specifies what should be done when a directory that is to be deleted contains files or directories. - method. - + method. + ]]> diff --git a/xml/Microsoft.VisualBasic.FileIO/FileSystem.xml b/xml/Microsoft.VisualBasic.FileIO/FileSystem.xml index a17e46903aa..a49d08612d6 100644 --- a/xml/Microsoft.VisualBasic.FileIO/FileSystem.xml +++ b/xml/Microsoft.VisualBasic.FileIO/FileSystem.xml @@ -3659,9 +3659,9 @@ The `OpenTextFileWriter` method opens and initializes a stream for a file and then returns the object for that stream. You can write to the steam as many times as necessary and then close it when you are finished. > [!NOTE] -> You must call the method on the object to make sure that all data is correctly written to the underlying stream. +> You must call the method on the object to make sure that all data is correctly written to the underlying stream. - If you are writing only a few strings to a file, it might be simpler to use the method. + If you are writing only a few strings to a file, it might be simpler to use the method. The following table lists an example of a task involving the `My.Computer.FileSystem.OpenTextFileWriter` method. @@ -3734,9 +3734,9 @@ The `OpenTextFileWriter` method opens and initializes a stream for a file and then returns the object for that stream. You can write to the steam as many times as necessary and then close it when you are finished. > [!NOTE] -> You must call the method on the object to make sure that all data is correctly written to the underlying stream. +> You must call the method on the object to make sure that all data is correctly written to the underlying stream. - If you are writing only a few strings to a file, it might be simpler to use the method. + If you are writing only a few strings to a file, it might be simpler to use the method. The following table lists an example of a task involving the `My.Computer.FileSystem.OpenTextFileWriter` method. @@ -3883,7 +3883,7 @@ ## Remarks The `ReadAllText` method of the `My.Computer.FileSystem` object allows you to read from a text file. The contents of the file are returned as a string. - The file encoding can be specified if the contents of the file are in an encoding such as ASCII or UTF-8. If you are reading from a file with extended characters, you need to specify the file encoding using another overload of the method. + The file encoding can be specified if the contents of the file are in an encoding such as ASCII or UTF-8. If you are reading from a file with extended characters, you need to specify the file encoding using another overload of the method. Do not make decisions about the contents of the file based on the name of the file. For example, the file Form1.vb may not be a Visual Basic source file. Verify all inputs before using the data in your application. @@ -4111,7 +4111,7 @@ method to move and rename the file. + This method cannot be used to move a file; use the method to move and rename the file. The following table lists an example of a task involving the `My.Computer.FileSystem.RenameFile` method. @@ -4274,14 +4274,14 @@ method. + The UTF-8 encoding is used to write to the file. To specify a different encoding, use a different overload of the method. If the specified file does not exist, it is created. If the specified encoding does not match the existing encoding of the file, the specified coding is ignored. > [!NOTE] -> The `WriteAllText` method opens a file, writes to it, and then closes it. Code that uses the `WriteAllText` method is simpler than code that uses a object. However, if you are adding strings to a file by using a loop, a object can provide better performance because you only have to open and close the file one time. For more information, see the method. +> The `WriteAllText` method opens a file, writes to it, and then closes it. Code that uses the `WriteAllText` method is simpler than code that uses a object. However, if you are adding strings to a file by using a loop, a object can provide better performance because you only have to open and close the file one time. For more information, see the method. The following table lists examples of tasks involving the `My.Computer.FileSystem.WriteAllText` method. @@ -4367,7 +4367,7 @@ If the specified encoding does not match the existing encoding of the file, the specified coding is ignored. > [!NOTE] -> The `WriteAllText` method opens a file, writes to it, and then closes it. Code that uses the `WriteAllText` method is simpler than code that uses a object. However, if you are adding strings to a file by using a loop, a object can provide better performance because you only have to open and close the file one time. For more information, see the method. +> The `WriteAllText` method opens a file, writes to it, and then closes it. Code that uses the `WriteAllText` method is simpler than code that uses a object. However, if you are adding strings to a file by using a loop, a object can provide better performance because you only have to open and close the file one time. For more information, see the method. The following table lists examples of tasks involving the `My.Computer.FileSystem.WriteAllText` method. diff --git a/xml/Microsoft.VisualBasic.FileIO/MalformedLineException.xml b/xml/Microsoft.VisualBasic.FileIO/MalformedLineException.xml index 50236333c00..14b5fab3de7 100644 --- a/xml/Microsoft.VisualBasic.FileIO/MalformedLineException.xml +++ b/xml/Microsoft.VisualBasic.FileIO/MalformedLineException.xml @@ -45,7 +45,7 @@ ## Remarks Check to ensure that the `TextFieldType` and `Delimiter` parameters are defined properly. - If the method cannot parse a row using the specified format, the exception is thrown. The exception contains the line number of the malformed line. + If the method cannot parse a row using the specified format, the exception is thrown. The exception contains the line number of the malformed line. ]]> @@ -100,14 +100,14 @@ method cannot parse a row using the specified format. + The exception indicates that the method cannot parse a row using the specified format. The following table shows the initial property values for an instance of . |Property|Value| |-|-| -||A null reference (`Nothing` in Visual Basic).| -||The localized error message string.| +||A null reference (`Nothing` in Visual Basic).| +||The localized error message string.| ]]> @@ -163,8 +163,8 @@ |Property|Value| |-|-| -||A null reference (`Nothing` in Visual Basic)| -||The `message` string.| +||A null reference (`Nothing` in Visual Basic)| +||The `message` string.| ]]> @@ -281,8 +281,8 @@ |Property|Value| |-|-| -||The `innerException` reference.| -||The `message` string.| +||The `innerException` reference.| +||The `message` string.| ]]> @@ -339,8 +339,8 @@ |Property|Value| |-|-| -||A null reference (`Nothing` in Visual Basic)| -||The `message` string.| +||A null reference (`Nothing` in Visual Basic)| +||The `message` string.| ]]> @@ -401,8 +401,8 @@ |Property|Value| |-|-| -||The `innerException` reference.| -||The `message` string.| +||The `innerException` reference.| +||The `message` string.| ]]> @@ -522,7 +522,7 @@ method cannot parse a row using the specified format, the exception is thrown. The exception contains the line number of the malformed line. + If the method cannot parse a row using the specified format, the exception is thrown. The exception contains the line number of the malformed line. ]]> @@ -566,13 +566,13 @@ returns a representation of the current exception that is intended to be understood by humans. Where the exception contains culture-sensitive data, the string representation returned by is required to take into account the current system culture. Although there are no exact requirements for the format of the returned string, it should attempt to reflect the value of the object as perceived by the user. + returns a representation of the current exception that is intended to be understood by humans. Where the exception contains culture-sensitive data, the string representation returned by is required to take into account the current system culture. Although there are no exact requirements for the format of the returned string, it should attempt to reflect the value of the object as perceived by the user. - The default implementation of obtains the name of the class that threw the current exception, the message, the result of calling on the inner exception, the result of calling , and the line number of the malformed line If any of these members is a null reference (`Nothing` in Visual Basic), its value is not included in the returned string. + The default implementation of obtains the name of the class that threw the current exception, the message, the result of calling on the inner exception, the result of calling , and the line number of the malformed line If any of these members is a null reference (`Nothing` in Visual Basic), its value is not included in the returned string. If there is no error message or if it is an empty string (""), then no error message is returned. The name of the inner exception and the stack trace are returned only if they are not a null reference (`Nothing` in Visual Basic). - This method overrides . + This method overrides . ]]> diff --git a/xml/Microsoft.VisualBasic.FileIO/RecycleOption.xml b/xml/Microsoft.VisualBasic.FileIO/RecycleOption.xml index 0d1e50d9449..5bb2c8f74cd 100644 --- a/xml/Microsoft.VisualBasic.FileIO/RecycleOption.xml +++ b/xml/Microsoft.VisualBasic.FileIO/RecycleOption.xml @@ -28,15 +28,15 @@ Specifies whether a file should be deleted permanently or placed in the **Recycle Bin**. - and methods. - - To protect users against accidental deletion of important files, the **Recycle Bin** collects deleted files and provides a method for restoring those files. You must explicitly delete the files from the **Recycle Bin** to make the deletion permanent. Until the files are deleted from the **Recycle Bin**, the disk space occupied by those files is unavailable for other uses. - - Sometimes it is beneficial to bypass the **Recycle Bin**, especially if you are deleting a large number of files (or a smaller number of very large files) that you are sure are no longer needed, and you want to reclaim the disk space. - + and methods. + + To protect users against accidental deletion of important files, the **Recycle Bin** collects deleted files and provides a method for restoring those files. You must explicitly delete the files from the **Recycle Bin** to make the deletion permanent. Until the files are deleted from the **Recycle Bin**, the disk space occupied by those files is unavailable for other uses. + + Sometimes it is beneficial to bypass the **Recycle Bin**, especially if you are deleting a large number of files (or a smaller number of very large files) that you are sure are no longer needed, and you want to reclaim the disk space. + ]]> diff --git a/xml/Microsoft.VisualBasic.FileIO/SearchOption.xml b/xml/Microsoft.VisualBasic.FileIO/SearchOption.xml index 4221c8a61a0..0873508f7ed 100644 --- a/xml/Microsoft.VisualBasic.FileIO/SearchOption.xml +++ b/xml/Microsoft.VisualBasic.FileIO/SearchOption.xml @@ -28,11 +28,11 @@ Specifies whether to search all or only top-level directories. - , , and methods. - + , , and methods. + ]]> diff --git a/xml/Microsoft.VisualBasic.FileIO/TextFieldParser.xml b/xml/Microsoft.VisualBasic.FileIO/TextFieldParser.xml index 9d41cf0ea3a..36317c2b7f6 100644 --- a/xml/Microsoft.VisualBasic.FileIO/TextFieldParser.xml +++ b/xml/Microsoft.VisualBasic.FileIO/TextFieldParser.xml @@ -713,7 +713,7 @@ ## Remarks This property is meaningful only if the property is set to `FieldType.Delimited`. - Defining the delimiters for a text file can also be accomplished with the method. + Defining the delimiters for a text file can also be accomplished with the method. The following table lists an example of a task involving the `Delimiters` property. @@ -1070,7 +1070,7 @@ ## Remarks This property is meaningful only if the property is set to `FieldType.FixedWidth`. If the last entry in the array is less than or equal to zero, the field is assumed to be of variable width. - The method can also be used to set field widths. + The method can also be used to set field widths. The following table lists examples of tasks involving the `FieldWidths` property. @@ -1751,7 +1751,7 @@ ## Remarks -This member is an explicit interface member implementation. It can be used only when the `TextFieldParser` instance is cast to an interface. The recommended alternative is to call the method. +This member is an explicit interface member implementation. It can be used only when the `TextFieldParser` instance is cast to an interface. The recommended alternative is to call the method. ]]> diff --git a/xml/Microsoft.VisualBasic.FileIO/UIOption.xml b/xml/Microsoft.VisualBasic.FileIO/UIOption.xml index 52ede661be7..bfe49b3cba8 100644 --- a/xml/Microsoft.VisualBasic.FileIO/UIOption.xml +++ b/xml/Microsoft.VisualBasic.FileIO/UIOption.xml @@ -28,11 +28,11 @@ Specifies which dialog boxes to show when copying, deleting, or moving files or directories. - , , , , , and methods. - + , , , , , and methods. + ]]> diff --git a/xml/Microsoft.VisualBasic.Logging/AspLog.xml b/xml/Microsoft.VisualBasic.Logging/AspLog.xml index 30be6f4b0fe..489b1ca308b 100644 --- a/xml/Microsoft.VisualBasic.Logging/AspLog.xml +++ b/xml/Microsoft.VisualBasic.Logging/AspLog.xml @@ -160,9 +160,9 @@ , sets its name to `FileLog`, and configures it to log messages with severity level and greater. The new object is then added to the collection. + This method creates a new , sets its name to `FileLog`, and configures it to log messages with severity level and greater. The new object is then added to the collection. - The calls the method if the property has not been configured. The trace source can be configured in the application's configuration file. + The calls the method if the property has not been configured. The trace source can be configured in the application's configuration file. ]]> diff --git a/xml/Microsoft.VisualBasic.Logging/FileLogTraceListener.xml b/xml/Microsoft.VisualBasic.Logging/FileLogTraceListener.xml index 32b8747c900..6f858d671d8 100644 --- a/xml/Microsoft.VisualBasic.Logging/FileLogTraceListener.xml +++ b/xml/Microsoft.VisualBasic.Logging/FileLogTraceListener.xml @@ -39,7 +39,7 @@ The class provides automated maintenance capabilities to archive log files as needed, on a daily or per-application basis. This automatic archival functionality helps reduce the maintenance responsibilities of developers and administrators. -An instance of can be added to the or collections to redirect output from logging to a text file. Instances of this class can also be added to `My.Application.Log` or `My.Log` (for Web applications) in Visual Basic applications. For more information, see [Walkthrough: Changing Where My.Application.Log Writes Information](/dotnet/visual-basic/developing-apps/programming/log-info/walkthrough-changing-where-my-application-log-writes-information). +An instance of can be added to the or collections to redirect output from logging to a text file. Instances of this class can also be added to `My.Application.Log` or `My.Log` (for Web applications) in Visual Basic applications. For more information, see [Walkthrough: Changing Where My.Application.Log Writes Information](/dotnet/visual-basic/developing-apps/programming/log-info/walkthrough-changing-where-my-application-log-writes-information). The main features of this class are: @@ -48,7 +48,7 @@ The main features of this class are: The explicit form of the file name is `baseName`[-`dateStamp`][-`version`].log, where: - The `baseName` part is the fundamental log name, specified by the property. - - The `dateStamp` part has the format "YYYY-MM-DD", and it is shown when is or . + - The `dateStamp` part has the format "YYYY-MM-DD", and it is shown when is or . - If more than one log file is needed with the same `baseName` and `dateStamp`, the `version` part, a positive `Integer`, is added to the file name. 2. *Multiple class instances*. If an instance of the class writes to a file that is in use: @@ -71,9 +71,9 @@ The main features of this class are: **Log Maintenance** -- The minimum frequency for creating new log files is determined by the property. When the value is or , a new log file is created at least once every day or week, and a date stamp is incorporated into the name. +- The minimum frequency for creating new log files is determined by the property. When the value is or , a new log file is created at least once every day or week, and a date stamp is incorporated into the name. - The maximum size (in bytes) of the log file is determined by the property. If the log file size exceeds this size, additional messages written to the log are discarded and, depending on the property, an exception is thrown. -- The property determines how much free space (in bytes) must be available. This helps ensure that the class will not consume all available disk space. Use the property to specify the behavior of log writes when there are less than bytes free. +- The property determines how much free space (in bytes) must be available. This helps ensure that the class will not consume all available disk space. Use the property to specify the behavior of log writes when there are less than bytes free. **Log-File Output Settings** @@ -84,9 +84,9 @@ The main features of this class are: **Log-File Output** -- The and methods write messages to the log file. These methods check the property, along with any existing logs with the same base name to determine if a new log should be created. -- The method flushes any messages currently in the output buffer to the log file. -- The method closes the log file so that it can be used by other processes. +- The and methods write messages to the log file. These methods check the property, along with any existing logs with the same base name to determine if a new log should be created. +- The method flushes any messages currently in the output buffer to the log file. +- The method closes the log file so that it can be used by other processes. **Enabling Output** @@ -273,11 +273,11 @@ When the `Append` property is `False`, the log file is opened in name. +- The output file is locked by another process. A new log file is created with a version number that is incorporated into the name. - The current file size is greater than what the property allows. Additional messages are discarded. Depending on the property, an exception is thrown. -- The existing file name is out of date according to the log-creation schedule specified by the property. A new log file is created. The date stamp is incorporated into the name. +- The existing file name is out of date according to the log-creation schedule specified by the property. A new log file is created. The date stamp is incorporated into the name. ]]> @@ -325,7 +325,7 @@ This behavior is overridden in the following scenarios: property provides the best performance for most applications, because it is more efficient to write multiple messages to the log file at one time. You can use the method to flush any messages currently in the log file's output buffer. You can also use the method, which implicitly flushes the stream before closing the log file. + The `False` setting for the property provides the best performance for most applications, because it is more efficient to write multiple messages to the log file at one time. You can use the method to flush any messages currently in the log file's output buffer. You can also use the method, which implicitly flushes the stream before closing the log file. ]]> @@ -377,7 +377,7 @@ This behavior is overridden in the following scenarios: - The `baseName` part is the fundamental log name, specified by the property. -- The `dateStamp` part has the format "YYYY-MM-DD", and it is shown when is set to or . +- The `dateStamp` part has the format "YYYY-MM-DD", and it is shown when is set to or . - If more than one log file is needed with the same `baseName` and `dateStamp`, the `iteration` part, a positive `Integer`, is added to the file name. @@ -429,7 +429,7 @@ This behavior is overridden in the following scenarios: method explicitly, because the class manages the underlying steam. + You do not need to call the method explicitly, because the class manages the underlying steam. ]]> @@ -701,7 +701,7 @@ This behavior is overridden in the following scenarios: method to write all buffered data to the current log file. + Use the method to write all buffered data to the current log file. ]]> @@ -755,7 +755,7 @@ This behavior is overridden in the following scenarios: - The `baseName` part is the fundamental log name, specified by the property. -- The `dateStamp` part has the format YYYY-MM-DD, and it is shown when is or . +- The `dateStamp` part has the format YYYY-MM-DD, and it is shown when is or . - If more than one log file is needed with the same `baseName` and `dateStamp`, the `iteration` part, a positive `Integer`, is added to the file name. @@ -850,7 +850,7 @@ This behavior is overridden in the following scenarios: and methods. + Use the property to configure the behavior of the and methods. ]]> @@ -900,7 +900,7 @@ This behavior is overridden in the following scenarios: ||The path for the executable file that started the application.| ||The path for the application data of a user, with the format:

`BasePath`\\`CompanyName`\\`ProductName`\\`ProductVersion`

A typical value for `BasePath` is:

C:\Documents and Settings\\`username`\Application Data

The values of `CompanyName`, `ProductName`, and `ProductVersion` come form the assembly.| ||The path of the current system's temporary folder.| -||If the string specified by is not empty, then use it as the path; otherwise use the path for the application data of a user.| +||If the string specified by is not empty, then use it as the path; otherwise use the path for the application data of a user.| ]]>
@@ -943,7 +943,7 @@ This behavior is overridden in the following scenarios: ## Remarks Assign one of the enumeration values to the property to specify which date to include in the names of the log files. - The format of the date is YYYY-MM-DD. For more information on the format of the log file name, see . + The format of the date is YYYY-MM-DD. For more information on the format of the log file name, see . |**LogFileCreationSchedule value**|**Date in the log file name**| |---------------------------------------|-----------------------------------| @@ -999,7 +999,7 @@ This behavior is overridden in the following scenarios: ## Remarks Use this property to make sure that the log files do not grow too large. - If the log file size (in bytes) is greater than the value of this property, then when the class attempts to write a message to the log, the message is discarded and the failure is either silent or an exception is thrown depending on the value of the property. Otherwise, the message is written to the log, if the amount of free disk space (in bytes) is less than . + If the log file size (in bytes) is greater than the value of this property, then when the class attempts to write a message to the log, the message is discarded and the failure is either silent or an exception is thrown depending on the value of the property. Otherwise, the message is written to the log, if the amount of free disk space (in bytes) is less than . ]]>
@@ -1049,7 +1049,7 @@ This behavior is overridden in the following scenarios: ## Remarks Use this property to make sure that the log files do not completely fill the disk. - If the amount of free disk space (in bytes) is less than the value of this property, then when the class attempts to write a message to the log, the message is discarded and the failure is either silent or an exception is thrown depending on the value of the property. Otherwise, the message is written to the log, if the log file size (in bytes) is greater than . + If the amount of free disk space (in bytes) is less than the value of this property, then when the class attempts to write a message to the log, the message is discarded and the failure is either silent or an exception is thrown depending on the value of the property. Otherwise, the message is written to the log, if the log file size (in bytes) is greater than . ]]>
@@ -1070,7 +1070,7 @@ This behavior is overridden in the following scenarios: methods are not intended to be called by application code. These methods are called by members of the , , and classes to write trace data to output. + methods are not intended to be called by application code. These methods are called by members of the , , and classes to write trace data to output. ]]> @@ -1129,7 +1129,7 @@ This behavior is overridden in the following scenarios: 3. Writes the information to the log file. - For more information on creating new log files, see . + For more information on creating new log files, see . The following table lists the output fields in the order they appear. The fields are delimited by the string that the property specifies, and are followed by a line terminator. @@ -1216,7 +1216,7 @@ This behavior is overridden in the following scenarios: 3. Writes the information to the log file. - For more information on creating new log files, see . + For more information on creating new log files, see . This table lists the output fields in the order they appear. The fields are delimited by the string that the property specifies, and are followed by a line terminator. @@ -1225,7 +1225,7 @@ This behavior is overridden in the following scenarios: |`source`|Always|The value of `name`.| |`severity`|Always|The enumeration-value name of `eventType`.| |`id`|Always|The string representation of `id`.| -|`message`|Always|The string consisting of the string representation of each element in `data`, each separated by .| +|`message`|Always|The string consisting of the string representation of each element in `data`, each separated by .| |`callStack`|When the flag is set in the property.|The property of `eventCache`.| |`CorrelationID`|When the flag is set in the property.|The property of `eventCache`.| |`DateTime`|When the flag is set in the property.|The string representation of the property of `eventCache`. The invariant culture is used for the string conversion.| @@ -1254,7 +1254,7 @@ This behavior is overridden in the following scenarios: methods are not intended to be called by application code. These methods are called by members of the , , and classes to write trace data to output. + methods are not intended to be called by application code. These methods are called by members of the , , and classes to write trace data to output. ]]> @@ -1313,7 +1313,7 @@ This behavior is overridden in the following scenarios: 3. Writes the information to the log file. - For more information on creating new log files, see . + For more information on creating new log files, see . This table lists the output fields in the order in which they appear. The fields are delimited by the string that the property specifies, and are followed by a line terminator. @@ -1402,7 +1402,7 @@ This behavior is overridden in the following scenarios: 3. Writes the information to the log file. - For more information on creating new log file, see . + For more information on creating new log file, see . This table lists the output fields in the order in which they appear. The fields are delimited by the string that the property specifies, and followed by a line terminator. @@ -1466,9 +1466,9 @@ This behavior is overridden in the following scenarios: method writes a specific message to the log file, without any additional context information. + The method writes a specific message to the log file, without any additional context information. - Use the one of the methods to include the context information in the log output. + Use the one of the methods to include the context information in the log output. ]]> @@ -1514,9 +1514,9 @@ This behavior is overridden in the following scenarios: method writes a specific message to the log file, without any additional context information. + The method writes a specific message to the log file, without any additional context information. - Use the one of the methods to include the context information in the log output. + Use the one of the methods to include the context information in the log output. ]]> diff --git a/xml/Microsoft.VisualBasic.Logging/Log.xml b/xml/Microsoft.VisualBasic.Logging/Log.xml index 90745d7540b..0d6b8c243fe 100644 --- a/xml/Microsoft.VisualBasic.Logging/Log.xml +++ b/xml/Microsoft.VisualBasic.Logging/Log.xml @@ -234,9 +234,9 @@ Right now we only support WinApp as an application platform , sets its name to `FileLog`, and configures it to log messages with severity level and greater. The new object is then added to the collection. + This method creates a new , sets its name to `FileLog`, and configures it to log messages with severity level and greater. The new object is then added to the collection. - The calls the method if the property has not been configured. The trace source can be configured in the application's configuration file. + The calls the method if the property has not been configured. The trace source can be configured in the application's configuration file. ]]> diff --git a/xml/Microsoft.VisualBasic.MyServices.Internal/ContextValue`1.xml b/xml/Microsoft.VisualBasic.MyServices.Internal/ContextValue`1.xml index bfb9505b2fa..28b246456f1 100644 --- a/xml/Microsoft.VisualBasic.MyServices.Internal/ContextValue`1.xml +++ b/xml/Microsoft.VisualBasic.MyServices.Internal/ContextValue`1.xml @@ -81,7 +81,7 @@ ## Remarks This class supports `My` in Visual Basic. It is not intended to be used directly from your code. - This class stores an object in a context appropriate for the run time environment. The value of the property is initialized to `Nothing`. + This class stores an object in a context appropriate for the run time environment. The value of the property is initialized to `Nothing`. ]]>
diff --git a/xml/Microsoft.VisualBasic.MyServices/FileSystemProxy.xml b/xml/Microsoft.VisualBasic.MyServices/FileSystemProxy.xml index b773398e910..a9ad3b16ac4 100644 --- a/xml/Microsoft.VisualBasic.MyServices/FileSystemProxy.xml +++ b/xml/Microsoft.VisualBasic.MyServices/FileSystemProxy.xml @@ -3688,9 +3688,9 @@ The `OpenTextFileWriter` method opens and initializes a stream for a file and then returns the object for that stream. You can write to the steam as many times as necessary and then close it when you are finished. > [!NOTE] -> You must call the method on the object to make sure that all data is correctly written to the underlying stream. +> You must call the method on the object to make sure that all data is correctly written to the underlying stream. - If you are writing only a few strings to a file, it might be simpler to use the method. + If you are writing only a few strings to a file, it might be simpler to use the method. The following table lists an example of a task involving the `My.Computer.FileSystem.OpenTextFileWriter` method. @@ -3764,9 +3764,9 @@ The `OpenTextFileWriter` method opens and initializes a stream for a file and then returns the object for that stream. You can write to the steam as many times as necessary and then close it when you are finished. > [!NOTE] -> You must call the method on the object to make sure that all data is correctly written to the underlying stream. +> You must call the method on the object to make sure that all data is correctly written to the underlying stream. - If you are writing only a few strings to a file, it might be simpler to use the method. + If you are writing only a few strings to a file, it might be simpler to use the method. The following table lists an example of a task involving the `My.Computer.FileSystem.OpenTextFileWriter` method. @@ -3917,7 +3917,7 @@ ## Remarks The `ReadAllText` method of the `My.Computer.FileSystem` object allows you to read from a text file. The contents of the file are returned as a string. - The file encoding can be specified if the contents of the file are in an encoding such as ASCII or UTF-8. If you are reading from a file with extended characters, you need to specify the file encoding using another overload of the method. + The file encoding can be specified if the contents of the file are in an encoding such as ASCII or UTF-8. If you are reading from a file with extended characters, you need to specify the file encoding using another overload of the method. Do not make decisions about the contents of the file based on the name of the file. For example, the file Form1.vb may not be a Visual Basic source file. Verify all inputs before using the data in your application. @@ -4162,7 +4162,7 @@ method to move and rename the file. + This method cannot be used to move a file; use the method to move and rename the file. The following table lists an example of a task involving the `My.Computer.FileSystem.RenameFile` method. @@ -4379,14 +4379,14 @@ method. + The UTF-8 encoding is used to write to the file. To specify a different encoding, use a different overload of the method. If the specified file does not exist, it is created. If the specified encoding does not match the existing encoding of the file, the specified coding is ignored. > [!NOTE] -> The `WriteAllText` method opens a file, writes to it, and then closes it. Code that uses the `WriteAllText` method is simpler than code that uses a object. However, if you are adding strings to a file by using a loop, a object can provide better performance because you only have to open and close the file one time. For more information, see the method. +> The `WriteAllText` method opens a file, writes to it, and then closes it. Code that uses the `WriteAllText` method is simpler than code that uses a object. However, if you are adding strings to a file by using a loop, a object can provide better performance because you only have to open and close the file one time. For more information, see the method. The following table lists examples of tasks involving the `My.Computer.FileSystem.WriteAllText` method. @@ -4475,7 +4475,7 @@ If the specified encoding does not match the existing encoding of the file, the specified coding is ignored. > [!NOTE] -> The `WriteAllText` method opens a file, writes to it, and then closes it. Code that uses the `WriteAllText` method is simpler than code that uses a object. However, if you are adding strings to a file by using a loop, a object can provide better performance because you only have to open and close the file one time. For more information, see the method. +> The `WriteAllText` method opens a file, writes to it, and then closes it. Code that uses the `WriteAllText` method is simpler than code that uses a object. However, if you are adding strings to a file by using a loop, a object can provide better performance because you only have to open and close the file one time. For more information, see the method. The following table lists examples of tasks involving the `My.Computer.FileSystem.WriteAllText` method. diff --git a/xml/Microsoft.VisualBasic/AudioPlayMode.xml b/xml/Microsoft.VisualBasic/AudioPlayMode.xml index e0205e1e336..94a48c80aab 100644 --- a/xml/Microsoft.VisualBasic/AudioPlayMode.xml +++ b/xml/Microsoft.VisualBasic/AudioPlayMode.xml @@ -26,11 +26,11 @@ Indicates how to play sounds when calling audio methods. - method plays sounds. - + method plays sounds. + ]]> diff --git a/xml/Microsoft.VisualBasic/Collection.xml b/xml/Microsoft.VisualBasic/Collection.xml index 33f4f6b9135..43112653238 100644 --- a/xml/Microsoft.VisualBasic/Collection.xml +++ b/xml/Microsoft.VisualBasic/Collection.xml @@ -88,15 +88,15 @@ Dim coll As New Microsoft.VisualBasic.Collection() Once you have created a collection, you can do any of the following: -- Add an element with the method. +- Add an element with the method. -- Remove an element with the method. +- Remove an element with the method. -- Remove all elements with the method. +- Remove all elements with the method. - Find out how many elements the collection contains with the property. -- Check whether a specific element is present with the method. +- Check whether a specific element is present with the method. - Return a specific element from the collection with the property. @@ -228,7 +228,7 @@ Dim coll As New Microsoft.VisualBasic.Collection() ## Examples - The following example uses the `Add` method to add `child` objects - instances of a class called `child` containing a `Public` property `name` - to a collection called `family`. To see how this works, create a with two controls and set their properties to `Add` and `List`. Add the `child` class definition and the `family` declaration to the form code. Modify the `_Click` event handlers for the **Add** and **List** buttons as shown. The **Add** button allows you to add children. The **List** button displays the names of all the children. + The following example uses the `Add` method to add `child` objects - instances of a class called `child` containing a `Public` property `name` - to a collection called `family`. To see how this works, create a with two controls and set their properties to `Add` and `List`. Add the `child` class definition and the `family` declaration to the form code. Modify the `_Click` event handlers for the **Add** and **List** buttons as shown. The **Add** button allows you to add children. The **List** button displays the names of all the children. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic/Collection/Overview/Form1.vb" id="Snippet2"::: @@ -329,7 +329,7 @@ Dim coll As New Microsoft.VisualBasic.Collection() ## Remarks `Contains` returns `True` if the collection contains an element with a key exactly matching `Key`. Otherwise, `Contains` returns `False`. Case is ignored when matching key values. - A Visual Basic `Collection` can hold some elements that have keys and other elements without keys. This depends on whether the call to the method supplies an argument to the optional `Key` parameter. + A Visual Basic `Collection` can hold some elements that have keys and other elements without keys. This depends on whether the call to the method supplies an argument to the optional `Key` parameter. @@ -452,7 +452,7 @@ Dim coll As New Microsoft.VisualBasic.Collection() :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic/Collection/Overview/Class1.vb" id="Snippet7"::: - `GetEnumerator` constructs and returns an enumerator object, which implements the interface of the namespace. The enumerator object exposes the property and the and methods. For more information, see [For Each...Next Statement](/dotnet/visual-basic/language-reference/statements/for-each-next-statement). + `GetEnumerator` constructs and returns an enumerator object, which implements the interface of the namespace. The enumerator object exposes the property and the and methods. For more information, see [For Each...Next Statement](/dotnet/visual-basic/language-reference/statements/for-each-next-statement). ]]> @@ -1029,11 +1029,11 @@ MsgBox(CStr(customers(1))) Enumerators can be used to read the data in the collection, but they cannot be used to modify the underlying collection. - Initially, the enumerator is positioned before the first element in the collection. The method also brings the enumerator back to this position. At this position, the property is undefined. Therefore, you must call the method to advance the enumerator to the first element of the collection before reading the value of . + Initially, the enumerator is positioned before the first element in the collection. The method also brings the enumerator back to this position. At this position, the property is undefined. Therefore, you must call the method to advance the enumerator to the first element of the collection before reading the value of . - returns the same object until either or is called. sets to the next element. + returns the same object until either or is called. sets to the next element. - If passes the end of the collection, the enumerator is positioned after the last element in the collection and returns `false`. When the enumerator is at this position, subsequent calls to also return `false`. If the last call to returns `false`, is undefined. To set to the first element of the collection again, you can call followed by . + If passes the end of the collection, the enumerator is positioned after the last element in the collection and returns `false`. When the enumerator is at this position, subsequent calls to also return `false`. If the last call to returns `false`, is undefined. To set to the first element of the collection again, you can call followed by . An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying, or deleting elements, the enumerator is irrecoverably invalidated and its behavior is undefined. diff --git a/xml/Microsoft.VisualBasic/Conversion.xml b/xml/Microsoft.VisualBasic/Conversion.xml index d06900f1efe..e0e21485404 100644 --- a/xml/Microsoft.VisualBasic/Conversion.xml +++ b/xml/Microsoft.VisualBasic/Conversion.xml @@ -2862,7 +2862,7 @@ Dim i3 As Integer = CInt(Fix(sng)) ' Result: 175 Use the `Format` function to convert numeric values you want formatted as dates, times, or currency or in other user-defined formats. Unlike the `Str` function, the `Format` function does not include a leading space for the sign of `Number`. > [!NOTE] -> The `Str` function recognizes only the period (`.`) as a valid decimal separator. If different decimal separators are used (for example, in international applications), use the `CStr` or `Format` functions to convert a number to a string. To get the string representation of a number in a particular culture, use the number's `ToString(IFormatProvider)` method. For example, use when converting a value of type `Double` to a string. +> The `Str` function recognizes only the period (`.`) as a valid decimal separator. If different decimal separators are used (for example, in international applications), use the `CStr` or `Format` functions to convert a number to a string. To get the string representation of a number in a particular culture, use the number's `ToString(IFormatProvider)` method. For example, use when converting a value of type `Double` to a string. @@ -2950,7 +2950,7 @@ Val("&HFFFF") ``` > [!NOTE] -> The `Val` function recognizes only the period (`.`) as a valid decimal separator. When different decimal separators are used, as in international applications, use `CDbl` or `CInt` instead to convert a string to a number. To convert the string representation of a number in a particular culture to a numeric value, use the numeric type's `Parse(String, IFormatProvider)` method. For example, use when converting a string to a `Double`. +> The `Val` function recognizes only the period (`.`) as a valid decimal separator. When different decimal separators are used, as in international applications, use `CDbl` or `CInt` instead to convert a string to a number. To convert the string representation of a number in a particular culture to a numeric value, use the numeric type's `Parse(String, IFormatProvider)` method. For example, use when converting a string to a `Double`. An exception might be thrown in response to certain uncommon number formats. For example, the following code raises this exception. @@ -3045,7 +3045,7 @@ Val("&HFFFF") ``` > [!NOTE] -> The `Val` function recognizes only the period (`.`) as a valid decimal separator. When other decimal separators are used, as in international applications, use `CDbl` or `CInt` instead to convert a string to a number. To convert the string representation of a number in a particular culture to a numeric value, use the numeric type's `Parse(String, IFormatProvider)` method. For example, use when converting a string to a `Double`. +> The `Val` function recognizes only the period (`.`) as a valid decimal separator. When other decimal separators are used, as in international applications, use `CDbl` or `CInt` instead to convert a string to a number. To convert the string representation of a number in a particular culture to a numeric value, use the numeric type's `Parse(String, IFormatProvider)` method. For example, use when converting a string to a `Double`. > [!NOTE] > An exception might be thrown in response to certain uncommon number formats. For example, the following code raises this exception. @@ -3141,7 +3141,7 @@ Val("&HFFFF") ``` > [!NOTE] -> The `Val` function recognizes only the period (`.`) as a valid decimal separator. When other decimal separators are used, as in international applications, use `CDbl` or `CInt` instead to convert a string to a number. To convert the string representation of a number in a particular culture to a numeric value, use the numeric type's `Parse(String, IFormatProvider)` method. For example, use when converting a string to a `Double`. +> The `Val` function recognizes only the period (`.`) as a valid decimal separator. When other decimal separators are used, as in international applications, use `CDbl` or `CInt` instead to convert a string to a number. To convert the string representation of a number in a particular culture to a numeric value, use the numeric type's `Parse(String, IFormatProvider)` method. For example, use when converting a string to a `Double`. > [!NOTE] > An exception might be raised in response to certain uncommon number formats. For example, the following code raises this exception. diff --git a/xml/Microsoft.VisualBasic/DateAndTime.xml b/xml/Microsoft.VisualBasic/DateAndTime.xml index 4da87b1b1b6..b3671b0bc8a 100644 --- a/xml/Microsoft.VisualBasic/DateAndTime.xml +++ b/xml/Microsoft.VisualBasic/DateAndTime.xml @@ -129,7 +129,7 @@ Dim NextMonth As Date = DateAdd(DateInterval.Month, 1, #1/31/1995#) In this example, `DateAdd` returns `#2/28/1995#`, not `#2/31/1995#`. If `DateValue` is `#1/31/1996#`, it returns `#2/29/1996#` because 1996 is a leap year. > [!NOTE] -> `DateAdd` uses the current calendar setting from the property of the class in the namespace. The default values are determined by **Control Panel** settings. +> `DateAdd` uses the current calendar setting from the property of the class in the namespace. The default values are determined by **Control Panel** settings. Since every `Date` value is supported by a structure, its methods give you additional options in adding time intervals. For example, you can add a fractional number of days, rounded to the nearest millisecond, to a `Date` variable as follows: @@ -243,7 +243,7 @@ Dim NextMonth As Date = DateAdd(DateInterval.Month, 1, #1/31/1995#) In this example, `DateAdd` returns `#2/28/1995#`, not `#2/31/1995#`. If `DateValue` is `#1/31/1996#`, it returns `#2/29/1996#` because 1996 is a leap year. > [!NOTE] -> `DateAdd` uses the current calendar setting from the property of the class in the namespace. The default values are determined by **Control Panel** settings. +> `DateAdd` uses the current calendar setting from the property of the class in the namespace. The default values are determined by **Control Panel** settings. Since every `Date` value is supported by a structure, its methods give you additional options in adding time intervals. For example, you can add a fractional number of days, rounded to the nearest millisecond, to a `Date` variable as follows: @@ -372,7 +372,7 @@ NextTime = NextTime.AddDays(3.4) ' Increment by 3 2/5 days. For cultures such as Japanese that have multiple eras, the `DateDiff` method does not return a difference in years if the difference spans two or more eras. Instead, you can calculate the difference in values returned by the property, as shown in the following example: `date2.Year - date1.Year`. -- **Other Intervals.** Since every `Date` value is supported by a structure, its methods give you additional options in finding time intervals. For example, you can use the `Subtract` method in either of its overloaded forms: subtracts a from a `Date` variable to return another `Date` value, and subtracts a `Date` value to return a . You can time a process to find out how many milliseconds it takes, as the following example shows. +- **Other Intervals.** Since every `Date` value is supported by a structure, its methods give you additional options in finding time intervals. For example, you can use the `Subtract` method in either of its overloaded forms: subtracts a from a `Date` variable to return another `Date` value, and subtracts a `Date` value to return a . You can time a process to find out how many milliseconds it takes, as the following example shows. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic/Conversion/Val/Class1.vb" id="Snippet61"::: @@ -518,7 +518,7 @@ NextTime = NextTime.AddDays(3.4) ' Increment by 3 2/5 days. For cultures such as Japanese that have multiple eras, the `DateDiff` method does not return a difference in years if the difference spans two or more eras. Instead, you can calculate the difference in values returned by the property, as shown in the following example: `date2.Year - date1.Year`. -- **Other Intervals.** Since every `Date` value is supported by a structure, its methods give you additional options in finding time intervals. For example, you can use the `Subtract` method in either of its overloaded forms: subtracts a from a `Date` variable to return another `Date` value, and subtracts a `Date` value to return a . You can time a process to find out how many milliseconds it takes, as the following example shows. +- **Other Intervals.** Since every `Date` value is supported by a structure, its methods give you additional options in finding time intervals. For example, you can use the `Subtract` method in either of its overloaded forms: subtracts a from a `Date` variable to return another `Date` value, and subtracts a `Date` value to return a . You can time a process to find out how many milliseconds it takes, as the following example shows. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic/Conversion/Val/Class1.vb" id="Snippet61"::: @@ -914,7 +914,7 @@ Dim EndFeb As Date = DateSerial(-10, 3, 0) The `Date` data type includes time components. `DateSerial` sets all of these to 0, so the returned value represents the beginning of the calculated day. - Since every `Date` value is supported by a structure, its methods give you additional options in assembling a `Date` value. For example, you can use one of the overloaded constructors to populate a `Date` variable using the desired combination of components. The following example sets `NewDateTime` to May 6, 1978 at one tenth of a second before 8:30 in the morning: + Since every `Date` value is supported by a structure, its methods give you additional options in assembling a `Date` value. For example, you can use one of the overloaded constructors to populate a `Date` variable using the desired combination of components. The following example sets `NewDateTime` to May 6, 1978 at one tenth of a second before 8:30 in the morning: ```vb Dim NewDateTime As Date = New Date(1978, 5, 6, 8, 29, 59, 900) @@ -987,7 +987,7 @@ Dim NewDateTime As Date = New Date(1978, 5, 6, 8, 29, 59, 900) To get or set the current system time as a `String`, use the property. - To get the current system date or time in the format of your locale, or in a custom format, supply the property to the function, specifying either a predefined or user-defined date/time format. The following example demonstrates this. + To get the current system date or time in the format of your locale, or in a custom format, supply the property to the function, specifying either a predefined or user-defined date/time format. The following example demonstrates this. ```vb MsgBox("The formatted date is " & Format(Now, "dddd, d MMM yyyy")) @@ -1055,7 +1055,7 @@ MsgBox("The formatted date is " & Format(Now, "dddd, d MMM yyyy")) property of the class in the namespace. The default values are determined by **Control Panel** settings. You can override the Short Date format by setting the property of the class in the namespace. + If `StringDate` includes only numbers from 1 through 12 separated by valid date separators, `DateValue` recognizes the order for month, day, and year according to the Short Date format specified for your system. `DateValue` uses the current calendar setting from the property of the class in the namespace. The default values are determined by **Control Panel** settings. You can override the Short Date format by setting the property of the class in the namespace. `DateValue` recognizes month names in long, abbreviated, and numeric form. For example, in addition to recognizing 12/30/1991 and 12/30/91, `DateValue` also recognizes December 30, 1991 and Dec 30, 1991. @@ -1392,7 +1392,7 @@ Dim thisDay As Integer = Microsoft.VisualBasic.DateAndTime.Day(Now) The string returned by `MonthName` depends not only on the input arguments, but also on the **Regional Options** settings specified in the Windows **Control Panel**. > [!NOTE] -> `MonthName` uses the current calendar setting from the property of the class in the namespace. The default values are determined by **Control Panel** settings. +> `MonthName` uses the current calendar setting from the property of the class in the namespace. The default values are determined by **Control Panel** settings. @@ -1721,7 +1721,7 @@ MsgBox(TimeSerial(23, 75, 0)) If the values of the arguments result in a negative calculated time, the date information is set to 1/1/0001 and the time information is adjusted to be between 00:00:00 and 23:59:59. However, if the calculated time is less than negative 24 hours, an error occurs. - Since every `Date` value is supported by a structure, its methods give you additional options in assembling a `Date` value. For example, you can employ one of the overloaded constructors to populate a `Date` variable using the desired combination of components. The following example sets `newDateTime` to May 6, 1978 at one tenth of a second before 8:30 in the morning: + Since every `Date` value is supported by a structure, its methods give you additional options in assembling a `Date` value. For example, you can employ one of the overloaded constructors to populate a `Date` variable using the desired combination of components. The following example sets `newDateTime` to May 6, 1978 at one tenth of a second before 8:30 in the morning: ```vb Dim newDateTime As Date = New Date(1978, 5, 6, 8, 29, 59, 900) @@ -1793,7 +1793,7 @@ Dim newDateTime As Date = New Date(1978, 5, 6, 8, 29, 59, 900) To get or set the current system date as a `String`, use the property. - To get the current system date or time in the format of your locale, or in a custom format, supply the property to the function, specifying either a predefined or user-defined date/time format. The following example demonstrates this. + To get the current system date or time in the format of your locale, or in a custom format, supply the property to the function, specifying either a predefined or user-defined date/time format. The following example demonstrates this. ```vb MsgBox("The formatted time is " & Format(Now, "hh.mm.ss.fff tt")) @@ -1996,7 +1996,7 @@ MsgBox("The formatted time is " & Format(Now, "hh.mm.ss.fff tt")) The value returned by the `Weekday` function corresponds to the values of the `FirstDayOfWeek` enumeration; that is, 1 indicates Sunday and 7 indicates Saturday. > [!NOTE] -> `Weekday` uses the current calendar setting from the property of the class in the namespace. The default values are determined by **Control Panel** settings. +> `Weekday` uses the current calendar setting from the property of the class in the namespace. The default values are determined by **Control Panel** settings. The `DayOfWeek` argument can have one of the following settings. @@ -2078,7 +2078,7 @@ MsgBox("The formatted time is " & Format(Now, "hh.mm.ss.fff tt")) The string returned by `WeekdayName` depends not only on the input arguments, but also on the **Regional Options** settings specified in the Windows **Control Panel**. > [!NOTE] -> `WeekdayName` uses the current calendar setting from the property of the class in the namespace. The default values are determined by **Control Panel** settings. +> `WeekdayName` uses the current calendar setting from the property of the class in the namespace. The default values are determined by **Control Panel** settings. The `FirstDayOfWeekValue` argument can have one of the following settings. diff --git a/xml/Microsoft.VisualBasic/DateInterval.xml b/xml/Microsoft.VisualBasic/DateInterval.xml index da93cff23a4..1ebefe1a0e9 100644 --- a/xml/Microsoft.VisualBasic/DateInterval.xml +++ b/xml/Microsoft.VisualBasic/DateInterval.xml @@ -29,13 +29,13 @@ Indicates how to determine and format date intervals when calling date-related functions. - method. - + method. + ]]> diff --git a/xml/Microsoft.VisualBasic/ErrObject.xml b/xml/Microsoft.VisualBasic/ErrObject.xml index e01d6504009..a5d723a5dc6 100644 --- a/xml/Microsoft.VisualBasic/ErrObject.xml +++ b/xml/Microsoft.VisualBasic/ErrObject.xml @@ -40,7 +40,7 @@ . + The `ErrObject` module supports the `Err` object. For more information, see . @@ -180,7 +180,7 @@ End If property corresponds to a Visual Basic run-time error, then the string returned by the function is set in the `Description` property when the error is generated. + The `Description` property setting consists of a short description of the error. Use this property to alert the user to an error that you cannot or do not want to handle. When generating a user-defined error, assign a short description of your error to the `Description` property. If the `Description` property is not filled in, and the value of the property corresponds to a Visual Basic run-time error, then the string returned by the function is set in the `Description` property when the error is generated. diff --git a/xml/Microsoft.VisualBasic/FileSystem.xml b/xml/Microsoft.VisualBasic/FileSystem.xml index 0e81c3b375d..14b873677bb 100644 --- a/xml/Microsoft.VisualBasic/FileSystem.xml +++ b/xml/Microsoft.VisualBasic/FileSystem.xml @@ -6767,7 +6767,7 @@ Result = GetAttr(FName) And vbArchive The leftmost print position on an output line is always 1. When you use the `Print` or `PrintLine` functions to print to files, the rightmost print position is the current width of the output file, which you can set using the `FileWidth` function. - The `TAB` function can also be used with the `WriteLine` function. It cannot be used with or . + The `TAB` function can also be used with the `WriteLine` function. It cannot be used with or . > [!NOTE] > Make sure your tabular columns are wide enough to contain wide letters. @@ -6838,7 +6838,7 @@ Result = GetAttr(FName) And vbArchive The leftmost print position on an output line is always 1. When you use the `Print` or `PrintLine` functions to print to files, the rightmost print position is the current width of the output file, which you can set using the `FileWidth` function. - The `TAB` function can also be used with the `WriteLine` function. It cannot be used with or . + The `TAB` function can also be used with the `WriteLine` function. It cannot be used with or . > [!NOTE] > Make sure your tabular columns are wide enough to contain wide letters. diff --git a/xml/Microsoft.VisualBasic/Interaction.xml b/xml/Microsoft.VisualBasic/Interaction.xml index 9ae7492bb74..8b326faaad1 100644 --- a/xml/Microsoft.VisualBasic/Interaction.xml +++ b/xml/Microsoft.VisualBasic/Interaction.xml @@ -115,7 +115,7 @@ procID = Shell("C:\Windows\system32\calc.exe", AppWinStyle.NormalFocus) method. + You use `AppActivate` to bring an application's active window into focus. You might not have a handle or a reference to the active window, or even know which window is active at a given moment. In such a case, you cannot use the method. The `AppActivate` function changes the focus to the named application or window but does not affect whether it is maximized or minimized. Focus moves away from the activated application window when the user takes some action to change the focus or close the window. You can use the `Shell` function to start an application and set the window style. @@ -187,7 +187,7 @@ procID = Shell("C:\Windows\system32\calc.exe", AppWinStyle.NormalFocus) method. + You use `AppActivate` to bring an application's active window into focus. You might not have a handle or a reference to the active window, or even know which window is active at a given moment. In such a case, you cannot use the method. The `AppActivate` function changes the focus to the named application or window but does not affect whether it is maximized or minimized. Focus moves away from the activated application window when the user takes some action to change the focus or close the window. You can use the `Shell` function to start an application and set the window style. @@ -620,7 +620,7 @@ End Sub > Use `CreateObject` when there is no current instance of the object. If an instance of the object is already running, a new instance is started, and an object of the specified type is created. To use the current instance, or to start the application and have it load a file, use the `GetObject` function. If an object has registered itself as a single-instance object, only one instance of the object is created, no matter how many times `CreateObject` is executed. ## Creating Framework Objects - You can use the `CreateObject` function only to create a COM object. While there is no exact equivalent mechanism for creating a .NET Framework object, the in the namespace contains methods to create local or remote objects. In particular, the method or the method might be useful. + You can use the `CreateObject` function only to create a COM object. While there is no exact equivalent mechanism for creating a .NET Framework object, the in the namespace contains methods to create local or remote objects. In particular, the method or the method might be useful. > [!IMPORTANT] > The `CreateObject` function requires unmanaged code permission, which might affect its execution in partial-trust situations. For more information, see and [Code Access Permissions](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/h846e9b3(v=vs.100)). @@ -779,17 +779,17 @@ End Sub function returns the text assigned to the specified environment string - that is, the text following the equal sign (=) in the environment-string table for that environment variable. If the string in `Expression` cannot be found in the environment-string table, a zero-length string ("") is returned. + If `Expression` contains a string, the function returns the text assigned to the specified environment string - that is, the text following the equal sign (=) in the environment-string table for that environment variable. If the string in `Expression` cannot be found in the environment-string table, a zero-length string ("") is returned. - If `Expression` contains an integer, the string occupying that numeric position in the environment-string table is returned. In this case, returns all of the text, including the name of the environment variable. If there is no environment string in the specified position, returns a zero-length string. + If `Expression` contains an integer, the string occupying that numeric position in the environment-string table is returned. In this case, returns all of the text, including the name of the environment variable. If there is no environment string in the specified position, returns a zero-length string. > [!IMPORTANT] -> The function requires environment permission, which might affect its execution in partial-trust situations. For more information, see and [Code Access Permissions](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/h846e9b3(v=vs.100)). +> The function requires environment permission, which might affect its execution in partial-trust situations. For more information, see and [Code Access Permissions](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/h846e9b3(v=vs.100)). ## Examples - This example uses the function to supply the entry number and length of the `PATH` statement from the environment-string table. + This example uses the function to supply the entry number and length of the `PATH` statement from the environment-string table. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic/Conversion/ErrorToString/Class1.vb" id="Snippet28"::: @@ -848,17 +848,17 @@ End Sub function returns the text assigned to the specified environment string - that is, the text following the equal sign (=) in the environment-string table for that environment variable. If the string in `Expression` cannot be found in the environment-string table, a zero-length string ("") is returned. + If `Expression` contains a string, the function returns the text assigned to the specified environment string - that is, the text following the equal sign (=) in the environment-string table for that environment variable. If the string in `Expression` cannot be found in the environment-string table, a zero-length string ("") is returned. - If `Expression` contains an integer, the string occupying that numeric position in the environment-string table is returned. In this case, returns all of the text, including the name of the environment variable. If there is no environment string in the specified position, returns a zero-length string. + If `Expression` contains an integer, the string occupying that numeric position in the environment-string table is returned. In this case, returns all of the text, including the name of the environment variable. If there is no environment string in the specified position, returns a zero-length string. > [!IMPORTANT] -> The function requires environment permission, which might affect its execution in partial-trust situations. For more information, see and [Code Access Permissions](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/h846e9b3(v=vs.100)). +> The function requires environment permission, which might affect its execution in partial-trust situations. For more information, see and [Code Access Permissions](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/h846e9b3(v=vs.100)). ## Examples - This example uses the function to supply the entry number and length of the `PATH` statement from the environment-string table. + This example uses the function to supply the entry number and length of the `PATH` statement from the environment-string table. :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic/Conversion/ErrorToString/Class1.vb" id="Snippet28"::: @@ -1059,7 +1059,7 @@ drawObj.SaveAs("C:\Drawings\sample.drw") ``` > [!NOTE] -> Use the `GetObject` function when there is a current instance of the object or if you want to create the object with a file loaded. If there is no current instance, and you do not want the object started with a file loaded, use the function. +> Use the `GetObject` function when there is a current instance of the object or if you want to create the object with a file loaded. If there is no current instance, and you do not want the object started with a file loaded, use the function. > > If an object has registered itself as an ActiveX single-instance object, only one instance of the object is created, no matter how many times `CreateObject` is called. With a single-instance object, `GetObject` always returns the same instance when called with the zero-length string (`""`) syntax, and it causes an error if the `PathName` argument is omitted. You cannot use `GetObject` to obtain a reference to a class created with Visual Basic. diff --git a/xml/Microsoft.VisualBasic/OpenMode.xml b/xml/Microsoft.VisualBasic/OpenMode.xml index 43fc2337376..e66c5e70638 100644 --- a/xml/Microsoft.VisualBasic/OpenMode.xml +++ b/xml/Microsoft.VisualBasic/OpenMode.xml @@ -29,19 +29,19 @@ Indicates how to open a file when calling file-access functions. - method. - - When sequentially accessing a file, you cannot change its data. You can read the data, append to it, or overwrite it with new data. If you open it for input, the contents of the file will be overwritten, even if you do not directly write to the file. - - When performing file I/O operations, the `My.Computer.FileSystem` object provides better performance and ease of use than earlier file I/O methods. For more information, see object. - + method. + + When sequentially accessing a file, you cannot change its data. You can read the data, append to it, or overwrite it with new data. If you open it for input, the contents of the file will be overwritten, even if you do not directly write to the file. + + When performing file I/O operations, the `My.Computer.FileSystem` object provides better performance and ease of use than earlier file I/O methods. For more information, see object. + ]]> diff --git a/xml/Microsoft.VisualBasic/SpcInfo.xml b/xml/Microsoft.VisualBasic/SpcInfo.xml index e33b1e7f553..c485eeac64b 100644 --- a/xml/Microsoft.VisualBasic/SpcInfo.xml +++ b/xml/Microsoft.VisualBasic/SpcInfo.xml @@ -37,13 +37,13 @@ This class supports the Visual Basic and functions. - and . - + and . + ]]> @@ -83,13 +83,13 @@ This field supports the Visual Basic and functions. - and . - + and . + ]]> diff --git a/xml/Microsoft.VisualBasic/Strings.xml b/xml/Microsoft.VisualBasic/Strings.xml index 34af5655721..172c302bd1d 100644 --- a/xml/Microsoft.VisualBasic/Strings.xml +++ b/xml/Microsoft.VisualBasic/Strings.xml @@ -387,7 +387,7 @@ `Chr` uses the class in the namespace to determine if the current thread is using a single-byte character set (SBCS) or a double-byte character set (DBCS). It then takes `CharCode` as a code point in the appropriate set. The range can be 0 through 255 for SBCS characters and -32768 through 65535 for DBCS characters. - The returned value depends on the code page for the current thread, which is contained in the property of the class in the namespace. You can obtain by specifying `System.Globalization.CultureInfo.CurrentCulture.TextInfo.ANSICodePage`. + The returned value depends on the code page for the current thread, which is contained in the property of the class in the namespace. You can obtain by specifying `System.Globalization.CultureInfo.CurrentCulture.TextInfo.ANSICodePage`. `ChrW` takes `CharCode` as a Unicode code point. The range is independent of the culture and code page settings for the current thread. Values from -32768 through -1 are treated the same as values in the range +32768 through +65535. @@ -461,7 +461,7 @@ `Chr` uses the class in the namespace to determine if the current thread is using a single-byte character set (SBCS) or a double-byte character set (DBCS). It then takes `CharCode` as a code point in the appropriate set. The range can be 0 through 255 for SBCS characters and -32768 through 65535 for DBCS characters. - The returned value depends on the code page for the current thread, which is contained in the property of the class in the namespace. You can obtain by specifying `System.Globalization.CultureInfo.CurrentCulture.TextInfo.ANSICodePage`. + The returned value depends on the code page for the current thread, which is contained in the property of the class in the namespace. You can obtain by specifying `System.Globalization.CultureInfo.CurrentCulture.TextInfo.ANSICodePage`. `ChrW` takes `CharCode` as a Unicode code point. The range is independent of the culture and code page settings for the current thread. Values from -32768 through -1 are treated the same as values in the range +32768 through +65535. @@ -736,7 +736,7 @@ method also provides similar functionality. + The method also provides similar functionality. If you are formatting a nonlocalized numeric string, you should use a user-defined numeric format to ensure that you get the look you want. @@ -1046,7 +1046,7 @@ The `Date` data type always contains both date and time information. For purposes of type conversion, Visual Basic considers 1/1/1 (January 1 of the year 1) to be a neutral value for the date, and 00:00:00 (midnight) to be a neutral value for the time. If you format a `Date` value as a date/time string, `FormatDateTime` does not include neutral values in the resulting string. For example, if you convert #1/1/0001 9:30:00# to a string, the result is "9:30:00 AM"; the date information is suppressed. However, the date information is still present in the original `Date` value and can be recovered with functions such as `DatePart`. > [!NOTE] -> If you pass the `Expression` argument as a `String` literal, `FormatDateTime` interprets it according to the setting of your application. However, if you pass it as a `Date` literal, use the format #mm/dd/yyyy#, because `FormatDateTime` always interprets a `Date` literal according to the English (US) culture. This is necessary because, if an application is developed and coded using `Date` literals from one culture, but is then executed on a platform with a different culture, the `Date` literals could be parsed incorrectly. +> If you pass the `Expression` argument as a `String` literal, `FormatDateTime` interprets it according to the setting of your application. However, if you pass it as a `Date` literal, use the format #mm/dd/yyyy#, because `FormatDateTime` always interprets a `Date` literal according to the English (US) culture. This is necessary because, if an application is developed and coded using `Date` literals from one culture, but is then executed on a platform with a different culture, the `Date` literals could be parsed incorrectly. The `NamedFormat` argument has the following settings. @@ -1869,7 +1869,7 @@ This function uses the application's culture information when manipulating the string so that the case changes are appropriate for the locale in which the application is being used. > [!IMPORTANT] -> If your application makes security decisions based on the result of a comparison or case-change operation, then the operation should use the method, and pass or for the `comparisonType` argument. For more information, see [How Culture Affects Strings in Visual Basic](/dotnet/visual-basic/programming-guide/language-features/strings/how-culture-affects-strings). +> If your application makes security decisions based on the result of a comparison or case-change operation, then the operation should use the method, and pass or for the `comparisonType` argument. For more information, see [How Culture Affects Strings in Visual Basic](/dotnet/visual-basic/programming-guide/language-features/strings/how-culture-affects-strings). @@ -1938,7 +1938,7 @@ This function uses the application's culture information when manipulating the string so that the case changes are appropriate for the locale in which the application is being used. > [!IMPORTANT] -> If your application makes security decisions based on the result of a comparison or case-change operation, then the operation should use the method, and pass or for the `comparisonType` argument. For more information, see [How Culture Affects Strings in Visual Basic](/dotnet/visual-basic/programming-guide/language-features/strings/how-culture-affects-strings). +> If your application makes security decisions based on the result of a comparison or case-change operation, then the operation should use the method, and pass or for the `comparisonType` argument. For more information, see [How Culture Affects Strings in Visual Basic](/dotnet/visual-basic/programming-guide/language-features/strings/how-culture-affects-strings). @@ -3476,7 +3476,7 @@ ## Examples - The first two `Mid` functions in this example return the specified number of characters from a string, starting from the given positions. (The last function illustrates the overload and only specifies the starting point for the string extraction.) + The first two `Mid` functions in this example return the specified number of characters from a string, starting from the given positions. (The last function illustrates the overload and only specifies the starting point for the string extraction.) :::code language="vb" source="~/snippets/visualbasic/Microsoft.VisualBasic/Conversion/Overview/Class1.vb" id="Snippet17"::: @@ -4089,7 +4089,7 @@ Dim aString As String = Replace(TestString, "o", "i") This function uses the application's culture information when manipulating the string so that the case changes are appropriate for the locale in which the application is being used. > [!IMPORTANT] -> If your application makes security decisions based on the result of a comparison or case-change operation, then the operation should use the method, and pass or for the `comparisonType` argument. For more information, see [How Culture Affects Strings in Visual Basic](/dotnet/visual-basic/programming-guide/language-features/strings/how-culture-affects-strings). +> If your application makes security decisions based on the result of a comparison or case-change operation, then the operation should use the method, and pass or for the `comparisonType` argument. For more information, see [How Culture Affects Strings in Visual Basic](/dotnet/visual-basic/programming-guide/language-features/strings/how-culture-affects-strings). The `Conversion` argument settings are: @@ -4525,7 +4525,7 @@ For more information about how .NET divides a string instance into text elements This function uses the application's culture information when manipulating the string so that the case changes are appropriate for the locale in which the application is being used. > [!IMPORTANT] -> If your application makes security decisions based on the result of a comparison or case-change operation, then the operation should use the method, and pass or for the `comparisonType` argument. For more information, see [How Culture Affects Strings in Visual Basic](/dotnet/visual-basic/programming-guide/language-features/strings/how-culture-affects-strings). +> If your application makes security decisions based on the result of a comparison or case-change operation, then the operation should use the method, and pass or for the `comparisonType` argument. For more information, see [How Culture Affects Strings in Visual Basic](/dotnet/visual-basic/programming-guide/language-features/strings/how-culture-affects-strings). @@ -4596,7 +4596,7 @@ For more information about how .NET divides a string instance into text elements This function uses the application's culture information when manipulating the string so that the case changes are appropriate for the locale in which the application is being used. > [!IMPORTANT] -> If your application makes security decisions based on the result of a comparison or case-change operation, then the operation should use the method, and pass or for the `comparisonType` argument. For more information, see [How Culture Affects Strings in Visual Basic](/dotnet/visual-basic/programming-guide/language-features/strings/how-culture-affects-strings). +> If your application makes security decisions based on the result of a comparison or case-change operation, then the operation should use the method, and pass or for the `comparisonType` argument. For more information, see [How Culture Affects Strings in Visual Basic](/dotnet/visual-basic/programming-guide/language-features/strings/how-culture-affects-strings). diff --git a/xml/Microsoft.VisualBasic/TabInfo.xml b/xml/Microsoft.VisualBasic/TabInfo.xml index 5338b640330..4d3fbb12dc1 100644 --- a/xml/Microsoft.VisualBasic/TabInfo.xml +++ b/xml/Microsoft.VisualBasic/TabInfo.xml @@ -37,13 +37,13 @@ This class supports the Visual Basic and functions. - and . - + and . + ]]> @@ -83,13 +83,13 @@ This field supports the Visual Basic and functions. - and . - + and . + ]]> diff --git a/xml/Microsoft.VisualBasic/VBCodeProvider.xml b/xml/Microsoft.VisualBasic/VBCodeProvider.xml index e53d60df88a..9b63469d517 100644 --- a/xml/Microsoft.VisualBasic/VBCodeProvider.xml +++ b/xml/Microsoft.VisualBasic/VBCodeProvider.xml @@ -359,7 +359,7 @@ In .NET Framework apps, you can obtain the value for `providerOptions` from the ## Examples - The following code example shows the use of the method to create a code fragment to be used in a CodeDOM graph. This code example is part of a larger example provided for the method of the class. + The following code example shows the use of the method to create a code fragment to be used in a CodeDOM graph. This code example is part of a larger example provided for the method of the class. :::code language="csharp" source="~/snippets/csharp/Microsoft.CSharp/CSharpCodeProvider/GenerateCodeFromMember/program.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/Microsoft.CSharp/CSharpCodeProvider/GenerateCodeFromMember/module1.vb" id="Snippet3"::: diff --git a/xml/Microsoft.VisualC.StlClr.Generic/ReverseBidirectionalIterator`1.xml b/xml/Microsoft.VisualC.StlClr.Generic/ReverseBidirectionalIterator`1.xml index d84bcae56b9..bd1c4b4a3ff 100644 --- a/xml/Microsoft.VisualC.StlClr.Generic/ReverseBidirectionalIterator`1.xml +++ b/xml/Microsoft.VisualC.StlClr.Generic/ReverseBidirectionalIterator`1.xml @@ -40,11 +40,11 @@ The type of an element in the controlled sequence. Defines an iterator that accesses elements in a container in the reverse direction. Elements can be accessed in the forward direction by using the decrement operator and in the backward direction by using the increment operator. The element that the iterator points to can be both written to and read from any number of times. Reverse bidirectional iterators can be used anywhere that a reverse input or reverse output iterator is required. - @@ -501,7 +501,7 @@ if the two iterators are the same object; otherwise, . - ]]> + ]]> diff --git a/xml/Microsoft.Win32.SafeHandles/CriticalHandleMinusOneIsInvalid.xml b/xml/Microsoft.Win32.SafeHandles/CriticalHandleMinusOneIsInvalid.xml index 97224586fcd..2ffe97860d8 100644 --- a/xml/Microsoft.Win32.SafeHandles/CriticalHandleMinusOneIsInvalid.xml +++ b/xml/Microsoft.Win32.SafeHandles/CriticalHandleMinusOneIsInvalid.xml @@ -56,7 +56,7 @@ ## Remarks This class derives from the class. It describes the format of an invalid handle that uses a value of -1. Further derivations of this class (for example, file or registry handles) can specialize this further. - This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. + This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. > [!NOTE] > See the class for important information on critical handle security and thread safety. diff --git a/xml/Microsoft.Win32.SafeHandles/CriticalHandleZeroOrMinusOneIsInvalid.xml b/xml/Microsoft.Win32.SafeHandles/CriticalHandleZeroOrMinusOneIsInvalid.xml index 62b1a64db06..69693f5f286 100644 --- a/xml/Microsoft.Win32.SafeHandles/CriticalHandleZeroOrMinusOneIsInvalid.xml +++ b/xml/Microsoft.Win32.SafeHandles/CriticalHandleZeroOrMinusOneIsInvalid.xml @@ -58,7 +58,7 @@ Use the class when you need to wrap an unmanaged resource that does not have an existing managed wrapper. - This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. + This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. > [!NOTE] > See the class for important information on critical handle security and thread safety. diff --git a/xml/Microsoft.Win32.SafeHandles/SafeFileHandle.xml b/xml/Microsoft.Win32.SafeHandles/SafeFileHandle.xml index dcb1612f2a9..bfe137506e9 100644 --- a/xml/Microsoft.Win32.SafeHandles/SafeFileHandle.xml +++ b/xml/Microsoft.Win32.SafeHandles/SafeFileHandle.xml @@ -91,7 +91,7 @@ This class is derived from . A value of 0 or -1 is an invalid file handle. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. diff --git a/xml/Microsoft.Win32.SafeHandles/SafeHandleMinusOneIsInvalid.xml b/xml/Microsoft.Win32.SafeHandles/SafeHandleMinusOneIsInvalid.xml index c68008614d4..efb5c39f026 100644 --- a/xml/Microsoft.Win32.SafeHandles/SafeHandleMinusOneIsInvalid.xml +++ b/xml/Microsoft.Win32.SafeHandles/SafeHandleMinusOneIsInvalid.xml @@ -57,7 +57,7 @@ This class derives from the class. It describes the format of an invalid handle that uses a value of -1. Further derivations of this class (for example, file or registry handles) can specialize this further. See the class for an example of a class that derives from . > [!WARNING] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`-`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`-`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. ]]> diff --git a/xml/Microsoft.Win32.SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.xml b/xml/Microsoft.Win32.SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.xml index a2ccee0cccd..52bd44e5bdc 100644 --- a/xml/Microsoft.Win32.SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.xml +++ b/xml/Microsoft.Win32.SafeHandles/SafeHandleZeroOrMinusOneIsInvalid.xml @@ -57,7 +57,7 @@ This class derives from the class. It describes the format of an invalid handle. For example, some handles use -1 as an invalid handle value, while others use 0. Further derivations of this class (for example, file or registry handles) can specialize this further. See the class for an example of a class that derives from . > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. Use the class whenever you need to safely wrap an unmanaged resource that does not have an existing managed wrapper. diff --git a/xml/Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.xml b/xml/Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.xml index 2a78380cec6..6ef31aa4f2d 100644 --- a/xml/Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.xml +++ b/xml/Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.xml @@ -63,7 +63,7 @@ Use the property to obtain the safe handle. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. ]]> diff --git a/xml/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.xml b/xml/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.xml index 15ac8cec37b..187f328c5fc 100644 --- a/xml/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.xml +++ b/xml/Microsoft.Win32.SafeHandles/SafeMemoryMappedViewHandle.xml @@ -57,7 +57,7 @@ Use the property to obtain the safe handle. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. ]]> diff --git a/xml/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.xml b/xml/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.xml index b7280eb2d84..777de9110eb 100644 --- a/xml/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.xml +++ b/xml/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.xml @@ -60,7 +60,7 @@ This class should be used when working with native code that expects an NCRYPT_KEY_HANDLE. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. ]]> diff --git a/xml/Microsoft.Win32.SafeHandles/SafeNCryptProviderHandle.xml b/xml/Microsoft.Win32.SafeHandles/SafeNCryptProviderHandle.xml index 59ff954b088..e712e5e819c 100644 --- a/xml/Microsoft.Win32.SafeHandles/SafeNCryptProviderHandle.xml +++ b/xml/Microsoft.Win32.SafeHandles/SafeNCryptProviderHandle.xml @@ -60,7 +60,7 @@ This class should be used when working with native code that expects an NCRYPT_PROV_HANDLE. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. ]]> diff --git a/xml/Microsoft.Win32.SafeHandles/SafeNCryptSecretHandle.xml b/xml/Microsoft.Win32.SafeHandles/SafeNCryptSecretHandle.xml index 51a58f6336d..59dd8db07a9 100644 --- a/xml/Microsoft.Win32.SafeHandles/SafeNCryptSecretHandle.xml +++ b/xml/Microsoft.Win32.SafeHandles/SafeNCryptSecretHandle.xml @@ -60,7 +60,7 @@ This class should be used when working with native code that expects an NCRYPT_SECRET_HANDLE. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. ]]> diff --git a/xml/Microsoft.Win32.SafeHandles/SafePipeHandle.xml b/xml/Microsoft.Win32.SafeHandles/SafePipeHandle.xml index e79ee91c050..5d546357423 100644 --- a/xml/Microsoft.Win32.SafeHandles/SafePipeHandle.xml +++ b/xml/Microsoft.Win32.SafeHandles/SafePipeHandle.xml @@ -64,7 +64,7 @@ This class is derived from . A value of 0 or -1 is an invalid pipe handle. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. ]]> diff --git a/xml/Microsoft.Win32.SafeHandles/SafeProcessHandle.xml b/xml/Microsoft.Win32.SafeHandles/SafeProcessHandle.xml index de124d279db..f991a2136a0 100644 --- a/xml/Microsoft.Win32.SafeHandles/SafeProcessHandle.xml +++ b/xml/Microsoft.Win32.SafeHandles/SafeProcessHandle.xml @@ -135,7 +135,7 @@ ## Remarks > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. ]]> diff --git a/xml/Microsoft.Win32.SafeHandles/SafeRegistryHandle.xml b/xml/Microsoft.Win32.SafeHandles/SafeRegistryHandle.xml index 7e0e9e3fdce..22fced5cc4d 100644 --- a/xml/Microsoft.Win32.SafeHandles/SafeRegistryHandle.xml +++ b/xml/Microsoft.Win32.SafeHandles/SafeRegistryHandle.xml @@ -46,10 +46,10 @@ object, and then use it to create registry keys with the method. + You can use platform invoke on the native `RegCreateKeyEx` Windows function to obtain a object, and then use it to create registry keys with the method. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. ]]> diff --git a/xml/Microsoft.Win32.SafeHandles/SafeWaitHandle.xml b/xml/Microsoft.Win32.SafeHandles/SafeWaitHandle.xml index aaa599a729f..109863f88a0 100644 --- a/xml/Microsoft.Win32.SafeHandles/SafeWaitHandle.xml +++ b/xml/Microsoft.Win32.SafeHandles/SafeWaitHandle.xml @@ -78,7 +78,7 @@ The class is used by the class. It is a wrapper for Win32 mutexes and auto and manual reset events. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). ## Examples diff --git a/xml/Microsoft.Win32/CommonDialog.xml b/xml/Microsoft.Win32/CommonDialog.xml index 35ff1f8b97a..db69480b764 100644 --- a/xml/Microsoft.Win32/CommonDialog.xml +++ b/xml/Microsoft.Win32/CommonDialog.xml @@ -137,7 +137,7 @@ handles dialog initialization by centering the dialog window, relative to the screen, and to set focus to the default control. + handles dialog initialization by centering the dialog window, relative to the screen, and to set focus to the default control. ]]> @@ -229,7 +229,7 @@ performs initialization tasks for all common dialogs before calling . Since requires an owner window, attempts to assign one in the following order of precedence: + performs initialization tasks for all common dialogs before calling . Since requires an owner window, attempts to assign one in the following order of precedence: - The current application's *active window*. @@ -278,7 +278,7 @@ performs initialization tasks for all common dialogs before calling . + performs initialization tasks for all common dialogs before calling . In the current implementation, the derived classes ( and ) will only return `true` or `false`. @@ -326,7 +326,7 @@ performs initialization tasks for all common dialogs before calling . Additionally, the dialog that is eventually shown is assigned an owner window, which is specified by the `owner` parameter. + performs initialization tasks for all common dialogs before calling . Additionally, the dialog that is eventually shown is assigned an owner window, which is specified by the `owner` parameter. In the current implementation, the derived classes ( and ) will only return `true` or `false`. diff --git a/xml/Microsoft.Win32/FileDialog.xml b/xml/Microsoft.Win32/FileDialog.xml index f65cbaeaea9..dada7e10f44 100644 --- a/xml/Microsoft.Win32/FileDialog.xml +++ b/xml/Microsoft.Win32/FileDialog.xml @@ -267,7 +267,7 @@ Open and save file dialog boxes have a **Favorite Links** panel on the left side ## Remarks The extension string must contain the leading period. For example, set the property to ".txt" to select all text files. - By default, the property attempts to determine the extension to filter the displayed file list from the property. If the extension cannot be determined from the property, will be used instead. + By default, the property attempts to determine the extension to filter the displayed file list from the property. If the extension cannot be determined from the property, will be used instead. @@ -353,7 +353,7 @@ Open and save file dialog boxes have a **Favorite Links** panel on the left side is greater than one) then contains the first selected file name. If no file name is selected, this property contains rather than `null`. + If more than one file name is selected (length of is greater than one) then contains the first selected file name. If no file name is selected, this property contains rather than `null`. ]]> @@ -462,7 +462,7 @@ Open and save file dialog boxes have a **Favorite Links** panel on the left side is either `null` or , all files are displayed, and folders are always displayed. + If is either `null` or , all files are displayed, and folders are always displayed. You can specify a subset of file types to be displayed by setting the property. Each file type can represent a specific type of file, such as the following: @@ -510,7 +510,7 @@ Open and save file dialog boxes have a **Favorite Links** panel on the left side - "*.\*" - The following are complete examples of valid string values: + The following are complete examples of valid string values: - `Word Documents|*.doc` @@ -528,7 +528,7 @@ Open and save file dialog boxes have a **Favorite Links** panel on the left side ![Using the FileDialog.Filter in the Open Dialog Box](~/add/media/filedialogfilterfigure1.png "Using the FileDialog.Filter in the Open Dialog Box") - The user can choose a file type from this list to filter by. By default, the first item in the list (for example, the first file type) is selected when the or is displayed. To specify that another file type to be selected, you set the property before showing the or (by calling ). + The user can choose a file type from this list to filter by. By default, the first item in the list (for example, the first file type) is selected when the or is displayed. To specify that another file type to be selected, you set the property before showing the or (by calling ). @@ -720,9 +720,9 @@ Open and save file dialog boxes have a **Favorite Links** panel on the left side raises the event. + raises the event. - A type that derives from may override . The overridden method must call on the base class if needs to be raised. + A type that derives from may override . The overridden method must call on the base class if needs to be raised. ]]> @@ -944,9 +944,9 @@ Open and save file dialog boxes have a **Favorite Links** panel on the left side with all path information removed. Removing the paths makes the value appropriate for use in partial trust applications, since it prevents applications from discovering information about the local file system. + This value is the with all path information removed. Removing the paths makes the value appropriate for use in partial trust applications, since it prevents applications from discovering information about the local file system. - If more than one file name is selected (length of is greater than one) then this property contains only the first selected file name. + If more than one file name is selected (length of is greater than one) then this property contains only the first selected file name. See [Safe File Upload from an XBAP Sample](/previous-versions/dotnet/netframework-3.5/aa358504(v=vs.90)). @@ -990,7 +990,7 @@ Open and save file dialog boxes have a **Favorite Links** panel on the left side . + See . ]]> @@ -1028,7 +1028,7 @@ Open and save file dialog boxes have a **Favorite Links** panel on the left side is null or , a default, localized value is used, such as "Save As" or "Open". + If is null or , a default, localized value is used, such as "Save As" or "Open". ]]> diff --git a/xml/Microsoft.Win32/IntranetZoneCredentialPolicy.xml b/xml/Microsoft.Win32/IntranetZoneCredentialPolicy.xml index ba9f2557551..c3801d56d21 100644 --- a/xml/Microsoft.Win32/IntranetZoneCredentialPolicy.xml +++ b/xml/Microsoft.Win32/IntranetZoneCredentialPolicy.xml @@ -29,7 +29,7 @@ > [!NOTE] > policies are invoked only if the or the that is associated with the request has credentials that are not `null`. Setting this policy has no effect on requests that do not specify credentials. - Use the property to set the policy. The that handles authentication for the request will invoke the method before performing the authentication. If the requested resource is in a different domain than the client, the method returns `false`, and authentication is not performed. + Use the property to set the policy. The that handles authentication for the request will invoke the method before performing the authentication. If the requested resource is in a different domain than the client, the method returns `false`, and authentication is not performed. This policy affects all instances of with non-null credentials in the current application domain. The policy cannot be overridden on individual requests. diff --git a/xml/Microsoft.Win32/Registry.xml b/xml/Microsoft.Win32/Registry.xml index 50e429b2c10..902bd0896d2 100644 --- a/xml/Microsoft.Win32/Registry.xml +++ b/xml/Microsoft.Win32/Registry.xml @@ -50,7 +50,7 @@ For more information about this API, see Microsoft.Win32.Registry class. method to create an instance of the particular subkey of interest. You can then use other operations in `RegistryKey` to manipulate that key. +The following code example demonstrates how to retrieve the subkeys of the `HKEY_USERS` key and print their names to the screen. Use the method to create an instance of the particular subkey of interest. You can then use other operations in `RegistryKey` to manipulate that key. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic Registry.Users Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/Registry/Overview/source.cs" id="Snippet1"::: @@ -108,7 +108,7 @@ The following code example stores values of several data types in an example key Both conventional applications and OLE applications use data that is stored under this key. This key also provides backward compatibility with the Windows 3.1 registration database by storing information for DDE and OLE support. File viewers and user interface extensions store their OLE class identifiers in this key, and processing servers are registered in this key. ## Examples - The following example demonstrates how to retrieve the subkeys of this key, and prints their names to the screen. Use the method to create an instance of the particular subkey of interest. You can then use other operations in to manipulate that key. + The following example demonstrates how to retrieve the subkeys of this key, and prints their names to the screen. Use the method to create an instance of the particular subkey of interest. You can then use other operations in to manipulate that key. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic Registry.ClassesRoot Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/Registry/ClassesRoot/source.cs" id="Snippet1"::: @@ -162,7 +162,7 @@ The following code example stores values of several data types in an example key ## Examples - The following example demonstrates how to retrieve the subkeys of this key, and prints their names to the screen. Use the method to create an instance of the particular subkey of interest. You can then use other operations in to manipulate that key. + The following example demonstrates how to retrieve the subkeys of this key, and prints their names to the screen. Use the method to create an instance of the particular subkey of interest. You can then use other operations in to manipulate that key. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic Registry.CurrentConfig Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/Registry/CurrentConfig/source.cs" id="Snippet1"::: @@ -214,7 +214,7 @@ The following code example stores values of several data types in an example key ## Examples - The following example demonstrates how to retrieve the subkeys of this key, and prints their names to the screen. Use the method to create an instance of the particular subkey of interest. You can then use other operations in to manipulate that key. + The following example demonstrates how to retrieve the subkeys of this key, and prints their names to the screen. Use the method to create an instance of the particular subkey of interest. You can then use other operations in to manipulate that key. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic Registry.CurrentUser Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/Registry/CurrentUser/source.cs" id="Snippet1"::: @@ -322,12 +322,12 @@ The following code example stores values of several data types in an example key Valid root names are HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_CLASSES_ROOT, HKEY_USERS, HKEY_PERFORMANCE_DATA, HKEY_CURRENT_CONFIG, and HKEY_DYN_DATA. For example, in Visual Basic the string "HKEY_CURRENT_USER\MyTestKey" accesses key/value pairs for the subkey "MyTestKey" in the HKEY_CURRENT_USER root. - When the method retrieves expandable string values (), it expands environment strings using data from the local environment. If a value containing expandable references to environment variables has been stored as a string (), rather than as an expandable string (), does not expand it. You can expand such a string after it has been retrieved by calling the method. + When the method retrieves expandable string values (), it expands environment strings using data from the local environment. If a value containing expandable references to environment variables has been stored as a string (), rather than as an expandable string (), does not expand it. You can expand such a string after it has been retrieved by calling the method. > [!NOTE] -> The recommended way to retrieve data from HKEY_PERFORMANCE_DATA is to use the class rather than the method. +> The recommended way to retrieve data from HKEY_PERFORMANCE_DATA is to use the class rather than the method. - The and methods open and close registry keys each time they are used, so they do not perform as well as the methods of the class if you access a large number of values. + The and methods open and close registry keys each time they are used, so they do not perform as well as the methods of the class if you access a large number of values. also provides methods that allow you to add an access control list (ACL) to a registry key, to test the data type of a value before retrieving it, and to delete keys. @@ -405,7 +405,7 @@ The following code example stores values of several data types in an example key ## Examples - The following example demonstrates how to retrieve the subkeys of this key, and prints their names to the screen. Use the method to create an instance of the particular subkey of interest. You can then use other operations in to manipulate that key. + The following example demonstrates how to retrieve the subkeys of this key, and prints their names to the screen. Use the method to create an instance of the particular subkey of interest. You can then use other operations in to manipulate that key. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic Registry.LocalMachine Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/Registry/LocalMachine/source.cs" id="Snippet1"::: @@ -456,9 +456,9 @@ The following code example stores values of several data types in an example key Although you use the registry to collect performance data, the data is not stored in the registry database. Instead, accessing the registry with this key causes the system to collect the data from the appropriate system object managers. - To obtain performance data from the local system, use the method, with the Registry.PerformanceData key. The first call opens the key (you do not need to explicitly open the key first). However, be sure to use the method to close the handle to the key when you are finished obtaining performance data. The user cannot install or remove a software component while its performance data is in use. + To obtain performance data from the local system, use the method, with the Registry.PerformanceData key. The first call opens the key (you do not need to explicitly open the key first). However, be sure to use the method to close the handle to the key when you are finished obtaining performance data. The user cannot install or remove a software component while its performance data is in use. - To obtain performance data from a remote system, you must use the method, with the computer name of the remote system and the Registry.PerformanceData key. This call retrieves a key representing the performance data for the remote system. To retrieve the data, call using this key, rather than the Registry.PerformanceData key. + To obtain performance data from a remote system, you must use the method, with the computer name of the remote system and the Registry.PerformanceData key. This call retrieves a key representing the performance data for the remote system. To retrieve the data, call using this key, rather than the Registry.PerformanceData key. > [!NOTE] > On Windows Server 2003, a user must at least belong to the Performance Monitor Users group in order to access subkeys of this base key. @@ -466,7 +466,7 @@ The following code example stores values of several data types in an example key ## Examples - The following example demonstrates how to retrieve the subkeys of this key, and prints their names to the screen. Use the method to create an instance of the particular subkey of interest. You can then use other operations in to manipulate that key. Note that this example can often return no results, since there might be no performance data. + The following example demonstrates how to retrieve the subkeys of this key, and prints their names to the screen. Use the method to create an instance of the particular subkey of interest. You can then use other operations in to manipulate that key. Note that this example can often return no results, since there might be no performance data. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic Registry.PerformanceData Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/Registry/PerformanceData/source.cs" id="Snippet1"::: @@ -569,13 +569,13 @@ The following code example stores values of several data types in an example key Valid root names include HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_CLASSES_ROOT, HKEY_USERS, HKEY_PERFORMANCE_DATA, HKEY_CURRENT_CONFIG, and HKEY_DYN_DATA. > [!NOTE] -> The method opens a registry key, sets the value, and closes the key each time it is called. If you need to modify a large number of values, the method might provide better performance. The class also provides methods that allow you to add an access control list (ACL) to a registry key, to test the data type of a value before retrieving it, and to delete keys. +> The method opens a registry key, sets the value, and closes the key each time it is called. If you need to modify a large number of values, the method might provide better performance. The class also provides methods that allow you to add an access control list (ACL) to a registry key, to test the data type of a value before retrieving it, and to delete keys. - This overload of stores 64-bit integers as strings (). To store 64-bit numbers as values, use the method overload. + This overload of stores 64-bit integers as strings (). To store 64-bit numbers as values, use the method overload. - This overload of stores all string values as objects, even if they contain expandable references to environment variables. To save string values as expandable strings (), use the method overload. + This overload of stores all string values as objects, even if they contain expandable references to environment variables. To save string values as expandable strings (), use the method overload. - This overload is equivalent to calling the method overload with . + This overload is equivalent to calling the method overload with . ## Examples The following code example stores values of several data types in an example key, creating the key as it does so, and then retrieves and displays the values. The example demonstrates storing and retrieving the default (nameless) name/value pair, and the use of `defaultValue` when a name/value pair does not exist. @@ -589,10 +589,10 @@ The following code example stores values of several data types in an example key is . - does not begin with a valid registry root. - - -or- - + does not begin with a valid registry root. + + -or- + is longer than the maximum length allowed (255 characters). The is read-only, and thus cannot be written to; for example, it is a root-level node. The user does not have the permissions required to create or modify registry keys. @@ -672,7 +672,7 @@ The following code example stores values of several data types in an example key Valid root names include HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_CLASSES_ROOT, HKEY_USERS, HKEY_PERFORMANCE_DATA, HKEY_CURRENT_CONFIG, and HKEY_DYN_DATA. > [!NOTE] -> The method opens a registry key, sets the value, and closes the key each time it is called. If you need to modify a large number of values, the method might provide better performance. The class also provides methods that allow you to add an access control list (ACL) to a registry key, to test the data type of a value before retrieving it, and to delete keys. +> The method opens a registry key, sets the value, and closes the key each time it is called. If you need to modify a large number of values, the method might provide better performance. The class also provides methods that allow you to add an access control list (ACL) to a registry key, to test the data type of a value before retrieving it, and to delete keys. If the type of the specified `value` does not match the specified `valueKind`, and the data cannot be converted, is thrown. For example, you can store a as a , but only if its value is less than the maximum value of a . You cannot store a single string value as a . @@ -691,14 +691,14 @@ The following code example stores values of several data types in an example key is . - does not begin with a valid registry root. - - -or- - - is longer than the maximum length allowed (255 characters). - - -or- - + does not begin with a valid registry root. + + -or- + + is longer than the maximum length allowed (255 characters). + + -or- + The type of did not match the registry data type specified by , therefore the data could not be converted properly. The is read-only, and thus cannot be written to; for example, it is a root-level node, or the key has not been opened with write access. The user does not have the permissions required to create or modify registry keys. @@ -744,7 +744,7 @@ The following code example stores values of several data types in an example key This key contains a branch for each user of the computer. The default configuration is supplied for new users on the local computer and for the default current user if the user has not changed preferences. ## Examples - The following example demonstrates how to retrieve the subkeys of this key, and prints their names to the screen. Use the method to create an instance of the particular subkey of interest. You can then use other operations in to manipulate that key. + The following example demonstrates how to retrieve the subkeys of this key, and prints their names to the screen. Use the method to create an instance of the particular subkey of interest. You can then use other operations in to manipulate that key. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic Registry.Users Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/Registry/Overview/source.cs" id="Snippet1"::: diff --git a/xml/Microsoft.Win32/RegistryHive.xml b/xml/Microsoft.Win32/RegistryHive.xml index cc847121337..d67e30288fa 100644 --- a/xml/Microsoft.Win32/RegistryHive.xml +++ b/xml/Microsoft.Win32/RegistryHive.xml @@ -43,20 +43,20 @@ Represents the possible values for a top-level node on a foreign machine. - method to represent the top-level node of a requested key on a foreign (remote) machine. The node that can be opened with the OpenRemoteBaseKey method must be one of these top-level `RegistryKeys`. Further access to the subkeys of the identified node is available using methods in , so long as the user has appropriate permission. - - - -## Examples - The following code example shows how to open a registry key on a remote computer and enumerate the values of the key. The remote computer must be running the remote registry service. Specify the name of the remote computer as a command-line argument when invoking the program. - + method to represent the top-level node of a requested key on a foreign (remote) machine. The node that can be opened with the OpenRemoteBaseKey method must be one of these top-level `RegistryKeys`. Further access to the subkeys of the identified node is available using methods in , so long as the user has appropriate permission. + + + +## Examples + The following code example shows how to open a registry key on a remote computer and enumerate the values of the key. The remote computer must be running the remote registry service. Specify the name of the remote computer as a command-line argument when invoking the program. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Microsoft.Win32.RegistryKey.OpenRemoteBaseKey/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/RegistryHive/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/Microsoft.Win32/RegistryHive/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/Microsoft.Win32/RegistryHive/Overview/source.vb" id="Snippet1"::: + ]]> diff --git a/xml/Microsoft.Win32/RegistryKey.xml b/xml/Microsoft.Win32/RegistryKey.xml index 1408ad2c9df..b3ea8281cb2 100644 --- a/xml/Microsoft.Win32/RegistryKey.xml +++ b/xml/Microsoft.Win32/RegistryKey.xml @@ -61,7 +61,7 @@ The registry acts as a central repository of information for the operating system and the applications on a computer. The registry is organized in a hierarchical format, based on a logical ordering of the elements stored within it (please see for the base-level items in this hierarchy). When storing information in the registry, select the appropriate location based on the type of information being stored. Be sure to avoid destroying information created by other applications, because this can cause those applications to exhibit unexpected behavior, and can also have an adverse effect upon your own application. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. Registry keys are the base unit of organization in the registry, and can be compared to folders in File Explorer. A particular key can have subkeys, just as a folder can have subfolders. Each key can be deleted, as long as the user has the appropriate permissions to do so, and the key is not a base key or at the level directly under the base keys. Each key can also have multiple values associated with it (a value can be compared to a file), which are used to store the information - for example, information about an application installed on the computer. Each value holds one particular piece of information, which can be retrieved or updated when required. For instance, you can create a for your company, under the key HKEY_LOCAL_MACHINE\Software, and then a subkey for each application that your company creates. Each subkey holds the information specific to that application, such as color settings, screen location and size, or recognized file extensions. @@ -274,7 +274,7 @@ > [!CAUTION] > Do not expose objects in such a way that a malicious program could create thousands of meaningless subkeys or key/value pairs. For example, do not allow callers to enter arbitrary keys or values. - In order to use the method, you must have an instance of the class. To get an instance of , use one of the static members of the class. + In order to use the method, you must have an instance of the class. To get an instance of , use one of the static members of the class. ]]> @@ -348,7 +348,7 @@ > [!CAUTION] > Do not expose objects in such a way that a malicious program could create thousands of meaningless subkeys or key/value pairs. For example, do not allow callers to enter arbitrary keys or values. - In order to use the method, you must have an instance of the class. To get an instance of , use one of the static members of the class. + In order to use the method, you must have an instance of the class. To get an instance of , use one of the static members of the class. ]]> @@ -420,7 +420,7 @@ method creates a registry key that has the access control specified by the `registrySecurity` parameter. The object that is returned represents the registry key, but that object is not restricted by the access control specified in the `registrySecurity` parameter. + The method creates a registry key that has the access control specified by the `registrySecurity` parameter. The object that is returned represents the registry key, but that object is not restricted by the access control specified in the `registrySecurity` parameter. If `permissionCheck` is , the key is opened for read/write access. If `permissionCheck` is , the key is opened for read access. @@ -431,7 +431,7 @@ > [!CAUTION] > Do not expose objects in such a way that a malicious program could create thousands of meaningless subkeys or key/value pairs. For example, do not allow callers to enter arbitrary keys or values. - In order to use the method, you must have an instance of the class. To get an instance of , use one of the static members of the class. + In order to use the method, you must have an instance of the class. To get an instance of , use one of the static members of the class. ]]> @@ -507,7 +507,7 @@ > [!CAUTION] > Do not expose objects in such a way that a malicious program could create thousands of meaningless subkeys or key/value pairs. For example, do not allow callers to enter arbitrary keys or values. - In order to use the method, you must have an instance of the class. To get an instance of , use one of the static members of the class. + In order to use the method, you must have an instance of the class. To get an instance of , use one of the static members of the class. ]]> @@ -719,14 +719,14 @@ . + To delete child subkeys, use . Use caution when deleting registry keys. ## Examples - The following example demonstrates how to use . + The following example demonstrates how to use . :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Microsoft.Win32.RegistryKey2/CPP/source2.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/RegistryKey/Overview/source2.cs" id="Snippet5"::: @@ -796,7 +796,7 @@ . + To delete child subkeys, use . Use caution when deleting registry keys. @@ -876,7 +876,7 @@ You must have appropriate permissions to delete the subkey and its tree. > [!CAUTION] -> Deleting a particular key will remove all entries below the key in the tree. No warning will be provided. If you want to delete a subkey only when it has no child subkeys, use the method. +> Deleting a particular key will remove all entries below the key in the tree. No warning will be provided. If you want to delete a subkey only when it has no child subkeys, use the method. @@ -1232,7 +1232,7 @@ ## Remarks It is not necessary to call `Flush` to write out changes to a key. Registry changes are flushed to disk when the registry uses its lazy flusher. Lazy flushing occurs automatically and regularly after a system-specified time interval. Registry changes are also flushed to disk at system shutdown. - Unlike , the `Flush` function returns only when all the data has been written to the registry. + Unlike , the `Flush` function returns only when all the data has been written to the registry. The `Flush` function might also write out parts of or all of the other keys. Calling this function excessively can have a negative effect on an application's performance. @@ -1422,7 +1422,7 @@ method overload with the bitwise combination of the following flags: , , and . You can use that overload to search for other permissions. + This method overload is equivalent to calling the method overload with the bitwise combination of the following flags: , , and . You can use that overload to search for other permissions. The user must have rights to call this method. @@ -1617,20 +1617,20 @@ > [!NOTE] > A registry key can have one value that is not associated with any name. When this unnamed value is displayed in the registry editor, the string "(Default)" appears instead of a name. To retrieve this unnamed value, specify either `null` or the empty string ("") for `name`. - When the method retrieves expandable string values (), it expands environment strings using data from the local environment. To retrieve expandable string values from the registry on a remote computer, use the method overload to specify that you do not want environment strings expanded. + When the method retrieves expandable string values (), it expands environment strings using data from the local environment. To retrieve expandable string values from the registry on a remote computer, use the method overload to specify that you do not want environment strings expanded. > [!NOTE] -> If a value containing expandable references to environment variables has been stored as a string (), rather than as an expandable string (), does not expand it. You can expand such a string after it has been retrieved by calling the method. +> If a value containing expandable references to environment variables has been stored as a string (), rather than as an expandable string (), does not expand it. You can expand such a string after it has been retrieved by calling the method. > [!NOTE] -> The recommended way to retrieve data from the key is to use the class rather than the method. +> The recommended way to retrieve data from the key is to use the class rather than the method. > -> does not support reading values of type REG_NONE or REG_LINK. In both cases, the default value (`null`) is returned instead of the actual value. +> does not support reading values of type REG_NONE or REG_LINK. In both cases, the default value (`null`) is returned instead of the actual value. ## Examples - The following code example creates a test key and adds values of different data types to the key. The example then reads the name/value pairs and displays them to the console, using the method to retrieve the corresponding registry data types. + The following code example creates a test key and adds values of different data types to the key. The example then reads the name/value pairs and displays them to the console, using the method to retrieve the corresponding registry data types. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Microsoft.Win32.RegistryValueKind/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/RegistryKey/GetValue/source2.cs" id="Snippet1"::: @@ -1706,25 +1706,25 @@ to handle the case where a name does not exist yet - for example, the first time your application is run. Whenever you call this overload, use the `defaultValue` parameter to specify the value to return if `name` does not exist. + Use this overload of to handle the case where a name does not exist yet - for example, the first time your application is run. Whenever you call this overload, use the `defaultValue` parameter to specify the value to return if `name` does not exist. > [!NOTE] > A registry key can have one value that is not associated with any name. When this unnamed value is displayed in the registry editor, the string "(Default)" appears instead of a name. To retrieve this unnamed value, specify either `null` or the empty string ("") for `name`. - When the method retrieves expandable string values (), it expands environment strings using data from the local environment. To retrieve expandable string values from the registry on a remote computer, use the overload to specify that you do not want environment strings expanded. + When the method retrieves expandable string values (), it expands environment strings using data from the local environment. To retrieve expandable string values from the registry on a remote computer, use the overload to specify that you do not want environment strings expanded. > [!NOTE] -> If a value containing expandable references to environment variables has been stored as a string (), rather than as an expandable string (), the method does not expand it. You can expand such a string after it has been retrieved by calling the method. +> If a value containing expandable references to environment variables has been stored as a string (), rather than as an expandable string (), the method does not expand it. You can expand such a string after it has been retrieved by calling the method. > [!NOTE] -> The recommended way to retrieve data from the key is to use the class rather than the method. +> The recommended way to retrieve data from the key is to use the class rather than the method. > -> does not support reading values of type REG_NONE or REG_LINK. In both cases, the default value (`null`) is returned instead of the actual value. +> does not support reading values of type REG_NONE or REG_LINK. In both cases, the default value (`null`) is returned instead of the actual value. ## Examples - The following code example creates a test key with a value and retrieves that value. The example then attempts to retrieve a nonexistent value from the key; in this case the method returns the specified default value. + The following code example creates a test key with a value and retrieves that value. The example then attempts to retrieve a nonexistent value from the key; in this case the method returns the specified default value. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic RegistryKey.GetValue Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/RegistryKey/GetValue/source.cs" id="Snippet1"::: @@ -1812,7 +1812,7 @@ > [!NOTE] > A registry key can have one value that is not associated with any name. When this unnamed value is displayed in the registry editor, the string "(Default)" appears instead of a name. To retrieve this unnamed value, specify either `null` or the empty string ("") for `name`. > -> does not support reading values of type REG_NONE or REG_LINK. In both cases, the default value (`null`) is returned instead of the actual value. +> does not support reading values of type REG_NONE or REG_LINK. In both cases, the default value (`null`) is returned instead of the actual value. @@ -1900,7 +1900,7 @@ ## Examples - The following code example creates a test key and adds values of different data types to the key. The example then reads the name/value pairs and displays them to the console, using the method to retrieve the corresponding registry data types. + The following code example creates a test key and adds values of different data types to the key. The example then reads the name/value pairs and displays them to the console, using the method to retrieve the corresponding registry data types. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Microsoft.Win32.RegistryValueKind/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/RegistryKey/GetValue/source2.cs" id="Snippet1"::: @@ -1971,7 +1971,7 @@ ## Remarks If no value names for the key are found, an empty array is returned. - A registry key can have a default value - that is, a name/value pair in which the name is the empty string (""). If a default value has been set for a registry key, the array returned by the method includes the empty string. + A registry key can have a default value - that is, a name/value pair in which the name is the empty string (""). If a default value has been set for a registry key, the array returned by the method includes the empty string. @@ -2369,16 +2369,16 @@ method that allows you to specify write access, such as the overload or the overload. + You must open a key before it can be manipulated with other methods and properties. To modify a key, you must open it with an overload of the method that allows you to specify write access, such as the overload or the overload. If the specified subkey cannot be found, then `null` is returned. - In order to use the method, you must have an instance of . To get an instance of , use the one of the static members of the class. + In order to use the method, you must have an instance of . To get an instance of , use the one of the static members of the class. ## Examples - The following code example creates a test key and uses the method to open it, demonstrating both overloads of the method. + The following code example creates a test key and uses the method to open it, demonstrating both overloads of the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RegistryKey.OpenSubKey/CPP/opensubkey.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/RegistryKey/OpenSubKey/opensubkey.cs" id="Snippet1"::: @@ -2461,7 +2461,7 @@ If `permissionCheck` is , the key is opened for reading and writing; if `permissionCheck` is or , the key is opened for reading unless the parent key was opened with . - In order to use the method, you must have an instance of the class. To get an instance of , use one of the static members of the class. + In order to use the method, you must have an instance of the class. To get an instance of , use one of the static members of the class. @@ -2549,12 +2549,12 @@ If `writable` is `true`, the key will be opened for reading and writing, otherwise, the key will be opened as read-only. - In order to use the method, you must have an instance of the method. To get an instance of , use one of the static members of the class. + In order to use the method, you must have an instance of the method. To get an instance of , use one of the static members of the class. ## Examples - The following code example creates a test key and uses the method to open it, demonstrating both overloads of the method. + The following code example creates a test key and uses the method to open it, demonstrating both overloads of the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RegistryKey.OpenSubKey/CPP/opensubkey.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/RegistryKey/OpenSubKey/opensubkey.cs" id="Snippet1"::: @@ -2634,7 +2634,7 @@ method that allows you to specify write access. + You must open a key before it can be manipulated with other methods and properties. To modify a key, you must open it with an overload of the method that allows you to specify write access. ]]> @@ -2710,7 +2710,7 @@ The access specified for `permissionCheck` takes precedence over the access specified for `rights`. For example, if you specify for `permissionCheck` and for `rights`, an attempt to write to the subkey throws an exception. - In order to use the method, you must have an instance of the class. To get an instance of , use one of the static members of the class. + In order to use the method, you must have an instance of the class. To get an instance of , use one of the static members of the class. ]]> @@ -2778,10 +2778,10 @@ method to obtain a object representing the existing Windows access control security, modify that object, and then use the method to update security for the key. + To modify permissions for a registry key, use the method to obtain a object representing the existing Windows access control security, modify that object, and then use the method to update security for the key. > [!CAUTION] -> The object specified for `registrySecurity` replaces the existing security for the registry key. To add permissions for a new user, use the method to obtain the existing access control security, and then modify it. +> The object specified for `registrySecurity` replaces the existing security for the registry key. To add permissions for a new user, use the method to obtain the existing access control security, and then modify it. @@ -2871,9 +2871,9 @@ If the specified `name` does not exist in the key, it is created and the associated value is set to `value`. - This overload of stores 64-bit integers as strings (). To store 64-bit numbers as values, use the overload that specifies . + This overload of stores 64-bit integers as strings (). To store 64-bit numbers as values, use the overload that specifies . - This overload of stores all string values as , even if they contain expandable references to environment variables. To save string values as expandable strings (), use the overload that specifies . + This overload of stores all string values as , even if they contain expandable references to environment variables. To save string values as expandable strings (), use the overload that specifies . Numeric types other than 32-bit integers are stored as strings by this method overload. Enumeration elements are stored as strings containing the element names. @@ -2881,7 +2881,7 @@ > Do not expose objects in such a way that a malicious program could create thousands of meaningless subkeys or key/value pairs. For example, do not allow callers to enter arbitrary keys or values. ## Examples - The following code example shows how the method determines the registry data type when it sets values. The example creates a test key and adds values of different data types to the key. The example then reads the name/value pairs and displays them to the console, using the method to display the corresponding registry data types. + The following code example shows how the method determines the registry data type when it sets values. The example creates a test key and adds values of different data types to the key. The example then reads the name/value pairs and displays them to the console, using the method to display the corresponding registry data types. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Microsoft.Win32.RegistryKey.SetValue1/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/RegistryKey/SetValue/source.cs" id="Snippet1"::: @@ -2978,7 +2978,7 @@ If the specified `name` does not exist in the key, it is created, and the associated value is set to `value`. > [!NOTE] -> Specifying the registry data type is the same as using the overload. +> Specifying the registry data type is the same as using the overload. If the type of the specified `value` does not match the specified `valueKind`, and the data cannot be converted, is thrown. For example, you can store a as a , but only if its value is less than the maximum value of a . You cannot store a single string value as a . @@ -2989,7 +2989,7 @@ > Do not expose objects in such a way that a malicious program could create thousands of meaningless subkeys or key/value pairs. For example, do not allow callers to enter arbitrary keys or values. ## Examples - The following code example creates a test key and uses the method to store several values, specifying the registry data type for each value. The example then reads the name/value pairs and displays them to the console, using the method to display the corresponding registry data types. + The following code example creates a test key and uses the method to store several values, specifying the registry data type for each value. The example then reads the name/value pairs and displays them to the console, using the method to display the corresponding registry data types. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Microsoft.Win32.RegistryValueKind/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/RegistryKey/GetValue/source2.cs" id="Snippet1"::: @@ -3107,7 +3107,7 @@ . +This method has the same effect as calling . ]]> @@ -3219,7 +3219,7 @@ This method has the same effect as calling method and specifying either `null` or the empty string ("") for `name`. If the default value has never been set, it does not contribute to the total count returned by the property; once it has been set, however, it is always counted. + Each registry key has a default value that is not associated with any name. This unnamed value can be set by using the method and specifying either `null` or the empty string ("") for `name`. If the default value has never been set, it does not contribute to the total count returned by the property; once it has been set, however, it is always counted. diff --git a/xml/Microsoft.Win32/RegistryOptions.xml b/xml/Microsoft.Win32/RegistryOptions.xml index e3cf6cc9ff5..8b5fb1c33f2 100644 --- a/xml/Microsoft.Win32/RegistryOptions.xml +++ b/xml/Microsoft.Win32/RegistryOptions.xml @@ -36,11 +36,11 @@ Specifies options to use when creating a registry key. - method overloads that take an `options` parameter. - + method overloads that take an `options` parameter. + ]]> diff --git a/xml/Microsoft.Win32/RegistryValueKind.xml b/xml/Microsoft.Win32/RegistryValueKind.xml index d6de7fddf9b..ca83ebd1a79 100644 --- a/xml/Microsoft.Win32/RegistryValueKind.xml +++ b/xml/Microsoft.Win32/RegistryValueKind.xml @@ -37,22 +37,22 @@ Specifies the data types to use when storing values in the registry, or identifies the data type of a value in the registry. - enumeration defines the set of supported registry data types and the value that is used for unsupported types (Unknown). Starting in the .NET Framework 4, you can specify not to use a data type with the None value. - - Use the method to determine the data type of a registry key value before retrieving the value. When you set a registry key value, use the method to specify the registry data type explicitly. - - - -## Examples - The following code example creates a registry key and sets several values for that key, using to specify the registry data types. The example then uses to check the registry data types, in order to retrieve the values and display them. - + enumeration defines the set of supported registry data types and the value that is used for unsupported types (Unknown). Starting in the .NET Framework 4, you can specify not to use a data type with the None value. + + Use the method to determine the data type of a registry key value before retrieving the value. When you set a registry key value, use the method to specify the registry data type explicitly. + + + +## Examples + The following code example creates a registry key and sets several values for that key, using to specify the registry data types. The example then uses to check the registry data types, in order to retrieve the values and display them. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Microsoft.Win32.RegistryValueKind/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/RegistryKey/GetValue/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/Microsoft.Win32/RegistryKey/GetValue/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/Microsoft.Win32/RegistryKey/GetValue/source.vb" id="Snippet1"::: + ]]> diff --git a/xml/Microsoft.Win32/RegistryValueOptions.xml b/xml/Microsoft.Win32/RegistryValueOptions.xml index 25627e5d51c..c7a0448609e 100644 --- a/xml/Microsoft.Win32/RegistryValueOptions.xml +++ b/xml/Microsoft.Win32/RegistryValueOptions.xml @@ -37,20 +37,20 @@ Specifies optional behavior when retrieving name/value pairs from a registry key. - method overload. - - - -## Examples - The following code sample creates a test key, adds a value with an embedded environment variable, and retrieves the value in both expanded and unexpanded forms. - + method overload. + + + +## Examples + The following code sample creates a test key, adds a value with an embedded environment variable, and retrieves the value in both expanded and unexpanded forms. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RegistryValueOptions/CPP/RegistryValueOptions.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/Microsoft.Win32/RegistryKey/GetValue/source1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/Microsoft.Win32/RegistryKey/GetValue/source1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/Microsoft.Win32/RegistryKey/GetValue/source1.vb" id="Snippet1"::: + ]]> diff --git a/xml/Microsoft.Win32/RegistryView.xml b/xml/Microsoft.Win32/RegistryView.xml index 5ad4621c6db..7f4e5f2a327 100644 --- a/xml/Microsoft.Win32/RegistryView.xml +++ b/xml/Microsoft.Win32/RegistryView.xml @@ -34,7 +34,7 @@ On the 64-bit version of Windows, portions of the registry are stored separately for 32-bit and 64-bit applications. There is a 32-bit view for 32-bit applications and a 64-bit view for 64-bit applications. -You can specify a registry view when you use the , , and methods on a object. +You can specify a registry view when you use the , , and methods on a object. If you request a 64-bit view on a 32-bit operating system, the returned keys will be in the 32-bit view. diff --git a/xml/Microsoft.Win32/SystemEvents.xml b/xml/Microsoft.Win32/SystemEvents.xml index 9a56e5783cf..b83af17810a 100644 --- a/xml/Microsoft.Win32/SystemEvents.xml +++ b/xml/Microsoft.Win32/SystemEvents.xml @@ -45,7 +45,7 @@ ## Remarks The class provides the ability to respond to specific types of system events. - When a system event is raised, any delegates attached to the event are called using the thread that monitors for system events. Therefore, you should make any calls from your event handlers thread-safe. If you need to call a system event that is not exposed as a member of this class, you can use the method. + When a system event is raised, any delegates attached to the event are called using the thread that monitors for system events. Therefore, you should make any calls from your event handlers thread-safe. If you need to call a system event that is not exposed as a member of this class, you can use the method. > [!CAUTION] > Do not perform time-consuming processing on the thread that raises a system event handler because it might prevent other applications from functioning. diff --git a/xml/Microsoft.Windows.Themes/BulletChrome.xml b/xml/Microsoft.Windows.Themes/BulletChrome.xml index c5ca5bbc2b4..7e82dd8b155 100644 --- a/xml/Microsoft.Windows.Themes/BulletChrome.xml +++ b/xml/Microsoft.Windows.Themes/BulletChrome.xml @@ -63,7 +63,7 @@ is dependent on which theme is active on the user's system. The properties of this class allow WPF to set the appearance based on the current theme. + The actual appearance of the is dependent on which theme is active on the user's system. The properties of this class allow WPF to set the appearance based on the current theme. In XAML usage, a object element can also have child content, which can be a single that sets the property. @@ -222,7 +222,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|, | +|Metadata properties set to `true`|, | ]]> @@ -363,7 +363,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|, | +|Metadata properties set to `true`|, | ]]> @@ -482,7 +482,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|, | +|Metadata properties set to `true`|, | ]]> @@ -594,9 +594,9 @@ is a or . + This property only applies when the is a or . - If the object used for the bullet supports an `IsThreeState` property, and the value of that property is `true`, then a value of `null` is potentially user-settable. Otherwise, the value of cannot be set to `null` by user action, but it can be set that way in markup or code. + If the object used for the bullet supports an `IsThreeState` property, and the value of that property is `true`, then a value of `null` is potentially user-settable. Otherwise, the value of cannot be set to `null` by user action, but it can be set that way in markup or code. ## Dependency Property Information @@ -604,7 +604,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`| (however, this property might not be set in all themes)| +|Metadata properties set to `true`| (however, this property might not be set in all themes)| ## XAML Attribute Usage @@ -760,7 +760,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|| +|Metadata properties set to `true`|| ]]> @@ -1037,7 +1037,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`| (however, this property might not be set in all themes)| +|Metadata properties set to `true`| (however, this property might not be set in all themes)| ]]> @@ -1179,7 +1179,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`| (however, this property might not be set in all themes)| +|Metadata properties set to `true`| (however, this property might not be set in all themes)| ]]> diff --git a/xml/Microsoft.Windows.Themes/ButtonChrome.xml b/xml/Microsoft.Windows.Themes/ButtonChrome.xml index 5e6fb6a8407..be2e49fdc41 100644 --- a/xml/Microsoft.Windows.Themes/ButtonChrome.xml +++ b/xml/Microsoft.Windows.Themes/ButtonChrome.xml @@ -265,7 +265,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|, | +|Metadata properties set to `true`|, | ]]> @@ -382,7 +382,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|, | +|Metadata properties set to `true`|, | ]]> @@ -501,7 +501,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|, | +|Metadata properties set to `true`|, | ]]> @@ -756,7 +756,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`| (however, this property might not be set in all themes)| +|Metadata properties set to `true`| (however, this property might not be set in all themes)| ]]> @@ -898,7 +898,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`| (however, this property might not be set in all themes)| +|Metadata properties set to `true`| (however, this property might not be set in all themes)| ]]> @@ -1040,7 +1040,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`| (however, this property might not be set in all themes)| +|Metadata properties set to `true`| (however, this property might not be set in all themes)| ]]>
@@ -1159,7 +1159,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|| +|Metadata properties set to `true`|| ]]>
@@ -1242,7 +1242,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|| +|Metadata properties set to `true`|| ]]>
diff --git a/xml/Microsoft.Windows.Themes/ClassicBorderDecorator.xml b/xml/Microsoft.Windows.Themes/ClassicBorderDecorator.xml index ee7b37f68d3..db47cf65c09 100644 --- a/xml/Microsoft.Windows.Themes/ClassicBorderDecorator.xml +++ b/xml/Microsoft.Windows.Themes/ClassicBorderDecorator.xml @@ -28,7 +28,7 @@ as the . Any other brush will remove the Classic look and render a border of , except in the case of elements, which always render in the Classic look. + To achieve the Classic look, specify as the . Any other brush will remove the Classic look and render a border of , except in the case of elements, which always render in the Classic look. ## XAML Object Element Usage @@ -152,7 +152,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|, , | +|Metadata properties set to `true`|, , | ]]> @@ -223,7 +223,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|, , | +|Metadata properties set to `true`|, , | ]]>
@@ -287,7 +287,7 @@ as the . Any other brush will remove the Classic look and render a border of , except in the case of elements, which always render in the Classic look. + To achieve the Classic look, specify as the . Any other brush will remove the Classic look and render a border of , except in the case of elements, which always render in the Classic look. ## Dependency Property Information @@ -295,7 +295,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|, , | +|Metadata properties set to `true`|, , | ]]> @@ -366,7 +366,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|, , | +|Metadata properties set to `true`|, , | ]]>
@@ -430,7 +430,7 @@ to draw the border according to the . If is not set to , a flat style is drawn. + This brush is used to tell to draw the border according to the . If is not set to , a flat style is drawn. ## XAML Attribute Usage diff --git a/xml/Microsoft.Windows.Themes/DataGridHeaderBorder.xml b/xml/Microsoft.Windows.Themes/DataGridHeaderBorder.xml index f682ab03b86..ae251ca72c5 100644 --- a/xml/Microsoft.Windows.Themes/DataGridHeaderBorder.xml +++ b/xml/Microsoft.Windows.Themes/DataGridHeaderBorder.xml @@ -82,7 +82,7 @@ or properties are set on the , the rendering reverts back to the default implementation. + If the or properties are set on the , the rendering reverts back to the default implementation. ## XAML Object Element Usage @@ -362,7 +362,7 @@ is `false`, the hover look will not be applied even when is `true`. + If is `false`, the hover look will not be applied even when is `true`. ]]> diff --git a/xml/Microsoft.Windows.Themes/ListBoxChrome.xml b/xml/Microsoft.Windows.Themes/ListBoxChrome.xml index 49239640140..8cf9be82270 100644 --- a/xml/Microsoft.Windows.Themes/ListBoxChrome.xml +++ b/xml/Microsoft.Windows.Themes/ListBoxChrome.xml @@ -195,7 +195,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|, | +|Metadata properties set to `true`|, | ]]> @@ -288,7 +288,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|, | +|Metadata properties set to `true`|, | ]]> @@ -381,7 +381,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|, | +|Metadata properties set to `true`|, | ]]>
diff --git a/xml/Microsoft.Windows.Themes/ScrollChrome.xml b/xml/Microsoft.Windows.Themes/ScrollChrome.xml index 01c78e33877..2d06b6bf9cf 100644 --- a/xml/Microsoft.Windows.Themes/ScrollChrome.xml +++ b/xml/Microsoft.Windows.Themes/ScrollChrome.xml @@ -377,7 +377,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|| +|Metadata properties set to `true`|| ]]>
@@ -630,7 +630,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|| +|Metadata properties set to `true`|| ]]>
@@ -760,7 +760,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|| +|Metadata properties set to `true`|| ]]>
@@ -924,7 +924,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|| +|Metadata properties set to `true`|| ]]>
@@ -1082,7 +1082,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|| +|Metadata properties set to `true`|| ]]>
@@ -1279,7 +1279,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|| +|Metadata properties set to `true`|| ]]>
diff --git a/xml/Microsoft.Windows.Themes/SystemDropShadowChrome.xml b/xml/Microsoft.Windows.Themes/SystemDropShadowChrome.xml index d39c5e09ba0..f62f74265cb 100644 --- a/xml/Microsoft.Windows.Themes/SystemDropShadowChrome.xml +++ b/xml/Microsoft.Windows.Themes/SystemDropShadowChrome.xml @@ -292,7 +292,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|| +|Metadata properties set to `true`|| ]]>
@@ -479,7 +479,7 @@ | Item | Value | |------------------|----------------------------------------------------------| |Identifier field|| -|Metadata properties set to `true`|| +|Metadata properties set to `true`|| ]]>
From bd8ac189141f3d28119826df26ca626b593b767e Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:06:50 -0700 Subject: [PATCH 4/8] Windows* and System.IdentityModel* --- xml/System.IdentityModel.Claims/Claim.xml | 4 +- xml/System.IdentityModel.Claims/ClaimSet.xml | 8 +- .../ClaimTypes.xml | 338 +++++------ .../DefaultClaimSet.xml | 14 +- .../WindowsClaimSet.xml | 58 +- .../X509CertificateClaimSet.xml | 26 +- .../ICustomIdentityConfiguration.xml | 24 +- .../IdentityConfiguration.xml | 4 +- ...IdentityConfigurationElementCollection.xml | 10 +- .../SecurityTokenServiceConfiguration.xml | 4 +- .../MetadataSerializer.xml | 540 +++++++++--------- .../AuthorizationContext.xml | 4 +- .../EvaluationContext.xml | 12 +- .../IAuthorizationPolicy.xml | 6 +- .../EndpointReference.xml | 6 +- .../RequestSecurityToken.xml | 2 +- .../AudienceUriMode.xml | 2 +- ...stomUserNameSecurityTokenAuthenticator.xml | 46 +- .../KerberosSecurityTokenProvider.xml | 8 +- .../RsaSecurityTokenAuthenticator.xml | 2 +- .../SamlSecurityTokenAuthenticator.xml | 8 +- .../SecurityTokenAuthenticator.xml | 16 +- .../SecurityTokenManager.xml | 44 +- .../SecurityTokenProvider.xml | 416 +++++++------- .../SecurityTokenRequirement.xml | 14 +- .../SecurityTokenResolver.xml | 22 +- .../SecurityTokenSerializer.xml | 314 +++++----- .../SecurityTokenVersion.xml | 14 +- .../UserNamePasswordValidator.xml | 4 +- .../UserNameSecurityTokenAuthenticator.xml | 12 +- .../UserNameSecurityTokenProvider.xml | 34 +- .../WindowsSecurityTokenAuthenticator.xml | 2 +- ...dowsUserNameSecurityTokenAuthenticator.xml | 2 +- .../X509CertificateValidator.xml | 8 +- .../X509SecurityTokenAuthenticator.xml | 18 +- .../X509SecurityTokenProvider.xml | 12 +- .../FederationConfiguration.xml | 18 +- .../AttributeRequestMessage.xml | 2 +- .../ChunkedCookieHandler.xml | 34 +- .../ClaimsPrincipalPermission.xml | 34 +- .../ClaimsPrincipalPermissionAttribute.xml | 8 +- .../CookieHandler.xml | 8 +- .../FederatedAuthentication.xml | 4 +- ...edAuthenticationSessionEndingException.xml | 10 +- ...dPassiveSecurityTokenServiceOperations.xml | 6 +- .../HttpModuleBase.xml | 8 +- .../SessionAuthenticationModule.xml | 60 +- .../SessionSecurityTokenCreatedEventArgs.xml | 2 +- .../SessionSecurityTokenReceivedEventArgs.xml | 2 +- .../SignInRequestMessage.xml | 6 +- .../SignInResponseMessage.xml | 2 +- .../SignOutCleanupRequestMessage.xml | 2 +- .../SignOutRequestMessage.xml | 4 +- .../WSFederationAuthenticationModule.xml | 144 ++--- .../WSFederationMessage.xml | 6 +- .../AggregateTokenResolver.xml | 6 +- .../BinaryKeyIdentifierClause.xml | 48 +- .../BootstrapContext.xml | 58 +- .../ConfigurationBasedIssuerNameRegistry.xml | 8 +- .../EncryptedKeyIdentifierClause.xml | 6 +- .../GenericXmlSecurityToken.xml | 10 +- .../IssuerNameRegistry.xml | 8 +- .../KerberosReceiverSecurityToken.xml | 6 +- .../KerberosRequestorSecurityToken.xml | 4 +- .../KerberosTicketHashKeyIdentifierClause.xml | 30 +- .../LocalIdKeyIdentifierClause.xml | 2 +- .../RsaKeyIdentifierClause.xml | 4 +- .../RsaSecurityToken.xml | 4 +- .../Saml2Assertion.xml | 2 +- .../Saml2AuthenticationContext.xml | 2 +- .../Saml2SecurityToken.xml | 6 +- .../SamlAction.xml | 4 +- .../SamlAdvice.xml | 6 +- .../SamlAssertion.xml | 14 +- .../SamlAssertionKeyIdentifierClause.xml | 2 +- .../SamlAttribute.xml | 10 +- .../SamlAttributeStatement.xml | 8 +- .../SamlAudienceRestrictionCondition.xml | 8 +- .../SamlAuthenticationStatement.xml | 8 +- .../SamlAuthorityBinding.xml | 4 +- .../SamlAuthorizationDecisionStatement.xml | 10 +- .../SamlCondition.xml | 4 +- .../SamlConditions.xml | 8 +- .../SamlDoNotCacheCondition.xml | 8 +- .../SamlEvidence.xml | 8 +- .../SamlSecurityToken.xml | 10 +- .../SamlSecurityTokenHandler.xml | 6 +- .../SamlSerializer.xml | 162 +++--- .../SamlStatement.xml | 8 +- .../SamlSubject.xml | 12 +- .../SamlSubjectStatement.xml | 10 +- .../SecurityKeyIdentifier.xml | 6 +- .../SecurityKeyIdentifierClause.xml | 4 +- .../SecurityToken.xml | 10 +- .../SecurityTokenElement.xml | 6 +- .../SecurityTokenHandler.xml | 78 +-- .../SecurityTokenHandlerCollection.xml | 58 +- .../SecurityTokenValidationException.xml | 10 +- .../SessionSecurityToken.xml | 6 +- .../SessionSecurityTokenCacheKey.xml | 2 +- .../SessionSecurityTokenHandler.xml | 38 +- .../TokenReplayCache.xml | 20 +- .../WindowsSecurityToken.xml | 8 +- .../X509AsymmetricSecurityKey.xml | 2 +- ...aSecurityKeyIdentifierClauseSerializer.xml | 62 +- .../X509IssuerSerialKeyIdentifierClause.xml | 6 +- .../X509RawDataKeyIdentifierClause.xml | 70 +-- .../X509SecurityToken.xml | 14 +- .../X509SubjectKeyIdentifierClause.xml | 70 +-- .../X509ThumbprintKeyIdentifierClause.xml | 58 +- .../X509WindowsSecurityToken.xml | 4 +- xml/System.IdentityModel/AsyncResult.xml | 2 +- .../DelegatingXmlDictionaryReader.xml | 2 +- .../DelegatingXmlDictionaryWriter.xml | 2 +- .../EnvelopedSignatureReader.xml | 90 +-- .../EnvelopedSignatureWriter.xml | 46 +- .../RsaSignatureCookieTransform.xml | 2 +- xml/System.IdentityModel/Scope.xml | 2 +- .../SecurityTokenService.xml | 64 +-- .../TypedAsyncResult`1.xml | 10 +- ...nsupportedTokenTypeBadRequestException.xml | 2 +- xml/Windows.Foundation/Point.xml | 6 +- xml/Windows.Foundation/Rect.xml | 16 +- xml/Windows.Foundation/Size.xml | 4 +- xml/Windows.UI.Xaml.Media/Matrix.xml | 4 +- xml/Windows.UI/Color.xml | 2 +- 126 files changed, 1859 insertions(+), 1859 deletions(-) diff --git a/xml/System.IdentityModel.Claims/Claim.xml b/xml/System.IdentityModel.Claims/Claim.xml index 111a40e97e2..05ce82faa64 100644 --- a/xml/System.IdentityModel.Claims/Claim.xml +++ b/xml/System.IdentityModel.Claims/Claim.xml @@ -867,7 +867,7 @@ method to provide equality comparisons for objects. The comparison consists of three comparisons on the values of the , , and properties. The comparison algorithm that is used on the property depends upon the value of the property. The following table details the comparison algorithm that is used for the specified claim type. + This method overrides the method to provide equality comparisons for objects. The comparison consists of three comparisons on the values of the , , and properties. The comparison algorithm that is used on the property depends upon the value of the property. The following table details the comparison algorithm that is used for the specified claim type. |Claim type|Comparison| |----------------|----------------| @@ -918,7 +918,7 @@ method. + This method generates the same hash code for two objects that are equal according to the method. ]]> diff --git a/xml/System.IdentityModel.Claims/ClaimSet.xml b/xml/System.IdentityModel.Claims/ClaimSet.xml index 65bd584eb93..f0200366a4d 100644 --- a/xml/System.IdentityModel.Claims/ClaimSet.xml +++ b/xml/System.IdentityModel.Claims/ClaimSet.xml @@ -58,7 +58,7 @@ ## Remarks After the class has been created, it cannot be changed. - Examining the content of a for particular types of claims is a common task when using claim-based authorization. To examine a for the presence of particular claims, use the method. The method provides better performance than iterating directly over the . + Examining the content of a for particular types of claims is a common task when using claim-based authorization. To examine a for the presence of particular claims, use the method. The method provides better performance than iterating directly over the . @@ -156,7 +156,7 @@ method. + To find the specified claim, call the method. ]]> @@ -204,7 +204,7 @@ method. + To find the specified claim, call the method. ]]> @@ -292,7 +292,7 @@ contains the claim without returning the claim, call the method. + To determine if this contains the claim without returning the claim, call the method. diff --git a/xml/System.IdentityModel.Claims/ClaimTypes.xml b/xml/System.IdentityModel.Claims/ClaimTypes.xml index 7ede3f2fdff..ead2b98f700 100644 --- a/xml/System.IdentityModel.Claims/ClaimTypes.xml +++ b/xml/System.IdentityModel.Claims/ClaimTypes.xml @@ -34,17 +34,17 @@ Represents the pre-defined types of claims that an entity can claim. This class cannot be inherited. - class to search for a particular type of claim in a or to create a claim. To search for a particular type of claim in a , use the method and use the properties of this class to specify the claim type for the `claimType` parameter. When the constructor for the class is used to create a new claim, use the properties of the class to specify the `claimType` parameter. For many of the claim types, the class has static properties that return a claim of a specific type. For instance, the method returns a claim using the claim type. - - - -## Examples + class to search for a particular type of claim in a or to create a claim. To search for a particular type of claim in a , use the method and use the properties of this class to specify the claim type for the `claimType` parameter. When the constructor for the class is used to create a new claim, use the properties of the class to specify the `claimType` parameter. For many of the claim types, the class has static properties that return a claim of a specific type. For instance, the method returns a claim using the claim type. + + + +## Examples :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/c_claimtypes/cs/service.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/c_claimtypes/vb/service.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/c_claimtypes/vb/service.vb" id="Snippet1"::: + ]]> @@ -77,12 +77,12 @@ Gets the URI for a claim that specifies the anonymous user. The URI for a claim that specifies the anonymous user. - @@ -115,11 +115,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies details about whether an identity is authenticated. The URI for a claim that specifies details about whether an identity is authenticated. - @@ -153,11 +153,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies an authorization decision on an entity. The URI for a claim that specifies an authorization decision on an entity. - @@ -191,11 +191,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the country/region in which an entity resides. The URI for a claim that specifies a country/region in which an entity resides. - @@ -228,11 +228,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the date of birth of an entity. The URI for a claim that specifies the date of birth of an entity. - @@ -265,13 +265,13 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies a deny-only security identifier (SID) for an entity. The URI for a claim that specifies a deny-only SID for an entity. - @@ -305,11 +305,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the DNS name associated with the computer name or with the alternative name of either the subject or issuer of an X.509 certificate. The URI for a claim that specifies the DNS name associated with the computer name or with the alternative name of either the subject or issuer of an X.509 certificate. - @@ -343,11 +343,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the email address of an entity. The URI for a claim that specifies the email address of an entity. - @@ -381,11 +381,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the gender of an entity. The URI for a claim that specifies the gender of an entity. - @@ -418,11 +418,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the given name of an entity. The URI for a claim that specifies the given name of an entity. - @@ -455,11 +455,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies a hash value. The URI for a claim that specifies a hash value. - @@ -493,11 +493,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the home phone number of an entity. The URI for a claim that specifies the home phone number of an entity. - @@ -530,11 +530,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the locale in which an entity resides. The URI for a claim that specifies the locale in which an entity resides. - @@ -567,11 +567,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the mobile phone number of an entity. The URI for a claim that specifies the mobile phone number of an entity. - @@ -604,11 +604,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the name of an entity. The URI for a claim that specifies the name of an entity. - @@ -642,11 +642,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the name of an entity. The URI for a claim that specifies the name of an entity. - @@ -679,11 +679,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the alternative phone number of an entity. The URI for a claim that specifies the alternative phone number of an entity. - @@ -716,11 +716,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the postal code of an entity. The URI for a claim that specifies the postal code of an entity. - @@ -753,11 +753,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the private personal identifier (PPI) of an entity. The URI for a claim that specifies the private personal identifier (PPI) of an entity. - @@ -790,11 +790,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies an RSA key. The URI for a claim that specifies an RSA key. - @@ -828,11 +828,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies a security identifier (SID). The URI for a claim that specifies a security identifier (SID). - @@ -866,11 +866,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies a service principal name (SPN) claim. The URI for a claim that specifies a service principal name (SPN) claim. - @@ -904,11 +904,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the state or province in which an entity resides. The URI for a claim that specifies the state or province in which an entity resides. - @@ -941,11 +941,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the street address of an entity. The URI for a claim that specifies the street address of an entity. - @@ -978,11 +978,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the surname of an entity. The URI for a claim that specifies the surname of an entity. - @@ -1015,13 +1015,13 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that identifies the system entity. The URI for a claim that identifies the system entity. - is typically used to identify the issuer of a claim when the issuer is the current application. - - The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/system`. - + is typically used to identify the issuer of a claim when the issuer is the current application. + + The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/system`. + ]]> @@ -1054,13 +1054,13 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies a thumbprint. The URI for a claim that specifies a thumbprint. - @@ -1094,12 +1094,12 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies a user principal name (UPN). The URI for a claim that specifies UPN. - @@ -1133,11 +1133,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies a URI. The URI for a claim that specifies a URI. - @@ -1171,11 +1171,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the URI for a claim that specifies the Web page of an entity. The URI for a claim that specifies the Web page of an entity. - @@ -1208,11 +1208,11 @@ The string returned by this property is `http://schemas.xmlsoap.org/ws/2005/05/i Gets the string that contains the URI for a distinguished name claim of an X.509 certificate. The URI for a distinguished name claim of an X.509 certificate. - diff --git a/xml/System.IdentityModel.Claims/DefaultClaimSet.xml b/xml/System.IdentityModel.Claims/DefaultClaimSet.xml index 1ab0e13d03b..1d0ca93ee04 100644 --- a/xml/System.IdentityModel.Claims/DefaultClaimSet.xml +++ b/xml/System.IdentityModel.Claims/DefaultClaimSet.xml @@ -91,7 +91,7 @@ ## Remarks Use this constructor when the is self-issued. For example, a claim set for an anonymous user is self-issued. - This constructor calls the method. + This constructor calls the method. ]]> @@ -139,7 +139,7 @@ ## Remarks Use this constructor when the is self-issued. For example, a claim set for an anonymous user is self-issued. - This constructor calls the method. + This constructor calls the method. ]]> @@ -180,7 +180,7 @@ method. + This constructor calls the method. ]]> @@ -232,7 +232,7 @@ method. + This constructor calls the method. ]]> @@ -280,7 +280,7 @@ method. + To find claims that match a claim type and right, call the method. ]]> @@ -443,7 +443,7 @@ method. + The constructors that take at least one parameter call the method. ]]> @@ -558,7 +558,7 @@ method contains the and properties for every claim in the . + The string returned by method contains the and properties for every claim in the . ]]> diff --git a/xml/System.IdentityModel.Claims/WindowsClaimSet.xml b/xml/System.IdentityModel.Claims/WindowsClaimSet.xml index a8ad238221d..484edae3a88 100644 --- a/xml/System.IdentityModel.Claims/WindowsClaimSet.xml +++ b/xml/System.IdentityModel.Claims/WindowsClaimSet.xml @@ -60,13 +60,13 @@ A that specifies the Windows identity. Initializes a new instance of the class by using the Windows user identity specified by the object. - @@ -98,11 +98,11 @@ to include the claims representing the Windows groups to which this user belongs; otherwise, . Initializes a new instance of the class by using the Windows user identity specified by the object. - @@ -251,14 +251,14 @@ Releases all resources used by the . - method when you are finished using the . The method leaves the in an unusable state. After calling the method, you must release all references to the so that the garbage collector can reclaim the memory that the occupied. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - + method when you are finished using the . The method leaves the in an unusable state. After calling the method, you must release all references to the so that the garbage collector can reclaim the memory that the occupied. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + > [!NOTE] -> Always call the method before you release your last reference to the . Otherwise, the resources it is using are not freed until the garbage collector calls the object's `Finalize` method. - +> Always call the method before you release your last reference to the . Otherwise, the resources it is using are not freed until the garbage collector calls the object's `Finalize` method. + ]]> @@ -330,11 +330,11 @@ Searches for the claim that matches the specified claim type and rights in the . A object that enables you to enumerate the claims that match the specified criteria. - class to specify the `claimType` parameter. - + class to specify the `claimType` parameter. + ]]> @@ -390,11 +390,11 @@ Gets the issuer for this . A that represents the issuer of this claim set. - is . - + is . + ]]> diff --git a/xml/System.IdentityModel.Claims/X509CertificateClaimSet.xml b/xml/System.IdentityModel.Claims/X509CertificateClaimSet.xml index 80046a57409..c5176cf4126 100644 --- a/xml/System.IdentityModel.Claims/X509CertificateClaimSet.xml +++ b/xml/System.IdentityModel.Claims/X509CertificateClaimSet.xml @@ -131,14 +131,14 @@ Releases all resources used by the . - method when you are finished using the . The method leaves the in an unusable state. After calling the method, you must release all references to the so the garbage collector can reclaim the memory that the occupied. - -> [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using are not freed until the garbage collector calls the object's `Finalize` method. - + method when you are finished using the . The method leaves the in an unusable state. After calling the method, you must release all references to the so the garbage collector can reclaim the memory that the occupied. + +> [!NOTE] +> Always call before you release your last reference to the . Otherwise, the resources it is using are not freed until the garbage collector calls the object's `Finalize` method. + ]]> @@ -279,11 +279,11 @@ Gets the issuer for this . The issuer for this . - follows the same model as the X.509 chain for an X.509 certificate. For instance, the root is self-issued and maps to a Certificate Authority. When a certificate in the chain is unavailable, the root is an anonymous issuer. - + follows the same model as the X.509 chain for an X.509 certificate. For instance, the root is self-issued and maps to a Certificate Authority. When a certificate in the chain is unavailable, the root is an anonymous issuer. + ]]> diff --git a/xml/System.IdentityModel.Configuration/ICustomIdentityConfiguration.xml b/xml/System.IdentityModel.Configuration/ICustomIdentityConfiguration.xml index 9b45719d0b3..abd10a95670 100644 --- a/xml/System.IdentityModel.Configuration/ICustomIdentityConfiguration.xml +++ b/xml/System.IdentityModel.Configuration/ICustomIdentityConfiguration.xml @@ -13,13 +13,13 @@ Defines methods that enable a class to load custom configuration. - interface can load custom configuration from XML. - - Several of the Windows Identity Foundation (WIF) classes implement the interface to provide the capability for you to define custom configuration of derived classes from a configuration file. Many of the WIF classes provide a base implementation of this method to provide the default configuration for the objects they represent. - + interface can load custom configuration from XML. + + Several of the Windows Identity Foundation (WIF) classes implement the interface to provide the capability for you to define custom configuration of derived classes from a configuration file. Many of the WIF classes provide a base implementation of this method to provide the default configuration for the objects they represent. + ]]> @@ -46,11 +46,11 @@ The XML nodes that contain the custom configuration. Each node in the list is of type . Loads custom configuration from XML. Override this method to provide custom handling of configuration elements. - method is called by the configuration infrastructure. When this method is called, the `nodelist` parameter contains the top-level child elements of the parent element that configures the object class from the configuration file. For example, a class derived from , will have the child elements of the [<issuerNameRegistry>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/issuernameregistry) element passed in the `nodelist` parameter. The `nodelist` is composed entirely of objects. Each of these may have attributes and child elements depending on the configuration schema defined for the class that is being configured. - + method is called by the configuration infrastructure. When this method is called, the `nodelist` parameter contains the top-level child elements of the parent element that configures the object class from the configuration file. For example, a class derived from , will have the child elements of the [<issuerNameRegistry>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/issuernameregistry) element passed in the `nodelist` parameter. The `nodelist` is composed entirely of objects. Each of these may have attributes and child elements depending on the configuration schema defined for the class that is being configured. + ]]> diff --git a/xml/System.IdentityModel.Configuration/IdentityConfiguration.xml b/xml/System.IdentityModel.Configuration/IdentityConfiguration.xml index ed14b99c0ff..170f4a89ac4 100644 --- a/xml/System.IdentityModel.Configuration/IdentityConfiguration.xml +++ b/xml/System.IdentityModel.Configuration/IdentityConfiguration.xml @@ -593,7 +593,7 @@ method to load the token handler configuration. + If there is no configuration file, if the named section does not exist, or if `element` is `null`, then no exception is thrown; instead the instance is loaded with a set of default values. This method calls the method to load the token handler configuration. ]]> @@ -686,7 +686,7 @@ methods to configure the token handlers. + This method calls the methods to configure the token handlers. ]]> diff --git a/xml/System.IdentityModel.Configuration/IdentityConfigurationElementCollection.xml b/xml/System.IdentityModel.Configuration/IdentityConfigurationElementCollection.xml index e090f5983dd..a40c2150add 100644 --- a/xml/System.IdentityModel.Configuration/IdentityConfigurationElementCollection.xml +++ b/xml/System.IdentityModel.Configuration/IdentityConfigurationElementCollection.xml @@ -22,11 +22,11 @@ Represents the collection of elements in a configuration file. This class cannot be inherited. - ` elements. Each identity configuration is identified by a unique name specified in its `name` attribute. Each `` element is represented by an object. The property of each object contains the name of the identity configuration. The class wraps a collection that contains all of the `` elements read from the file. The name of the identity configuration is used as a key to retrieve the corresponding when you call the method. - + ` elements. Each identity configuration is identified by a unique name specified in its `name` attribute. Each `` element is represented by an object. The property of each object contains the name of the identity configuration. The class wraps a collection that contains all of the `` elements read from the file. The name of the identity configuration is used as a key to retrieve the corresponding when you call the method. + ]]> <identityConfiguration> diff --git a/xml/System.IdentityModel.Configuration/SecurityTokenServiceConfiguration.xml b/xml/System.IdentityModel.Configuration/SecurityTokenServiceConfiguration.xml index 827ae993a48..2439f3398cf 100644 --- a/xml/System.IdentityModel.Configuration/SecurityTokenServiceConfiguration.xml +++ b/xml/System.IdentityModel.Configuration/SecurityTokenServiceConfiguration.xml @@ -23,7 +23,7 @@ :::code language="csharp" source="~/snippets/csharp/System.IdentityModel/SecurityTokenService/Overview/customsecuritytokenserviceconfiguration.cs" id="Snippet2"::: - The following code shows how to invoke a custom passive STS to process a WS-Federation request by calling the method from the code behind in the `default.aspx.cs` file. The method initializes an instance of the `PassiveSTS.CustomSecurityTokenService` class using the properties set on the `CustomSecurityTokenServiceConfiguration` class shown in the previous example. + The following code shows how to invoke a custom passive STS to process a WS-Federation request by calling the method from the code behind in the `default.aspx.cs` file. The method initializes an instance of the `PassiveSTS.CustomSecurityTokenService` class using the properties set on the `CustomSecurityTokenServiceConfiguration` class shown in the previous example. :::code language="csharp" source="~/snippets/csharp/System.IdentityModel/SecurityTokenService/Overview/default.aspx.cs" id="Snippet1"::: @@ -278,7 +278,7 @@ ## Examples The code examples that are used in the topics are taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT) and it includes an implementation of a passive STS that is capable of serving an SWT token. For an example of how to implement an active STS, you can see the `Federation Metadata` sample. For information about these samples and other samples available for WIF and about where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). The following code shows a custom implementation of the class to support a passive STS that processes SWT tokens. The configuration is initialized and stored in the HTTP application state the first time the static `Current` property is accessed. The constructor initializes the properties of the custom configuration with the type of the custom STS, a custom issuer token resolver, and the default token type (the URI of the SWT token type). It also adds an SWT token handler to the default handler collection. - The following code shows how to invoke a custom passive STS to process a WS-Federation request by calling the method from the code behind in the `default.aspx.cs` file. The method initializes an instance of the `PassiveSTS.CustomSecurityTokenService` class using the properties set on the current `CustomSecurityTokenServiceConfiguration` object. The `CustomSecurityTokenServiceConfiguration.Current` property is implemented by the `CustomSecurityTokenServiceConfiguration` class and returns the instance of the class that is saved in the HTTP application state. + The following code shows how to invoke a custom passive STS to process a WS-Federation request by calling the method from the code behind in the `default.aspx.cs` file. The method initializes an instance of the `PassiveSTS.CustomSecurityTokenService` class using the properties set on the current `CustomSecurityTokenServiceConfiguration` object. The `CustomSecurityTokenServiceConfiguration.Current` property is implemented by the `CustomSecurityTokenServiceConfiguration` class and returns the instance of the class that is saved in the HTTP application state. :::code language="csharp" source="~/snippets/csharp/System.IdentityModel/SecurityTokenService/Overview/default.aspx.cs" id="Snippet1"::: diff --git a/xml/System.IdentityModel.Metadata/MetadataSerializer.xml b/xml/System.IdentityModel.Metadata/MetadataSerializer.xml index 079ebc33188..82148ba194c 100644 --- a/xml/System.IdentityModel.Metadata/MetadataSerializer.xml +++ b/xml/System.IdentityModel.Metadata/MetadataSerializer.xml @@ -42,11 +42,11 @@ Initializes a new instance of the class with a default token serializer. - and properties are initialized to the following values: , , and . - + and properties are initialized to the following values: , , and . + ]]> @@ -70,11 +70,11 @@ The token serializer that will be used to serialize security tokens. Initializes a new instance of the class that uses the specified token serializer. - and properties are initialized to the following values: , , and . - + and properties are initialized to the following values: , , and . + ]]> @@ -432,11 +432,11 @@ Gets the X.509 certificate created from the specified key identifier. The X.509 certificate that was created from the specified key identifier. - . You can override this method to support other kinds of key identifier clauses. This method is invoked by the method. - + . You can override this method to support other kinds of key identifier clauses. This method is invoked by the method. + ]]> @@ -574,11 +574,11 @@ Reads the <saml:Attribute> element. The Saml2 attribute. - @@ -1013,10 +1013,10 @@ The descriptor. An instance of the or class. To be added. - is . - - -or- - + is . + + -or- + is . @@ -1045,18 +1045,18 @@ Reads an entity descriptor or an entities descriptor. The descriptor. An instance of the or class. - methods. - + methods. + ]]> - is . - - -or- - + is . + + -or- + is . The reader is not positioned on an or an element. @@ -1140,14 +1140,14 @@ Reads role descriptor attributes. To be added. - is . - - -or- - - is . - - -or- - + is . + + -or- + + is . + + -or- + The property of is . @@ -1178,16 +1178,16 @@ if an element is read; otherwise, . To be added. - is . - - -or- - - is . - - -or- - - The property of is . - + is . + + -or- + + is . + + -or- + + The property of is . + The property of is . @@ -1271,10 +1271,10 @@ Reads SSO descriptor attributes. To be added. - is . - - -or- - + is . + + -or- + is . @@ -1305,10 +1305,10 @@ if an element is read; otherwise, . To be added. - is . - - -or- - + is . + + -or- + is . @@ -1337,10 +1337,10 @@ Reads web service descriptor attributes. To be added. - is . - - -or- - + is . + + -or- + is . @@ -1371,24 +1371,24 @@ if an element is read; otherwise, . To be added. - is . - - -or- - - is . - - -or- - - The property of is . - - -or- - - The property of is . - - -or- - - The property of is . - + is . + + -or- + + is . + + -or- + + The property of is . + + -or- + + The property of is . + + -or- + + The property of is . + The parameter reader/roleDescriptor/roleDescriptor.TargetScopes/roleDescriptor.TargetScopes/roleDescriptor.TokenTypesOffered is null. @@ -1498,11 +1498,11 @@ The signing certificate. Validates the X.509 certificate that signed the metadata document against the trusted issuers list specified by the property. This method is invoked by the method. - @@ -1558,18 +1558,18 @@ Writes an application service descriptor. To be added. - is . - - -or- - - is . - - -or- - - The property of is . - - -or- - + is . + + -or- + + is . + + -or- + + The property of is . + + -or- + The property of is . @@ -1598,10 +1598,10 @@ Writes the <saml:Attribute> element. To be added. - is . - - -or- - + is . + + -or- + is . @@ -1630,18 +1630,18 @@ Writes a contact person. To be added. - is . - - -or- - - is . - - -or- - - The property of is . - - -or- - + is . + + -or- + + is . + + -or- + + The property of is . + + -or- + The property of is . @@ -1756,18 +1756,18 @@ Writes an entities descriptor. To be added. - is . - - -or- - - is . - - -or- - - The property of is . - - -or- - + is . + + -or- + + is . + + -or- + + The property of is . + + -or- + The property of is . @@ -1796,18 +1796,18 @@ Writes an entity descriptor. To be added. - is . - - -or- - - is . - - -or- - - The property of is . - - -or- - + is . + + -or- + + is . + + -or- + + The property of is . + + -or- + The property of is . @@ -1836,18 +1836,18 @@ Writes an IDPSSO descriptor. To be added. - is . - - -or- - - is . - - -or- - - The property of is . - - -or- - + is . + + -or- + + is . + + -or- + + The property of is . + + -or- + The property of is . @@ -1878,14 +1878,14 @@ Writes an indexed endpoint. To be added. - is . - - -or- - - is . - - -or- - + is . + + -or- + + is . + + -or- + is . @@ -1914,10 +1914,10 @@ Writes a key descriptor. To be added. - is . - - -or- - + is . + + -or- + is . @@ -1948,14 +1948,14 @@ Writes a localized name. To be added. - is . - - -or- - - is . - - -or- - + is . + + -or- + + is . + + -or- + is . @@ -1986,14 +1986,14 @@ Writes a localized URI. To be added. - is . - - -or- - - is . - - -or- - + is . + + -or- + + is . + + -or- + is . @@ -2031,10 +2031,10 @@ Writes the federation metadata to the specified stream. To be added. - is . - - -or- - + is . + + -or- + is . @@ -2063,10 +2063,10 @@ Writes the federation metadata to the specified XML writer. To be added. - is . - - -or- - + is . + + -or- + is . @@ -2095,10 +2095,10 @@ Writes the metadata. To be added. - is . - - -or- - + is . + + -or- + is . is not assignable from or . @@ -2129,10 +2129,10 @@ Writes an organization. To be added. - is . - - -or- - + is . + + -or- + is . @@ -2163,14 +2163,14 @@ Writes an endpoint. To be added. - is . - - -or- - - is . - - -or- - + is . + + -or- + + is . + + -or- + is . @@ -2199,14 +2199,14 @@ Writes role descriptor attributes. To be added. - is . - - -or- - - is . - - -or- - + is . + + -or- + + is . + + -or- + The property of is . @@ -2235,16 +2235,16 @@ Writes the role descriptor element. To be added. - is . - - -or- - - is . - - -or- - - The property of is . - + is . + + -or- + + is . + + -or- + + The property of is . + The property of is . @@ -2273,18 +2273,18 @@ Writes a security token service descriptor. To be added. - is . - - -or- - - is . - - -or- - - The property of is . - - -or- - + is . + + -or- + + is . + + -or- + + The property of is . + + -or- + The property of is . @@ -2313,14 +2313,14 @@ Writes an SPSSO descriptor. To be added. - is . - - -or- - - is . - - -or- - + is . + + -or- + + is . + + -or- + The property of is . @@ -2349,10 +2349,10 @@ Writes the SSO descriptor attributes. To be added. - is . - - -or- - + is . + + -or- + is . @@ -2381,10 +2381,10 @@ Writes the SSO descriptor element. To be added. - is . - - -or- - + is . + + -or- + is . @@ -2413,10 +2413,10 @@ Writes the web service descriptor attributes. To be added. - is . - - -or- - + is . + + -or- + is . @@ -2445,24 +2445,24 @@ Writes a web service descriptor element. To be added. - is . - - -or- - - is . - - -or- - - The property of is . - - -or- - - The property of is . - - -or- - - The property of is . - + is . + + -or- + + is . + + -or- + + The property of is . + + -or- + + The property of is . + + -or- + + The property of is . + The parameter reader/roleDescriptor/roleDescriptor.TargetScopes/roleDescriptor.TargetScopes/roleDescriptor.TokenTypesOffered is null. diff --git a/xml/System.IdentityModel.Policy/AuthorizationContext.xml b/xml/System.IdentityModel.Policy/AuthorizationContext.xml index 2c80c72daad..c16b7a68e17 100644 --- a/xml/System.IdentityModel.Policy/AuthorizationContext.xml +++ b/xml/System.IdentityModel.Policy/AuthorizationContext.xml @@ -186,7 +186,7 @@ method is typically only used by the infrastructure. + The method is typically only used by the infrastructure. ]]> @@ -315,7 +315,7 @@ to specify the of one or more identities that are related to the . The `Principal` property is used by an to specify the that is associated with an . + Windows Communication Foundation reserves two properties: `Identities` and `Principal`. The `Identities` property is used by an to specify the of one or more identities that are related to the . The `Principal` property is used by an to specify the that is associated with an . ]]> diff --git a/xml/System.IdentityModel.Policy/EvaluationContext.xml b/xml/System.IdentityModel.Policy/EvaluationContext.xml index d5ebfa02266..18d01adba5c 100644 --- a/xml/System.IdentityModel.Policy/EvaluationContext.xml +++ b/xml/System.IdentityModel.Policy/EvaluationContext.xml @@ -39,7 +39,7 @@ ## Remarks Claims are added to an by authorization policies. An authorization policy takes a set of claims, such as those found in a security token, and adds additional claims based on the current set. For instance, an authorization policy might evaluate a claim that contains the date of birth and add a claim that states the user is over 21 years old and add an Over21 claim to the . - Classes that implement the interface do not authorize users, but they enable the class to do so. The calls the method for each authorization policy in effect. The method determines whether additional claims should be added for the user based on the current claims. An authorization policy's method may be called multiple times, as claims are added to the by other authorization policies. When all authorization policies in effect are done, the class makes authorization decisions based upon the final set of claims. The class then creates an that contains an immutable set of claims that reflects these authorization decisions. + Classes that implement the interface do not authorize users, but they enable the class to do so. The calls the method for each authorization policy in effect. The method determines whether additional claims should be added for the user based on the current claims. An authorization policy's method may be called multiple times, as claims are added to the by other authorization policies. When all authorization policies in effect are done, the class makes authorization decisions based upon the final set of claims. The class then creates an that contains an immutable set of claims that reflects these authorization decisions. An evaluation context contains a set of objects: an expiration time, which specifies the span of time during which the evaluation context is valid, and a unique identifier. @@ -111,7 +111,7 @@ ## Remarks The claims are added to the set of claims contained within the property. - Each time the method is called to add claims to the evaluation context, the property should be incremented. + Each time the method is called to add claims to the evaluation context, the property should be incremented. ]]>
@@ -148,7 +148,7 @@ method. + To add claims to this collection, for example from an authorization policy, use the method. ]]> @@ -187,7 +187,7 @@ ## Remarks The class uses the property to determine if another evaluation round is required. Each time an authorization policy calls the `AddToTarget` method to add claims to the evaluation context, the property is incremented. - The class examines the property after calling the method on all authorization policies again. If the property has been incremented during evaluation, the class calls the method on any authorization policies that returned `false` the last time the method was called on that authorization policy. + The class examines the property after calling the method on all authorization policies again. If the property has been incremented during evaluation, the class calls the method on any authorization policies that returned `false` the last time the method was called on that authorization policy. ]]>
@@ -224,7 +224,7 @@ namespace that implement the interface (authorization policies) add a property named `Identities` to the. collection. The `Identities` property contains an object of type that contains one or more instances that represent identity information that is provided by the authorization policies. + The classes in the namespace that implement the interface (authorization policies) add a property named `Identities` to the. collection. The `Identities` property contains an object of type that contains one or more instances that represent identity information that is provided by the authorization policies. ]]> @@ -264,7 +264,7 @@ method multiple times only has an effect if the `expirationTime` parameter has a value that is earlier than the previously specified value. + Calling the method multiple times only has an effect if the `expirationTime` parameter has a value that is earlier than the previously specified value. ]]> diff --git a/xml/System.IdentityModel.Policy/IAuthorizationPolicy.xml b/xml/System.IdentityModel.Policy/IAuthorizationPolicy.xml index e60278854b4..72fcb1500f4 100644 --- a/xml/System.IdentityModel.Policy/IAuthorizationPolicy.xml +++ b/xml/System.IdentityModel.Policy/IAuthorizationPolicy.xml @@ -56,7 +56,7 @@ ## Remarks Implement the interface to add or map one set of claims to another. An authorization policy examines a set of claims and adds additional claims based on the current set. For example, an authorization policy might evaluate a claim that contains the date of birth and add a claim that asserts that the user is over 21 years old and add an Over21 claim to the . - Classes that implement the interface do not authorize users, but they enable the class to do so. The calls the method for each authorization policy in effect. The method determines whether additional claims should be added for the user, based on the current context. An authorization policy's method may be called multiple times, as claims are added to the by other authorization policies. When all authorization policies in effect are done, the class makes authorization decisions based upon the final set of claims. The class then creates an that contains an immutable set of claims that reflects these authorization decisions. + Classes that implement the interface do not authorize users, but they enable the class to do so. The calls the method for each authorization policy in effect. The method determines whether additional claims should be added for the user, based on the current context. An authorization policy's method may be called multiple times, as claims are added to the by other authorization policies. When all authorization policies in effect are done, the class makes authorization decisions based upon the final set of claims. The class then creates an that contains an immutable set of claims that reflects these authorization decisions. @@ -113,9 +113,9 @@ ## Remarks > [!NOTE] -> Implementers of the interface should expect the method to be called multiple times by different threads. +> Implementers of the interface should expect the method to be called multiple times by different threads. - Implementers of the interface can use the `state` parameter to track state between calls to the method. If a state object is set inside a given call to the method, the same object instance is passed to each and every subsequent call to the method in the current evaluation process. + Implementers of the interface can use the `state` parameter to track state between calls to the method. If a state object is set inside a given call to the method, the same object instance is passed to each and every subsequent call to the method in the current evaluation process. diff --git a/xml/System.IdentityModel.Protocols.WSTrust/EndpointReference.xml b/xml/System.IdentityModel.Protocols.WSTrust/EndpointReference.xml index e40ef38a21f..4004128f3c7 100644 --- a/xml/System.IdentityModel.Protocols.WSTrust/EndpointReference.xml +++ b/xml/System.IdentityModel.Protocols.WSTrust/EndpointReference.xml @@ -76,7 +76,7 @@ method. + The collection contains all of the child elements of the wsa:EndpointReference element except the wsa:Address element. The collection is populated by the method. The property contains the value of the wsa:Address element. @@ -127,7 +127,7 @@ overload topic for details. + See the overload topic for details. ]]> @@ -159,7 +159,7 @@ overload topic for details. + See the overload topic for details. ]]> diff --git a/xml/System.IdentityModel.Protocols.WSTrust/RequestSecurityToken.xml b/xml/System.IdentityModel.Protocols.WSTrust/RequestSecurityToken.xml index 9f6db6a77a3..a50439ff7b5 100644 --- a/xml/System.IdentityModel.Protocols.WSTrust/RequestSecurityToken.xml +++ b/xml/System.IdentityModel.Protocols.WSTrust/RequestSecurityToken.xml @@ -30,7 +30,7 @@ ## Examples The code example that is used in this topic is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT) and it includes an implementation of a passive STS that is capable of serving an SWT token. The STS is implemented by a class that is derived from . Many of the methods of the class that are called from its token issuance pipeline take a object as one if their parameters. For information about this sample and other samples available for WIF and about where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). - The following code example shows an implementation of the method. The method takes a as one of its parameters and properties of this parameter are used to set properties on the object that is returned by the method. + The following code example shows an implementation of the method. The method takes a as one of its parameters and properties of this parameter are used to set properties on the object that is returned by the method. :::code language="csharp" source="~/snippets/csharp/System.IdentityModel/SecurityTokenService/Overview/customsecuritytokenservice.cs" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.IdentityModel/SecurityTokenService/Overview/customsecuritytokenservice.cs" id="Snippet5"::: diff --git a/xml/System.IdentityModel.Selectors/AudienceUriMode.xml b/xml/System.IdentityModel.Selectors/AudienceUriMode.xml index 3cee4618de9..bb0305b7b8a 100644 --- a/xml/System.IdentityModel.Selectors/AudienceUriMode.xml +++ b/xml/System.IdentityModel.Selectors/AudienceUriMode.xml @@ -25,7 +25,7 @@ - Specify the set of valid URIs, by adding the URIs to the collection. - Optionally, override the method to specify the validation algorithm to use for the allowed URI. + Optionally, override the method to specify the validation algorithm to use for the allowed URI. ]]> diff --git a/xml/System.IdentityModel.Selectors/CustomUserNameSecurityTokenAuthenticator.xml b/xml/System.IdentityModel.Selectors/CustomUserNameSecurityTokenAuthenticator.xml index 601fb2ca812..cdd33bd2436 100644 --- a/xml/System.IdentityModel.Selectors/CustomUserNameSecurityTokenAuthenticator.xml +++ b/xml/System.IdentityModel.Selectors/CustomUserNameSecurityTokenAuthenticator.xml @@ -17,13 +17,13 @@ Authenticates a security token using a custom authentication scheme. - class when the Windows authentication provided by the class isn't sufficient. The class authenticates the user name and password in a security token as a Windows account. - - To provide a custom authentication scheme, derive a class from the class, implement the authentication scheme, and then pass that class to the constructor for the class. - + class when the Windows authentication provided by the class isn't sufficient. The class authenticates the user name and password in a security token as a Windows account. + + To provide a custom authentication scheme, derive a class from the class, implement the authentication scheme, and then pass that class to the constructor for the class. + ]]> @@ -48,11 +48,11 @@ A that authenticates the user name and password using a custom authentication scheme. Initializes a new instance of the class using the specified validator. - specified in the `validator` parameter is used by the method to authenticate the user. - + specified in the `validator` parameter is used by the method to authenticate the user. + ]]> @@ -85,17 +85,17 @@ Authenticates the specified user name and password and returns the set of authorization policies for security tokens. A of type that contains the set of authorization policies in effect for this application. - method uses the passed into the constructor to authenticate the user. - - When the username and password cannot be validated, throw the . - - When there are no authorization policies in effect for this application, return an empty of type . - - When the method returns `null`, Windows Communication Foundation throws a . - + method uses the passed into the constructor to authenticate the user. + + When the username and password cannot be validated, throw the . + + When there are no authorization policies in effect for this application, return an empty of type . + + When the method returns `null`, Windows Communication Foundation throws a . + ]]> diff --git a/xml/System.IdentityModel.Selectors/KerberosSecurityTokenProvider.xml b/xml/System.IdentityModel.Selectors/KerberosSecurityTokenProvider.xml index e6ea317c7af..c65c393058c 100644 --- a/xml/System.IdentityModel.Selectors/KerberosSecurityTokenProvider.xml +++ b/xml/System.IdentityModel.Selectors/KerberosSecurityTokenProvider.xml @@ -30,7 +30,7 @@ class doesn't need to be called directly, as it is called when a client sends a SOAP message that requires a security token. Specifically, a client specifies the type of security token needed using the class and the class calls the method to get a security token. When the security token needed is a security token, the method calls the method. + In most instances the class doesn't need to be called directly, as it is called when a client sends a SOAP message that requires a security token. Specifically, a client specifies the type of security token needed using the class and the class calls the method to get a security token. When the security token needed is a security token, the method calls the method. ]]> @@ -203,9 +203,9 @@ method is called by the class when a client sends a SOAP message and a security token is needed. + The method is called by the class when a client sends a SOAP message and a security token is needed. - The method calls the method. + The method calls the method. ]]> @@ -242,7 +242,7 @@ property is `null` and the method is called, the current context of the calling thread () is used as a client identity. + When the value of the property is `null` and the method is called, the current context of the calling thread () is used as a client identity. ]]> diff --git a/xml/System.IdentityModel.Selectors/RsaSecurityTokenAuthenticator.xml b/xml/System.IdentityModel.Selectors/RsaSecurityTokenAuthenticator.xml index 18f5c1160d2..34257d2bf4d 100644 --- a/xml/System.IdentityModel.Selectors/RsaSecurityTokenAuthenticator.xml +++ b/xml/System.IdentityModel.Selectors/RsaSecurityTokenAuthenticator.xml @@ -91,7 +91,7 @@ method is called on the authorization policy that is returned from this method, a claim of type is added to the property of the that is passed into the method. + When the method is called on the authorization policy that is returned from this method, a claim of type is added to the property of the that is passed into the method. ]]> diff --git a/xml/System.IdentityModel.Selectors/SamlSecurityTokenAuthenticator.xml b/xml/System.IdentityModel.Selectors/SamlSecurityTokenAuthenticator.xml index f9837fe0567..80bb2f9e4ba 100644 --- a/xml/System.IdentityModel.Selectors/SamlSecurityTokenAuthenticator.xml +++ b/xml/System.IdentityModel.Selectors/SamlSecurityTokenAuthenticator.xml @@ -110,7 +110,7 @@ - Specify the set of valid URIs, by adding the URIs to the collection. -- Optionally, override the method to specify the validation algorithm to use for the allowed URI. +- Optionally, override the method to specify the validation algorithm to use for the allowed URI. ]]>
@@ -148,7 +148,7 @@ > [!NOTE] > When the property is set to , an incoming non-endorsing must contain a and the collection must contain a URI that matches one of the valid URIs specified in the collection. A non-endorsing or bearer token is a security token that is included in the message and not used to sign any part of the message. -- Optionally, override the method to specify the validation algorithm to use for the allowed URI. +- Optionally, override the method to specify the validation algorithm to use for the allowed URI. ]]>
@@ -182,7 +182,7 @@ method does not authenticate the security token; that is performed by the method. + The method does not authenticate the security token; that is performed by the method. ]]> @@ -345,7 +345,7 @@ method is called by the method when the property is set to or . + The method is called by the method when the property is set to or . ]]> diff --git a/xml/System.IdentityModel.Selectors/SecurityTokenAuthenticator.xml b/xml/System.IdentityModel.Selectors/SecurityTokenAuthenticator.xml index 9f959b6441c..ab571587bb8 100644 --- a/xml/System.IdentityModel.Selectors/SecurityTokenAuthenticator.xml +++ b/xml/System.IdentityModel.Selectors/SecurityTokenAuthenticator.xml @@ -44,7 +44,7 @@ ## Remarks The class and the classes that derive from it authenticate security tokens. Typically, you would only derive a class directly from when you create a custom security token. If you wanted to override the default authentication or authorization behaviors for built-in security tokens, derive from one of the classes that derive from , such as . - When you derive a class from , override the following two methods: and . The method determines whether this security token authenticator can authenticate a specific security token. The method authenticates the security token and establishes a set of authorization policies for authorization. The authorization policies map the claims found in the security token to claims required by the application. + When you derive a class from , override the following two methods: and . The method determines whether this security token authenticator can authenticate a specific security token. The method authenticates the security token and establishes a set of authorization policies for authorization. The authorization policies map the claims found in the security token to claims required by the application. ]]>
@@ -113,7 +113,7 @@ method checks whether the token parameter is `null` and then calls the method to determine whether this security token authenticator can authenticate the security token type for `token`. + The method checks whether the token parameter is `null` and then calls the method to determine whether this security token authenticator can authenticate the security token type for `token`. ]]> @@ -158,7 +158,7 @@ method is called by the method to determine whether this security token authenticator can authenticate the security token type for `token`. This does not authenticate the security token; that is performed by the method. + The method is called by the method to determine whether this security token authenticator can authenticate the security token type for `token`. This does not authenticate the security token; that is performed by the method. ]]> @@ -200,7 +200,7 @@ method checks whether the `token` parameter is `null`, calls the method to determine if this security token authenticator can authenticate this security token, and then if it can, calls the method. + The method checks whether the `token` parameter is `null`, calls the method to determine if this security token authenticator can authenticate this security token, and then if it can, calls the method. ]]> @@ -251,17 +251,17 @@ method to authenticate a specific security token type. + Override the method to authenticate a specific security token type. - When the method is overridden, follow these guidelines: + When the method is overridden, follow these guidelines: - When the security token passed into the `token` parameter cannot be validated, throw a exception. -- When there are no authorization policies in effect for this application, return an empty of type . +- When there are no authorization policies in effect for this application, return an empty of type . When this method returns `null`, Windows Communication Foundation throws a exception. - The method is called by the method. + The method is called by the method. ]]> diff --git a/xml/System.IdentityModel.Selectors/SecurityTokenManager.xml b/xml/System.IdentityModel.Selectors/SecurityTokenManager.xml index 8e24d2c02d4..83d7bfd3da3 100644 --- a/xml/System.IdentityModel.Selectors/SecurityTokenManager.xml +++ b/xml/System.IdentityModel.Selectors/SecurityTokenManager.xml @@ -39,13 +39,13 @@ Represents a security token manager that specifies how security tokens are provided, authenticated, and serialized. - class when you need a custom security token, security token authenticator, or security token provider. Use a custom security token to handle credentials that WCF does not support. Use a custom security token authenticator when the authentication methods WCF provides are not sufficient. A class returns a security token authenticator in the method. A security token provider provides security tokens for outgoing SOAP messages. A class returns a security token provider in the method. - - For more information about using custom security token authenticators and security token providers, see [Custom Credential and Credential Validation](/dotnet/framework/wcf/extending/custom-credential-and-credential-validation). For more information about creating a custom security token, see [How to: Create a Custom Token](/dotnet/framework/wcf/extending/how-to-create-a-custom-token). - + class when you need a custom security token, security token authenticator, or security token provider. Use a custom security token to handle credentials that WCF does not support. Use a custom security token authenticator when the authentication methods WCF provides are not sufficient. A class returns a security token authenticator in the method. A security token provider provides security tokens for outgoing SOAP messages. A class returns a security token provider in the method. + + For more information about using custom security token authenticators and security token providers, see [Custom Credential and Credential Validation](/dotnet/framework/wcf/extending/custom-credential-and-credential-validation). For more information about creating a custom security token, see [How to: Create a Custom Token](/dotnet/framework/wcf/extending/how-to-create-a-custom-token). + ]]> @@ -110,11 +110,11 @@ Gets a security token authenticator that meets the specified security token requirements. A that authenticates security tokens in incoming SOAP messages that meet the specified requirements. - class provides types that can provide security tokens for outgoing SOAP messages and authenticate security tokens in incoming SOAP messages. The method returns a class that can authenticate security tokens that match the criteria specified in the `tokenRequirement` parameter. - + class provides types that can provide security tokens for outgoing SOAP messages and authenticate security tokens in incoming SOAP messages. The method returns a class that can authenticate security tokens that match the criteria specified in the `tokenRequirement` parameter. + ]]> @@ -151,11 +151,11 @@ Gets a security token provider that meets the specified security token requirements. A that provides security tokens that meet the specified requirements for outgoing SOAP messages. - class provides types that can provide security tokens for outgoing SOAP messages and authenticate security tokens in incoming SOAP messages. The method returns a class that can authenticate security tokens that can provide security tokens that match the criteria specified in the `tokenRequirement` parameter. - + class provides types that can provide security tokens for outgoing SOAP messages and authenticate security tokens in incoming SOAP messages. The method returns a class that can authenticate security tokens that can provide security tokens that match the criteria specified in the `tokenRequirement` parameter. + ]]> @@ -192,11 +192,11 @@ Gets an XML serializer that can serialize security tokens in the specified version of the WS-* specifications. A to serialize the security tokens. - and return an instance of that class for the method. The class, which derives from the class, is capable of serializing and deserializing the security tokens that ship with WCF. Thus, to add support for a custom token to the serializer, override the virtual methods in the class, add code that checks whether the desired security token is the custom token, and, if not, call the base class method. - + and return an instance of that class for the method. The class, which derives from the class, is capable of serializing and deserializing the security tokens that ship with WCF. Thus, to add support for a custom token to the serializer, override the virtual methods in the class, add code that checks whether the desired security token is the custom token, and, if not, call the base class method. + ]]> diff --git a/xml/System.IdentityModel.Selectors/SecurityTokenProvider.xml b/xml/System.IdentityModel.Selectors/SecurityTokenProvider.xml index 6695951f865..59ce1536571 100644 --- a/xml/System.IdentityModel.Selectors/SecurityTokenProvider.xml +++ b/xml/System.IdentityModel.Selectors/SecurityTokenProvider.xml @@ -39,21 +39,21 @@ Represents a security token provider that handles security tokens for a SOAP message sender. - class when custom security tokens are required. The role of a security token provider is to get a security token when a SOAP message is sent by a client and a security token is used to authenticate the client or to protect the SOAP message. Specifically, the method is called to get a security token. The security token provider can also be called to cancel and renew a security using the and methods. - - Classes that derive from the class implement the method to determine which security token provider is required for a given security token. - - The and classes provide the default implementations for built-in security token types. For custom security token scenarios, you must derive a class from one of the , , or classes and provide the functionality to create the security token provider, security token authenticator, and security token serializer for the custom security token. For more information about creating a custom token, see [How to: Create a Custom Token](/dotnet/framework/wcf/extending/how-to-create-a-custom-token). - - - -## Examples + class when custom security tokens are required. The role of a security token provider is to get a security token when a SOAP message is sent by a client and a security token is used to authenticate the client or to protect the SOAP message. Specifically, the method is called to get a security token. The security token provider can also be called to cancel and renew a security using the and methods. + + Classes that derive from the class implement the method to determine which security token provider is required for a given security token. + + The and classes provide the default implementations for built-in security token types. For custom security token scenarios, you must derive a class from one of the , , or classes and provide the functionality to create the security token provider, security token authenticator, and security token serializer for the custom security token. For more information about creating a custom token, see [How to: Create a Custom Token](/dotnet/framework/wcf/extending/how-to-create-a-custom-token). + + + +## Examples :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/securitytokenprovider/cs/samlsecuritytokenprovider.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/securitytokenprovider/vb/samlsecuritytokenprovider.vb" id="Snippet0"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/securitytokenprovider/vb/samlsecuritytokenprovider.vb" id="Snippet0"::: + ]]> @@ -125,16 +125,16 @@ Begins an asynchronous operation to cancel a security token. The that references the asynchronous cancel operation. - - The method is called by the method. - + The method is called by the method. + The asynchronous methods, which have a prefix of Begin and End, do not need to be overridden in derived classes. The base class provides an asynchronous implementation that is based on the synchronous methods. @@ -177,18 +177,18 @@ Begins an asynchronous operation to cancel a security token. The that references the asynchronous cancel operation. - - When you inherit from the class you are not required to override the asynchronous methods, as the base class provides asynchronous support based upon the synchronous methods. Therefore, you are not required to override the method, unless you need to provide your own asynchronous implementation. - - The method is called by the method. - + When you inherit from the class you are not required to override the asynchronous methods, as the base class provides asynchronous support based upon the synchronous methods. Therefore, you are not required to override the method, unless you need to provide your own asynchronous implementation. + + The method is called by the method. + The asynchronous methods, which have a prefix of Begin and End, do not need to be overridden in derived classes. The base class provides an asynchronous implementation that is based on the synchronous methods. @@ -229,11 +229,11 @@ Begins an asynchronous operation to get a security token. The that references the asynchronous close operation. - method calls the method. - + method calls the method. + ]]> @@ -277,13 +277,13 @@ Begins an asynchronous operation to get a security token. The that references the asynchronous operation. - class you are not required to override the asynchronous methods, as the base class provides asynchronous support based upon the synchronous methods. Therefore, you are not required to override the method, unless you must provide your own asynchronous implementation. - - The method calls the method. - + class you are not required to override the asynchronous methods, as the base class provides asynchronous support based upon the synchronous methods. Therefore, you are not required to override the method, unless you must provide your own asynchronous implementation. + + The method calls the method. + ]]> @@ -329,11 +329,11 @@ Begins an asynchronous operation that renews a security token. The that references the asynchronous operation. - method calls the method. - + method calls the method. + ]]> @@ -379,13 +379,13 @@ Begins an asynchronous operation that renews a security token. The that references the asynchronous operation. - class you are not required to override the asynchronous methods, as the base class provides asynchronous support based upon the synchronous methods. Therefore, you are not required to override the method, unless you must provide your own asynchronous implementation. - - The method calls the method. - + class you are not required to override the asynchronous methods, as the base class provides asynchronous support based upon the synchronous methods. Therefore, you are not required to override the method, unless you must provide your own asynchronous implementation. + + The method calls the method. + ]]> @@ -423,13 +423,13 @@ The to cancel. Cancels a security token. - method calls method. - + method calls method. + ]]> @@ -466,13 +466,13 @@ Cancels a security token. The that represents the asynchronous token cancellation operation. - method calls method. - + method calls method. + This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . ]]> @@ -512,15 +512,15 @@ The to cancel. Cancels a security token. - method calls method. - - When the method is overridden and the security token passed into the token parameter cannot be canceled, throw the exception. - + method calls method. + + When the method is overridden and the security token passed into the token parameter cannot be canceled, throw the exception. + ]]> @@ -557,15 +557,15 @@ Cancels a security token. The that represents the asynchronous token cancellation operation. - method calls method. - - When the method is overridden and the security token passed into the token parameter cannot be canceled, throw the exception. - + method calls method. + + When the method is overridden and the security token passed into the token parameter cannot be canceled, throw the exception. + This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . ]]> @@ -603,13 +603,13 @@ The that is returned by a call to the method. Completes an asynchronous operation to cancel a security token. - method calls method. - + method calls method. + ]]> @@ -648,15 +648,15 @@ The that is returned by a call to the method. Completes an asynchronous operation to cancel a security token. - class you are not required to override the asynchronous methods, as the base class provides asynchronous support based upon the synchronous methods. Therefore, you are not required to override the method, unless you must provide your own asynchronous implementation. - - The method calls method. - + class you are not required to override the asynchronous methods, as the base class provides asynchronous support based upon the synchronous methods. Therefore, you are not required to override the method, unless you must provide your own asynchronous implementation. + + The method calls method. + ]]> @@ -693,11 +693,11 @@ Completes an asynchronous operation to get a security token. The that represents the security token. - method calls the method. - + method calls the method. + ]]> @@ -734,13 +734,13 @@ Completes an asynchronous operation to get a security token. The that represents the security token. - class you are not required to override the asynchronous methods, as the base class provides asynchronous support based upon the synchronous methods. Therefore, you are not required to override the method, unless you must provide your own asynchronous implementation. - - The method calls the method. - + class you are not required to override the asynchronous methods, as the base class provides asynchronous support based upon the synchronous methods. Therefore, you are not required to override the method, unless you must provide your own asynchronous implementation. + + The method calls the method. + ]]> @@ -777,11 +777,11 @@ Completes an asynchronous operation to renew a security token. The that represents the security token that is renewed. - method calls the method. - + method calls the method. + ]]> @@ -818,13 +818,13 @@ Completes an asynchronous operation to renew the security token. The that represents the security token that is renewed. - class you are not required to override the asynchronous methods, as the base class provides asynchronous support based upon the synchronous methods. Therefore, you are not required to override the method, unless you must provide your own asynchronous implementation. - - The method calls the method. - + class you are not required to override the asynchronous methods, as the base class provides asynchronous support based upon the synchronous methods. Therefore, you are not required to override the method, unless you must provide your own asynchronous implementation. + + The method calls the method. + ]]> @@ -861,15 +861,15 @@ Gets a security token. The that represents the security token to get. - method is called by the class when a client sends a SOAP message and a security token is required. - - The method calls the method. - - In most cases the `timeout` parameter is not used by derived classes of such as . However, sometimes retrieving a security token involves distributed messaging. An example is used in a federated service. In these cases the `timeout` parameter is used to avoid exceptions caused by network failures, message loss, and other error conditions. - + method is called by the class when a client sends a SOAP message and a security token is required. + + The method calls the method. + + In most cases the `timeout` parameter is not used by derived classes of such as . However, sometimes retrieving a security token involves distributed messaging. An example is used in a federated service. In these cases the `timeout` parameter is used to avoid exceptions caused by network failures, message loss, and other error conditions. + ]]> @@ -904,15 +904,15 @@ Gets a security token. The that represents the asynchronous read operation and wraps the that represents the security token to get. - method is called by the class when a client sends a SOAP message and a security token is required. - - The method calls the method. - - In most cases the `timeout` parameter is not used by derived classes of such as . However, sometimes retrieving a security token involves distributed messaging. An example is used in a federated service. In these cases the `timeout` parameter is used to avoid exceptions caused by network failures, message loss, and other error conditions. - + method is called by the class when a client sends a SOAP message and a security token is required. + + The method calls the method. + + In most cases the `timeout` parameter is not used by derived classes of such as . However, sometimes retrieving a security token involves distributed messaging. An example is used in a federated service. In these cases the `timeout` parameter is used to avoid exceptions caused by network failures, message loss, and other error conditions. + This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . ]]> @@ -951,21 +951,21 @@ Gets a security token. The that represents the security token to get. - method is overridden and the security token passed into the token parameter cannot be obtained, throw the exception. - - The method is called by the class when a client sends a SOAP message and a security token is required. - - The method calls the method. - - - -## Examples + method is overridden and the security token passed into the token parameter cannot be obtained, throw the exception. + + The method is called by the class when a client sends a SOAP message and a security token is required. + + The method calls the method. + + + +## Examples :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/securitytokenprovider/cs/samlsecuritytokenprovider.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/securitytokenprovider/vb/samlsecuritytokenprovider.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/securitytokenprovider/vb/samlsecuritytokenprovider.vb" id="Snippet1"::: + ]]> @@ -1000,14 +1000,14 @@ Gets a security token. The that represents the asynchronous read operation and wraps the that represents the security token to get. - method is overridden and the security token passed into the token parameter cannot be obtained, throw the exception. - - The method is called by the class when a client sends a SOAP message and a security token is required. - - The method calls the method. + method is overridden and the security token passed into the token parameter cannot be obtained, throw the exception. + + The method is called by the class when a client sends a SOAP message and a security token is required. + + The method calls the method. This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . @@ -1049,13 +1049,13 @@ Renews a security token. The that represents the security token that is renewed. - method calls the method. - + method calls the method. + ]]> @@ -1092,13 +1092,13 @@ Renews a security token. The that represents the asynchronous read operation and wraps the that represents the security token that is renewed. - method calls the method. - + method calls the method. + This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . ]]> @@ -1139,15 +1139,15 @@ Renews a security token. The that represents the security token that is renewed. - method is overridden and the security token passed into the token parameter cannot be renewed, throw the exception. - - The method calls the method. - + method is overridden and the security token passed into the token parameter cannot be renewed, throw the exception. + + The method calls the method. + ]]> @@ -1184,15 +1184,15 @@ Renews a security token. The that represents the asynchronous read operation and wraps the that represents the security token that is renewed. - method is overridden and the security token passed into the token parameter cannot be renewed, throw the exception. - - The method calls the method. - + method is overridden and the security token passed into the token parameter cannot be renewed, throw the exception. + + The method calls the method. + This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as , are still thrown synchronously. For the stored exceptions, see the exceptions thrown by . ]]> @@ -1228,11 +1228,11 @@ if the security token can be cancelled; otherwise, . The default is . - @@ -1266,11 +1266,11 @@ if the security token can be renewed; otherwise, . The default is . - diff --git a/xml/System.IdentityModel.Selectors/SecurityTokenRequirement.xml b/xml/System.IdentityModel.Selectors/SecurityTokenRequirement.xml index 11323fcd72d..b04cd1719b0 100644 --- a/xml/System.IdentityModel.Selectors/SecurityTokenRequirement.xml +++ b/xml/System.IdentityModel.Selectors/SecurityTokenRequirement.xml @@ -42,7 +42,7 @@ class, unless a custom security token, security token manager, security token provider, or security token authenticator are created. The class is used by a security token manager to specify what is required of a security token, such as the key size, key type, and how the key can be used. When a security token can be identified that matches the specified criteria, a and can be obtained to provide security tokens for outgoing SOAP messages and to authenticate security tokens for incoming SOAP messages, respectively. For example, the default security token manager for outgoing SOAP messages has the method that takes a parameter that can be called to obtain a security token provider that matches the criteria specified in the security token requirement. + Application code typically does not need to use the class, unless a custom security token, security token manager, security token provider, or security token authenticator are created. The class is used by a security token manager to specify what is required of a security token, such as the key size, key type, and how the key can be used. When a security token can be identified that matches the specified criteria, a and can be obtained to provide security tokens for outgoing SOAP messages and to authenticate security tokens for incoming SOAP messages, respectively. For example, the default security token manager for outgoing SOAP messages has the method that takes a parameter that can be called to obtain a security token provider that matches the criteria specified in the security token requirement. @@ -55,13 +55,13 @@ - + - + - + - + ]]> @@ -132,7 +132,7 @@ method first calls the method to determine if the property specified in the `propertyName` parameter has been set. Secondly, the method verifies that when a property value is returned that it can be set to the type specified in the `TValue` parameter. + The method first calls the method to determine if the property specified in the `propertyName` parameter has been set. Secondly, the method verifies that when a property value is returned that it can be set to the type specified in the `TValue` parameter. ]]> @@ -668,7 +668,7 @@ method. + To get the property value of the specified property and verify that property value can be set to the type specified in the `TValue` parameter, call the method. ]]> diff --git a/xml/System.IdentityModel.Selectors/SecurityTokenResolver.xml b/xml/System.IdentityModel.Selectors/SecurityTokenResolver.xml index 23165ce31fb..f819eebe7db 100644 --- a/xml/System.IdentityModel.Selectors/SecurityTokenResolver.xml +++ b/xml/System.IdentityModel.Selectors/SecurityTokenResolver.xml @@ -51,7 +51,7 @@ class to retrieve a key or security token when you have a key identifier or key identifier clause. The and methods retrieve a token given that there is a key identifier or key identifier clause. The and retrieve a key given that there is a key identifier clause. The methods with a `Try` prefix return `false` when the retrieval is unsuccessful, whereas the methods without a `Try` prefix throw an exception. + Use the class to retrieve a key or security token when you have a key identifier or key identifier clause. The and methods retrieve a token given that there is a key identifier or key identifier clause. The and retrieve a key given that there is a key identifier clause. The methods with a `Try` prefix return `false` when the retrieval is unsuccessful, whereas the methods without a `Try` prefix throw an exception. ]]> @@ -121,7 +121,7 @@ and methods on the specified security tokens to resolve key identifiers and key identifier clauses. + The security token resolver that is returned from this method, uses the and methods on the specified security tokens to resolve key identifiers and key identifier clauses. ]]> @@ -199,7 +199,7 @@ and methods differ in what happens when the key identifier clause cannot be resolved to a key. The method returns `false`, whereas the method throws an exception. + The and methods differ in what happens when the key identifier clause cannot be resolved to a key. The method returns `false`, whereas the method throws an exception. ]]> @@ -252,7 +252,7 @@ and methods differ in what happens when the key identifier cannot be resolved to a security token. The method returns `false`, whereas the method throws an exception. + The and methods differ in what happens when the key identifier cannot be resolved to a security token. The method returns `false`, whereas the method throws an exception. ]]> @@ -296,7 +296,7 @@ and methods differ in what happens when the key identifier clause cannot be resolved to a security token. The method returns `false`, whereas the method throws an exception. + The and methods differ in what happens when the key identifier clause cannot be resolved to a security token. The method returns `false`, whereas the method throws an exception. ]]> @@ -340,7 +340,7 @@ and methods differ in what happens when the key identifier clause cannot be resolved to a key. The method returns `false`, whereas the method throws an exception. + The and methods differ in what happens when the key identifier clause cannot be resolved to a key. The method returns `false`, whereas the method throws an exception. ]]> @@ -386,7 +386,7 @@ method is called by the and methods. + The method is called by the and methods. ]]> @@ -439,7 +439,7 @@ and methods differ in what happens when the key identifier cannot be resolved to a security token. The method returns `false`, whereas the method throws an exception. + The and methods differ in what happens when the key identifier cannot be resolved to a security token. The method returns `false`, whereas the method throws an exception. ]]> @@ -485,7 +485,7 @@ and methods differ in what happens when the key identifier clause cannot be resolved to a security token. The method returns `false`, whereas the method throws an exception. + The and methods differ in what happens when the key identifier clause cannot be resolved to a security token. The method returns `false`, whereas the method throws an exception. ]]> @@ -540,7 +540,7 @@ method is called by the and methods. + The method is called by the and methods. ]]> @@ -584,7 +584,7 @@ method is called by the and methods. + The method is called by the and methods. ]]> diff --git a/xml/System.IdentityModel.Selectors/SecurityTokenSerializer.xml b/xml/System.IdentityModel.Selectors/SecurityTokenSerializer.xml index 93baa6930ce..85eac6cfb7c 100644 --- a/xml/System.IdentityModel.Selectors/SecurityTokenSerializer.xml +++ b/xml/System.IdentityModel.Selectors/SecurityTokenSerializer.xml @@ -39,11 +39,11 @@ Represents a class that can read and write key identifiers, key identifier clauses, and security tokens. - class to read and write , , and classes as XML. The class has methods to determine whether this class can read and write these entities and to actually read and write them. For security tokens, these methods are , , , and . - + class to read and write , , and classes as XML. The class has methods to determine whether this class can read and write these entities and to actually read and write them. For security tokens, these methods are , , , and . + ]]> @@ -107,11 +107,11 @@ when the specified XML element can be read; otherwise, . - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -151,11 +151,11 @@ when the specified key identifier clause can be read; otherwise, . - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -195,11 +195,11 @@ when the specified element can be read; otherwise, . - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -239,11 +239,11 @@ when the specified key identifier clause can be read; otherwise, . - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -283,11 +283,11 @@ when the security token can be read; otherwise, . - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -327,11 +327,11 @@ when the security token can be read; otherwise, . - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -371,11 +371,11 @@ when this serializer can write the specified key identifier; otherwise, . - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -415,11 +415,11 @@ when this serializer can write the specified key identifier clause; otherwise, . - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -459,11 +459,11 @@ when this serializer can write the specified key identifier clause; otherwise, . - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -503,11 +503,11 @@ when this serializer can write the specified key identifier; otherwise, . - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -547,11 +547,11 @@ when the security token can be written; otherwise, . - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -591,11 +591,11 @@ when the security token can be written; otherwise, . - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -634,11 +634,11 @@ Reads the key identifier using specified XML reader. A that represents the key identifier that is read. - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -677,11 +677,11 @@ Reads the key identifier clause using specified XML reader. A that represents the key identifier that is read. - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -720,11 +720,11 @@ Reads the key identifier clause using specified XML reader. Called by the base class. A that represents the key identifier that is read. - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -763,11 +763,11 @@ Reads the key identifier clause using specified XML reader. Called by the base class. A that represents the key identifier that is read. - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> @@ -808,18 +808,18 @@ Reads the security token pointed at by the specified XML reader. A that represents the security token that is read. - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> - is . - - -or- - + is . + + -or- + is . @@ -857,18 +857,18 @@ Reads the security token pointed at by the specified XML reader. Called by the base class. A that represents the security token that is read. - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> - is . - - -or- - + is . + + -or- + is . @@ -905,18 +905,18 @@ A that represents the key identifier to write. Writes the specified key identifier using the specified XML writer. - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> - is . - - -or- - + is . + + -or- + is . @@ -953,18 +953,18 @@ A that represents the key identifier clause to write. Writes the specified key identifier clause using the specified XML writer. - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> - is . - - -or- - + is . + + -or- + is . @@ -1001,18 +1001,18 @@ A that represents the key identifier clause to write. Writes the specified key identifier clause using the specified XML writer. Called by the base class. - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> - is . - - -or- - + is . + + -or- + is . @@ -1049,18 +1049,18 @@ A that represents the key identifier to write. Writes the specified key identifier using the specified XML writer. Called by the base class. - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> - is . - - -or- - + is . + + -or- + is . @@ -1097,18 +1097,18 @@ A that represents the security token to write. Writes the specified security token using the specified XML writer. - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> - is . - - -or- - + is . + + -or- + is . @@ -1145,18 +1145,18 @@ A that represents the security token to write. Writes the specified security token using the specified XML writer. Called by the base class. - class must override the method. The method calls the method. - + class must override the method. The method calls the method. + ]]> - is . - - -or- - + is . + + -or- + is . diff --git a/xml/System.IdentityModel.Selectors/SecurityTokenVersion.xml b/xml/System.IdentityModel.Selectors/SecurityTokenVersion.xml index 51ca3e98045..82707ca8aed 100644 --- a/xml/System.IdentityModel.Selectors/SecurityTokenVersion.xml +++ b/xml/System.IdentityModel.Selectors/SecurityTokenVersion.xml @@ -39,13 +39,13 @@ Represents the specifications, such as the WS-*specifications, that security tokens are defined in. - class to determine which version of the WS-* specifications that security tokens confirm to in a SOAP message. - - Use the method to create a that is capable of serializing and deserializing security tokens according to the set of specifications that are associated with a class deriving from the class. - + class to determine which version of the WS-* specifications that security tokens confirm to in a SOAP message. + + Use the method to create a that is capable of serializing and deserializing security tokens according to the set of specifications that are associated with a class deriving from the class. + ]]> diff --git a/xml/System.IdentityModel.Selectors/UserNamePasswordValidator.xml b/xml/System.IdentityModel.Selectors/UserNamePasswordValidator.xml index 0dfa0a14539..5da2cd22d8e 100644 --- a/xml/System.IdentityModel.Selectors/UserNamePasswordValidator.xml +++ b/xml/System.IdentityModel.Selectors/UserNamePasswordValidator.xml @@ -20,7 +20,7 @@ class to specify how a username and password is validated. This can be done by deriving a class from and overriding the method. For more information about creating a custom user name and password validator, see [How to: Use a Custom User Name and Password Validator](/dotnet/framework/wcf/feature-details/how-to-use-a-custom-user-name-and-password-validator). + Use the class to specify how a username and password is validated. This can be done by deriving a class from and overriding the method. For more information about creating a custom user name and password validator, see [How to: Use a Custom User Name and Password Validator](/dotnet/framework/wcf/feature-details/how-to-use-a-custom-user-name-and-password-validator). ]]> @@ -133,7 +133,7 @@ method to specify how the username and password is validated. If the username and password do not pass validation, then throw a . +Override the method to specify how the username and password is validated. If the username and password do not pass validation, then throw a . ]]> diff --git a/xml/System.IdentityModel.Selectors/UserNameSecurityTokenAuthenticator.xml b/xml/System.IdentityModel.Selectors/UserNameSecurityTokenAuthenticator.xml index 028053d45c2..7509e0054b8 100644 --- a/xml/System.IdentityModel.Selectors/UserNameSecurityTokenAuthenticator.xml +++ b/xml/System.IdentityModel.Selectors/UserNameSecurityTokenAuthenticator.xml @@ -29,7 +29,7 @@ ||Allows an application to provide a custom authentication scheme for user names and passwords. The authentication scheme is provided using a class deriving from the class.| ||Authenticates the user name and password as a Windows account.| - Most custom authentication schemes can use the use the class and implement a class that derives from the class. However, if additional flexibility is needed, you can derive a class from the class and override the method. + Most custom authentication schemes can use the use the class and implement a class that derives from the class. However, if additional flexibility is needed, you can derive a class from the class and override the method. @@ -87,7 +87,7 @@ method does not authenticate the security token; that is performed by the method. + The method does not authenticate the security token; that is performed by the method. ]]> @@ -120,7 +120,7 @@ method calls the method to authenticate the `token` parameter using its user name and password. + The method calls the method to authenticate the `token` parameter using its user name and password. ]]> @@ -155,13 +155,13 @@ method to authenticate security tokens. + Override the method to authenticate security tokens. - When the method is overridden, follow these guidelines: + When the method is overridden, follow these guidelines: - When the security token passed into the `token` parameter cannot be validated, throw the exception. -- When there are no authorization policies in effect for this application, return an empty of type . +- When there are no authorization policies in effect for this application, return an empty of type . When this method returns `null`, Windows Communication Foundation throws a exception. diff --git a/xml/System.IdentityModel.Selectors/UserNameSecurityTokenProvider.xml b/xml/System.IdentityModel.Selectors/UserNameSecurityTokenProvider.xml index 78c38c07629..3059deb19b1 100644 --- a/xml/System.IdentityModel.Selectors/UserNameSecurityTokenProvider.xml +++ b/xml/System.IdentityModel.Selectors/UserNameSecurityTokenProvider.xml @@ -27,11 +27,11 @@ Represents a security token provider that provides security tokens for a SOAP message sender. - class doesn't need to be called directly, as it is called when a client sends a SOAP message that requires a security token. Specifically, a client specifies the type of security token needed using the class and the class calls the method to get a security token. When the security token needed is a security token, the method calls the method. - + class doesn't need to be called directly, as it is called when a client sends a SOAP message that requires a security token. Specifically, a client specifies the type of security token needed using the class and the class calls the method to get a security token. When the security token needed is a security token, the method calls the method. + ]]> @@ -69,11 +69,11 @@ The password of the user to get a security token for. Initializes a new instance of the class using the specified username and password. - method gets a token based on the specified username and password. - + method gets a token based on the specified username and password. + ]]> @@ -110,13 +110,13 @@ Gets a security token based on the username and password specified in the constructor. The that represents the security token to get. - method is called by the class when a client sends a SOAP message and an security token is needed. - - The method calls the method. - + method is called by the class when a client sends a SOAP message and an security token is needed. + + The method calls the method. + ]]> diff --git a/xml/System.IdentityModel.Selectors/WindowsSecurityTokenAuthenticator.xml b/xml/System.IdentityModel.Selectors/WindowsSecurityTokenAuthenticator.xml index f058e592b98..108a26e038b 100644 --- a/xml/System.IdentityModel.Selectors/WindowsSecurityTokenAuthenticator.xml +++ b/xml/System.IdentityModel.Selectors/WindowsSecurityTokenAuthenticator.xml @@ -127,7 +127,7 @@ method does not authenticate the security token; that is performed by the method. + The method does not authenticate the security token; that is performed by the method. ]]> diff --git a/xml/System.IdentityModel.Selectors/WindowsUserNameSecurityTokenAuthenticator.xml b/xml/System.IdentityModel.Selectors/WindowsUserNameSecurityTokenAuthenticator.xml index 2977ff54864..56568b83e09 100644 --- a/xml/System.IdentityModel.Selectors/WindowsUserNameSecurityTokenAuthenticator.xml +++ b/xml/System.IdentityModel.Selectors/WindowsUserNameSecurityTokenAuthenticator.xml @@ -20,7 +20,7 @@ method uses Windows authentication to authenticate a user name and password. + The method uses Windows authentication to authenticate a user name and password. To provide a custom authentication scheme, see the class. diff --git a/xml/System.IdentityModel.Selectors/X509CertificateValidator.xml b/xml/System.IdentityModel.Selectors/X509CertificateValidator.xml index 10911cbad1c..2e703ee3111 100644 --- a/xml/System.IdentityModel.Selectors/X509CertificateValidator.xml +++ b/xml/System.IdentityModel.Selectors/X509CertificateValidator.xml @@ -55,7 +55,7 @@ class to specify how an X.509 certificate is deemed valid. This can be done using by deriving a class from and overriding the method. + Use the class to specify how an X.509 certificate is deemed valid. This can be done using by deriving a class from and overriding the method. @@ -187,7 +187,7 @@ method instead of the property to specify the context or to set chain policy. Chain policy can be used to specify the Enhanced Key Usage (EKU) for which the chain should be validated, or specify revocation checking. + Use the method instead of the property to specify the context or to set chain policy. Chain policy can be used to specify the Enhanced Key Usage (EKU) for which the chain should be validated, or specify revocation checking. The return value for this static method can be supplied as a parameter to the constructors for the class that take a validator. @@ -233,7 +233,7 @@ method instead of the property to specify the context or to set chain policy. Chain policy can be used to specify the Enhanced Key Usage (EKU) for which the chain should be validated, or specify revocation checking. + Use the method instead of the property to specify the context or to set chain policy. Chain policy can be used to specify the Enhanced Key Usage (EKU) for which the chain should be validated, or specify revocation checking. The value of this static property can be supplied as a parameter to one of the constructors for the class. @@ -428,7 +428,7 @@ method to specify how the X.509 certificate is validated. + Override the method to specify how the X.509 certificate is validated. When the X.509 certificate that is passed into the `certificate` parameter does not pass validation, throw the . diff --git a/xml/System.IdentityModel.Selectors/X509SecurityTokenAuthenticator.xml b/xml/System.IdentityModel.Selectors/X509SecurityTokenAuthenticator.xml index c1d8b0310ca..599adfd75ed 100644 --- a/xml/System.IdentityModel.Selectors/X509SecurityTokenAuthenticator.xml +++ b/xml/System.IdentityModel.Selectors/X509SecurityTokenAuthenticator.xml @@ -79,7 +79,7 @@ method is called to authenticate the token, the X.509 certificate is not mapped to a Windows identity and the certificate is validated using a certificate chain. + When the method is called to authenticate the token, the X.509 certificate is not mapped to a Windows identity and the certificate is validated using a certificate chain. ]]> @@ -116,7 +116,7 @@ class provides a set of pre-defined certificate validation models, such as the property. These validation models can be passed to the `validator` parameter. When an application requires a custom validation method, derive a class from and override the method. The method is called by the method. + The class provides a set of pre-defined certificate validation models, such as the property. These validation models can be passed to the `validator` parameter. When an application requires a custom validation method, derive a class from and override the method. The method is called by the method. By default, the does not map the X.509 certificate to a Windows identity. @@ -157,9 +157,9 @@ class provides a set of pre-defined certificate validation models, such as the property. These validation models can be passed to the `validator` parameter. When an application requires a custom validation method, derive a class from and override the method. The method is called by the method. + The class provides a set of pre-defined certificate validation models, such as the property. These validation models can be passed to the `validator` parameter. When an application requires a custom validation method, derive a class from and override the method. The method is called by the method. - When the method is called to authenticate the token and `mapToWindows` is `true`, the X.509 certificate is mapped to a Windows account and claims are added to the with the Windows groups that the user belongs to. How the X.509 certificate is mapped to a Windows account depends upon the security token type: + When the method is called to authenticate the token and `mapToWindows` is `true`, the X.509 certificate is mapped to a Windows account and claims are added to the with the Windows groups that the user belongs to. How the X.509 certificate is mapped to a Windows account depends upon the security token type: - When the security token is of type , the X.509 certificate is mapped using the property. @@ -207,7 +207,7 @@ ## Remarks Pass `false` to the `includeWindowsGroups` parameter when the Windows group information is not required to improve performance. - The class has several static properties, such as the property that can be passed to the `validator` parameter. These properties provide common validation methods for X.509 certificates. When a custom validation method is required, derive a class from and override the method. The method is called by the method. + The class has several static properties, such as the property that can be passed to the `validator` parameter. These properties provide common validation methods for X.509 certificates. When a custom validation method is required, derive a class from and override the method. The method is called by the method. When `true` is passed into the `mapToWindows` parameter, the X.509 certificate is mapped to a Windows account and relevant claims are added to the , such as the Windows groups that the user belongs to. When the security token is of type , the property is using the identity that is specified in the token; otherwise, the X.509 certificate is mapped to a Windows identity using a Kerberos S4U logon based on the user principal name SubjectAltNames extension of the X.509 certificate. @@ -251,7 +251,7 @@ method does not authenticate the security token; that is performed by the method. + The method does not authenticate the security token; that is performed by the method. ]]> @@ -327,15 +327,15 @@ method is overridden, follow these guidelines: + When the method is overridden, follow these guidelines: - When the security token passed into the `token` parameter cannot be validated, throw the exception. -- When there are no authorization policies in effect for this application, return an empty of type . +- When there are no authorization policies in effect for this application, return an empty of type . When this method returns `null`, Windows Communication Foundation throws a exception. - The method calls the method of the validation method specified in the constructor to authenticate the `token` parameter. + The method calls the method of the validation method specified in the constructor to authenticate the `token` parameter. ]]> diff --git a/xml/System.IdentityModel.Selectors/X509SecurityTokenProvider.xml b/xml/System.IdentityModel.Selectors/X509SecurityTokenProvider.xml index 79cc760fa39..cbab66c2ab1 100644 --- a/xml/System.IdentityModel.Selectors/X509SecurityTokenProvider.xml +++ b/xml/System.IdentityModel.Selectors/X509SecurityTokenProvider.xml @@ -34,7 +34,7 @@ class directly, as it is called when a client sends a SOAP message that requires a security token. Specifically, a client specifies the type of security token required, using the class and the class calls the method to get a security token. When the security token required is an security token, the method calls the method. + In most instances it is not necessary to call the class directly, as it is called when a client sends a SOAP message that requires a security token. Specifically, a client specifies the type of security token required, using the class and the class calls the method to get a security token. When the security token required is an security token, the method calls the method. ]]> @@ -83,7 +83,7 @@ method gets a security token based on the certificate specified in the `certificate` parameter. + The method gets a security token based on the certificate specified in the `certificate` parameter. ]]> @@ -120,7 +120,7 @@ method gets a security token based on the certificate that matches the specified certificate store criteria. + The method gets a security token based on the certificate that matches the specified certificate store criteria. ]]> @@ -156,7 +156,7 @@ method gets a security token based on the certificate represented by the property. + The method gets a security token based on the certificate represented by the property. ]]> @@ -230,9 +230,9 @@ method is called by the class when a client sends a SOAP message and an security token is required. + The method is called by the class when a client sends a SOAP message and an security token is required. - The method calls the method. + The method calls the method. ]]> diff --git a/xml/System.IdentityModel.Services.Configuration/FederationConfiguration.xml b/xml/System.IdentityModel.Services.Configuration/FederationConfiguration.xml index d312b7ce21f..e788acd09b9 100644 --- a/xml/System.IdentityModel.Services.Configuration/FederationConfiguration.xml +++ b/xml/System.IdentityModel.Services.Configuration/FederationConfiguration.xml @@ -38,7 +38,7 @@ ## Remarks > [!IMPORTANT] -> Before the new instance is used by any of the configured HTTP modules, call the method to ensure that the instance is properly initialized. +> Before the new instance is used by any of the configured HTTP modules, call the method to ensure that the instance is properly initialized. ]]> @@ -62,10 +62,10 @@ ` configuration section. This constructor calls the constructor with the `loadConfig` parameter `true`. + The properties in the new instance are initialized by loading settings from the `` configuration section. This constructor calls the constructor with the `loadConfig` parameter `true`. > [!WARNING] -> Before the new instance is used by any of the configured HTTP modules, call the method to ensure that the instance is properly initialized. +> Before the new instance is used by any of the configured HTTP modules, call the method to ensure that the instance is properly initialized. ]]> @@ -97,7 +97,7 @@ ## Remarks > [!WARNING] -> Before the new instance is used by any of the configured HTTP modules, call the method to ensure that the instance is properly initialized. +> Before the new instance is used by any of the configured HTTP modules, call the method to ensure that the instance is properly initialized. The `system.identityModel` section must be specified in a `
` element under the `` element in the configuration file or an exception is thrown. @@ -107,7 +107,7 @@ ``` - If `loadConfig` is `true` and only a single `` element is specified, settings are loaded using that element. If multiple `` elements are specified, the method attempts to load settings from the element that is unnamed of that has the . If such an element does not exist, the method returns without loading settings. This results in an exception when the method is called. + If `loadConfig` is `true` and only a single `` element is specified, settings are loaded using that element. If multiple `` elements are specified, the method attempts to load settings from the element that is unnamed of that has the . If such an element does not exist, the method returns without loading settings. This results in an exception when the method is called. > [!WARNING] > Microsoft recommends that if you specify multiple `` elements in the `system.identityModel.services` configuration section that at least one of them is unnamed or has its name set to an empty string. @@ -141,7 +141,7 @@ ## Remarks > [!WARNING] -> Before the new instance is used by any of the configured HTTP modules, call the method to ensure that the instance is properly initialized. +> Before the new instance is used by any of the configured HTTP modules, call the method to ensure that the instance is properly initialized. If this constructor is called then a `` configuration section with a `` element that has the specified name must exist in the configuration file. @@ -292,7 +292,7 @@ ## Remarks This method ensures that the current instance is properly initialized before it is used by the HTTP Modules to process incoming requests. It should only be called once. Check the property before calling the method. This method sets the property is set `true`. - The default implementation creates a default cookie handler if there is not one already configured through the property and calls the method on the identity configuration object that is configured through the property. You can override this method to modify this behavior or to provide additional initialization in derived classes. + The default implementation creates a default cookie handler if there is not one already configured through the property and calls the method on the identity configuration object that is configured through the property. You can override this method to modify this behavior or to provide additional initialization in derived classes. This method should be invoked before the class is used by the HTTP Modules to process incoming requests. @@ -324,7 +324,7 @@ object has already been initialized. The method should be called once and only once. + Use this property to check whether the object has already been initialized. The method should be called once and only once. The `set` operation is `protected`. @@ -357,7 +357,7 @@ method is called by the constructors to set the properties of the newly created object from the specified `` element. + The method is called by the constructors to set the properties of the newly created object from the specified `` element. If `element` is `null`, the instance is loaded with default values. diff --git a/xml/System.IdentityModel.Services/AttributeRequestMessage.xml b/xml/System.IdentityModel.Services/AttributeRequestMessage.xml index b5f28997e4f..9a682a5eab4 100644 --- a/xml/System.IdentityModel.Services/AttributeRequestMessage.xml +++ b/xml/System.IdentityModel.Services/AttributeRequestMessage.xml @@ -249,7 +249,7 @@ method before writing the message. + This method calls the method before writing the message. ]]> diff --git a/xml/System.IdentityModel.Services/ChunkedCookieHandler.xml b/xml/System.IdentityModel.Services/ChunkedCookieHandler.xml index 3e78c04e035..ffb5dcbb115 100644 --- a/xml/System.IdentityModel.Services/ChunkedCookieHandler.xml +++ b/xml/System.IdentityModel.Services/ChunkedCookieHandler.xml @@ -16,13 +16,13 @@ Represents a cookie handler that writes cookie data so that cookies never exceed a set size. - class presents the cookie as a logical entity, so that, in the case of cookies with a size that exceeds a specified threshold (the chunk size), a single call to the method breaks the data into a series of actual client-side cookies, none of which exceeds the chunk size. - - Cookie names are constructed based on the `name` parameter to the , , or methods. The cookie names are constructed by appending a number to the base name: name, name1, name2, and so on. - + class presents the cookie as a logical entity, so that, in the case of cookies with a size that exceeds a specified threshold (the chunk size), a single call to the method breaks the data into a series of actual client-side cookies, none of which exceeds the chunk size. + + Cookie names are constructed based on the `name` parameter to the , , or methods. The cookie names are constructed by appending a number to the base name: name, name1, name2, and so on. + ]]> @@ -51,11 +51,11 @@ Initializes a new instance of the class that uses the default chunk size. - . - + . + ]]> @@ -79,11 +79,11 @@ The chunk size that will be used to write cookies. Initializes a new instance of the class that uses a specified chunk size. - diff --git a/xml/System.IdentityModel.Services/ClaimsPrincipalPermission.xml b/xml/System.IdentityModel.Services/ClaimsPrincipalPermission.xml index 511c3b2bd9e..267d1129ba0 100644 --- a/xml/System.IdentityModel.Services/ClaimsPrincipalPermission.xml +++ b/xml/System.IdentityModel.Services/ClaimsPrincipalPermission.xml @@ -35,23 +35,23 @@ class provides the capability to perform imperative access checks by using the that is configured for an application. By invoking the method or the static method, you can provide protection to resources from within the execution path of your code according to the authorization policy defined for your claims authentication manager. Declarative access checks can be performed by using the class. + The class provides the capability to perform imperative access checks by using the that is configured for an application. By invoking the method or the static method, you can provide protection to resources from within the execution path of your code according to the authorization policy defined for your claims authentication manager. Declarative access checks can be performed by using the class. > [!IMPORTANT] > The class uses the claims authorization manager configured by the that is set under the property. This is true in all cases, even in scenarios where WS-Federation is not used; for example, active (WCF) Web applications and Console applications. You can specify the claims authorization manager either in configuration or programmatically. To specify the claims authorization manager in a configuration file, set the [<claimsAuthorizationManager>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/claimsauthorizationmanager) element under an [<identityConfiguration>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/identityconfiguration) element and ensure that this identity configuration is referenced by the [<federationConfiguration>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/federationconfiguration) element that is loaded by the runtime (for example, by setting the `identityConfigurationName` attribute). To set the claims authorization manager programmatically, provide a handler for the event. On one level, the functionality provided by is similar to the role-based access checks (RBAC) provided through the class; however, the class performs checks based on the claims presented by the active principal. This enables far more granularity than is available through pure RBAC, where many permissions are typically collected under a single role. Perhaps, more importantly, claims-based authorization enables better separation of business logic and authorization policy because permission can be demanded for a specific action on a resource in code and back-end policy can be used to configure which claims the presenting entity must possess in order to satisfy the demand. Like RBAC, performs a user-based access check, that is, unlike code access security implemented by classes that derive from the class and use a stack walk to ensure that all callers of the code have been granted a permission, performs its check only on the current principal. - The static method checks access for a specified action on a specified resource. The resource and action are both strings and are typically URIs. You can also initialize an instance of with an action and a resource and call the method. Although the constructor only takes a single resource and action, objects can be combined through the and methods. A permission created by using these methods may contain multiple resource-action pairs. + The static method checks access for a specified action on a specified resource. The resource and action are both strings and are typically URIs. You can also initialize an instance of with an action and a resource and call the method. Although the constructor only takes a single resource and action, objects can be combined through the and methods. A permission created by using these methods may contain multiple resource-action pairs. - Both methods determine access by invoking the method of the configured claims authorization manager with an composed of the active principal (), the resource, and the action. They throw a if the current principal is not authorized to perform the action on the resource; otherwise, execution proceeds. + Both methods determine access by invoking the method of the configured claims authorization manager with an composed of the active principal (), the resource, and the action. They throw a if the current principal is not authorized to perform the action on the resource; otherwise, execution proceeds. - In the case of a that contains multiple resource-action pairs, the method is invoked for each of the resource-action pairs contained in the permission. For the call to to succeed, the active principal must be authorized for all of the resource-action pairs contained in the permission. + In the case of a that contains multiple resource-action pairs, the method is invoked for each of the resource-action pairs contained in the permission. For the call to to succeed, the active principal must be authorized for all of the resource-action pairs contained in the permission. ## Examples - The following example shows how to protect a resource by using the method, the method, or a declaration. In each case, the configured is invoked to evaluate the current principal against the specified resource and action. If the current principal is not authorized for the specified action on the specified resource, a is thrown; otherwise, execution proceeds. + The following example shows how to protect a resource by using the method, the method, or a declaration. In each case, the configured is invoked to evaluate the current principal against the specified resource and action. If the current principal is not authorized for the specified action on the specified resource, a is thrown; otherwise, execution proceeds. :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Services/ClaimsPrincipalPermission/Overview/program.cs" id="Snippet1"::: @@ -111,9 +111,9 @@ object is initialized with the specified resource-action pair. You can call the method to perform an access check. + The object is initialized with the specified resource-action pair. You can call the method to perform an access check. - Although the constructor only takes a single resource and action, objects can be combined through the and methods. The permission created through these methods may contain multiple resource-action pairs. + Although the constructor only takes a single resource and action, objects can be combined through the and methods. The permission created through these methods may contain multiple resource-action pairs. ]]> @@ -158,12 +158,12 @@ ## Remarks The principal must be authorized for the specified action on the specified resource or the exception is thrown. - The method of the configured claims authorization manager is invoked with an composed of the active principal (), the resource, and the action. + The method of the configured claims authorization manager is invoked with an composed of the active principal (), the resource, and the action. ## Examples - The following example shows how to protect a resource by using the method. The configured claims authorization manager is invoked to evaluate the current principal against the specified resource and action. If the current principal is not authorized for the specified action on the specified resource, a is thrown; otherwise, execution proceeds. + The following example shows how to protect a resource by using the method. The configured claims authorization manager is invoked to evaluate the current principal against the specified resource and action. If the current principal is not authorized for the specified action on the specified resource, a is thrown; otherwise, execution proceeds. :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Services/ClaimsPrincipalPermission/Overview/program.cs" id="Snippet2"::: @@ -235,14 +235,14 @@ ## Remarks The current principal must be authorized for all of the resource-action pairs associated with this instance or the exception is thrown. - Although the constructor only takes a single resource and action, objects can be combined through the and methods. The permission created through these methods may contain multiple resource-action pairs. + Although the constructor only takes a single resource and action, objects can be combined through the and methods. The permission created through these methods may contain multiple resource-action pairs. - The method invokes the method of the configured claims authorization manager with an composed of the active principal (), the resource, and the action for each of the resource-action pairs contained in the permission. For the to succeed the active principal must be authorized for all of the resource-action pairs that are contained in the permission. + The method invokes the method of the configured claims authorization manager with an composed of the active principal (), the resource, and the action for each of the resource-action pairs contained in the permission. For the to succeed the active principal must be authorized for all of the resource-action pairs that are contained in the permission. ## Examples - The following example shows how to protect a resource by using the method. The configured claims authorization manager is invoked to evaluate the current principal against the specified resource and action. If the current principal is not authorized for the specified action on the specified resource, a is thrown; otherwise, execution proceeds. + The following example shows how to protect a resource by using the method. The configured claims authorization manager is invoked to evaluate the current principal against the specified resource and action. If the current principal is not authorized for the specified action on the specified resource, a is thrown; otherwise, execution proceeds. :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Services/ClaimsPrincipalPermission/Overview/program.cs" id="Snippet3"::: @@ -284,7 +284,7 @@ method. + Reconstructs a permission from the XML encoding created by a call to the method. ]]> @@ -322,7 +322,7 @@ to succeed on the new permission, the current principal only needs to be authorized for the resource-action pairs that were common to the current permission and the specified permission. + The permission that is returned has only the resource-action pairs that were present both in the current permission and in the specified permission. Resource-action pairs that existed in only one or the other of the permissions are not included. For a to succeed on the new permission, the current principal only needs to be authorized for the resource-action pairs that were common to the current permission and the specified permission. ]]> @@ -358,7 +358,7 @@ , the returns `false`. + The current permission is a subset of the specified permission if all of the resource-action pairs contained in the current permission are also present in the specified permission. If `target` is `null` or is not an instance of , the returns `false`. ]]> @@ -416,7 +416,7 @@ method. + The principal can be reconstructed from its XML encoded form by calling the method. ]]> @@ -451,7 +451,7 @@ to succeed on the new permission, the current principal must be authorized for all of the resource-action pairs that existed in the current permission and all of the resource-action pairs that existed in the specified permission. + The permission that is returned has all of the resource-action pairs that are present in the current permission and all of the resource-action pairs that are present the specified permission. For a to succeed on the new permission, the current principal must be authorized for all of the resource-action pairs that existed in the current permission and all of the resource-action pairs that existed in the specified permission. ]]> diff --git a/xml/System.IdentityModel.Services/ClaimsPrincipalPermissionAttribute.xml b/xml/System.IdentityModel.Services/ClaimsPrincipalPermissionAttribute.xml index 8a177107f34..2727fe17619 100644 --- a/xml/System.IdentityModel.Services/ClaimsPrincipalPermissionAttribute.xml +++ b/xml/System.IdentityModel.Services/ClaimsPrincipalPermissionAttribute.xml @@ -93,7 +93,7 @@ declaration or an exception will be thrown when the method is invoked to create the permission. + You must also specify the `Operation` and `Resource` properties in your declaration or an exception will be thrown when the method is invoked to create the permission. ]]> @@ -128,7 +128,7 @@ object is created by using the value of the property and the property. You must specify the `Operation` and `Resource` properties in your declaration or an exception will be thrown when the method is invoked to create the permission. + The object is created by using the value of the property and the property. You must specify the `Operation` and `Resource` properties in your declaration or an exception will be thrown when the method is invoked to create the permission. ]]> @@ -156,7 +156,7 @@ declaration or an exception will be thrown when the method is called to create the permission. + The operation is the action for which the current principal should be authorized on the specified resource. You must set the `Operation` property in your declaration or an exception will be thrown when the method is called to create the permission. ]]> @@ -184,7 +184,7 @@ declaration or an exception will be thrown when the method is called to create the permission. + The resource on which the current principal should be authorized to perform the specified action. You must set the `Resource` property in your declaration or an exception will be thrown when the method is called to create the permission. ]]> diff --git a/xml/System.IdentityModel.Services/CookieHandler.xml b/xml/System.IdentityModel.Services/CookieHandler.xml index f493ba3d759..54d1687a446 100644 --- a/xml/System.IdentityModel.Services/CookieHandler.xml +++ b/xml/System.IdentityModel.Services/CookieHandler.xml @@ -23,7 +23,7 @@ Windows Identity Foundation (WIF) ships with a cookie handler called the chunked cookie handler that is implemented by the class. The chunked cookie handler splits the session token across one or more cookies according to a specified chunk size. This is to meet size limitations on individual cookies imposed by many browsers. - You can derive from to create your own cookie handler. When you do so, you must override the , , and methods to perform the actual work of deleting, reading, and writing the session cookie. These methods typically read the cookie from the collection and write or delete cookies through the collection. The object through which you can access the request and response is provided as a parameter to each of these methods. In addition to the required methods, you can optionally override other virtual methods properties exposed by the class to customize the behavior of your handler. + You can derive from to create your own cookie handler. When you do so, you must override the , , and methods to perform the actual work of deleting, reading, and writing the session cookie. These methods typically read the cookie from the collection and write or delete cookies through the collection. The object through which you can access the request and response is provided as a parameter to each of these methods. In addition to the required methods, you can optionally override other virtual methods properties exposed by the class to customize the behavior of your handler. Several properties are exposed by the class that specify default behavior and properties for the session cookie. The , , and properties supply the base name for the cookie, the domain in which it is valid and the path under which it is stored on the client. The property specifies whether the cookie is accessible to client-side scripts. The property specifies whether the cookie should be transmitted only over secure (HTTPS) connections. If set, the property is used to set the expiration time for persistent sessions, that is for sessions that remain valid even after the browser is closed. All of these properties have equivalent properties that are typically set on the underlying object (or objects) by the "core" methods of the handler. For more information see the documentation for each property. @@ -262,7 +262,7 @@ methods to do the actual work of deleting the cookie. The methods will ensure that name and path are non-empty strings. + Called from the overloaded methods to do the actual work of deleting the cookie. The methods will ensure that name and path are non-empty strings. ]]> @@ -618,7 +618,7 @@ methods to do the actual work of reading the cookie. The methods will ensure that `name` is a non-empty string. + Called from the overloaded methods to do the actual work of reading the cookie. The methods will ensure that `name` is a non-empty string. ]]> @@ -874,7 +874,7 @@ methods to do the actual work of writing the cookie. The methods will ensure that `value` is a non-empty byte array and that `name` and `path` are non-empty strings. + Called from the overloaded methods to do the actual work of writing the cookie. The methods will ensure that `value` is a non-empty byte array and that `name` and `path` are non-empty strings. ]]> diff --git a/xml/System.IdentityModel.Services/FederatedAuthentication.xml b/xml/System.IdentityModel.Services/FederatedAuthentication.xml index f0e0238e77b..fbb28790e3c 100644 --- a/xml/System.IdentityModel.Services/FederatedAuthentication.xml +++ b/xml/System.IdentityModel.Services/FederatedAuthentication.xml @@ -19,7 +19,7 @@ class. The method provides an extension point through which other application-defined modules that derive from and that are configured for the application can be accessed. + You can access the modules that are configured for the web application through the static properties exposed by the class. The method provides an extension point through which other application-defined modules that derive from and that are configured for the application can be accessed. The property references a singleton instance of that provides configuration settings for the HTTP modules. The first time the property is accessed by one of the HTTP modules, a instance is initialized from the [<federationConfiguration>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/federationconfiguration) element in the configuration file and the is raised to provide an application with the opportunity to modify the configuration object before it is used to initialize module properties. The same instance is returned on each subsequent access of the property. @@ -78,7 +78,7 @@ On subsequent accesses, the same configuration instance is returned. - Depending on whether specific modules are present, the property is accessed from within the following methods during initialization: , , and . + Depending on whether specific modules are present, the property is accessed from within the following methods during initialization: , , and . > [!IMPORTANT] > The claims authorization manager () that is used to evaluate claims based access checks when using the class or the class is configured on the object that is set on the federation configuration object referenced through the property. This is true for all applications whether they are ASP.NET applications or not. diff --git a/xml/System.IdentityModel.Services/FederatedAuthenticationSessionEndingException.xml b/xml/System.IdentityModel.Services/FederatedAuthenticationSessionEndingException.xml index 5988b8472a3..5044360ad8a 100644 --- a/xml/System.IdentityModel.Services/FederatedAuthenticationSessionEndingException.xml +++ b/xml/System.IdentityModel.Services/FederatedAuthenticationSessionEndingException.xml @@ -26,11 +26,11 @@ Indicates that the sign-in session should being terminated, and the current request is unauthenticated. - to indicate that the current sign-in session should be terminated. - + to indicate that the current sign-in session should be terminated. + ]]> diff --git a/xml/System.IdentityModel.Services/FederatedPassiveSecurityTokenServiceOperations.xml b/xml/System.IdentityModel.Services/FederatedPassiveSecurityTokenServiceOperations.xml index 48458da0c94..fa01824b80d 100644 --- a/xml/System.IdentityModel.Services/FederatedPassiveSecurityTokenServiceOperations.xml +++ b/xml/System.IdentityModel.Services/FederatedPassiveSecurityTokenServiceOperations.xml @@ -24,7 +24,7 @@ ## Examples - The code example that is used in this topic is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT), and it includes an implementation of a passive STS that is capable of serving an SWT token. For information about this sample and other samples available for WIF and about where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). The following code shows how to invoke a custom passive STS to process a WS-Federation request by calling the method from the code behind in the `default.aspx.cs` file. + The code example that is used in this topic is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT), and it includes an implementation of a passive STS that is capable of serving an SWT token. For information about this sample and other samples available for WIF and about where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). The following code shows how to invoke a custom passive STS to process a WS-Federation request by calling the method from the code behind in the `default.aspx.cs` file. :::code language="csharp" source="~/snippets/csharp/System.IdentityModel/SecurityTokenService/Overview/default.aspx.cs" id="Snippet1"::: @@ -74,7 +74,7 @@ method from the code behind in the `default.aspx.cs` file. + The code example that is used in this topic is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT), and it includes an implementation of a passive STS that is capable of serving an SWT token. For information about this sample and other samples available for WIF and about where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). The following code shows how to invoke a custom passive STS to process a WS-Federation request by calling the method from the code behind in the `default.aspx.cs` file. :::code language="csharp" source="~/snippets/csharp/System.IdentityModel/SecurityTokenService/Overview/default.aspx.cs" id="Snippet1"::: @@ -258,7 +258,7 @@ returned from one of the overloaded methods. + This typical usage of this method is to process the returned from one of the overloaded methods. ]]> diff --git a/xml/System.IdentityModel.Services/HttpModuleBase.xml b/xml/System.IdentityModel.Services/HttpModuleBase.xml index 035e6f27d37..524dc989426 100644 --- a/xml/System.IdentityModel.Services/HttpModuleBase.xml +++ b/xml/System.IdentityModel.Services/HttpModuleBase.xml @@ -120,9 +120,9 @@ method by initializing the property to the value of the property, invoking the method, and then invoking the method. + This method implements the method by initializing the property to the value of the property, invoking the method, and then invoking the method. - Derived classes override the and methods. + Derived classes override the and methods. ]]> @@ -153,7 +153,7 @@ method to load any additional configuration state as well as to register event handling methods with specific events raised by the object. When this method is called from the method, the property has already been initialized. You can get the configuration object that is in effect for this module from this property. The property should be used for all token processing in this module. + Use the method to load any additional configuration state as well as to register event handling methods with specific events raised by the object. When this method is called from the method, the property has already been initialized. You can get the configuration object that is in effect for this module from this property. The property should be used for all token processing in this module. ]]> @@ -181,7 +181,7 @@ method, the property has already been initialized. You can get the configuration object that is in effect for this module from this property. + When this method is called from the method, the property has already been initialized. You can get the configuration object that is in effect for this module from this property. ]]> diff --git a/xml/System.IdentityModel.Services/SessionAuthenticationModule.xml b/xml/System.IdentityModel.Services/SessionAuthenticationModule.xml index cead74a820c..8daf28068c6 100644 --- a/xml/System.IdentityModel.Services/SessionAuthenticationModule.xml +++ b/xml/System.IdentityModel.Services/SessionAuthenticationModule.xml @@ -21,13 +21,13 @@ ## Remarks When present in the ASP.NET pipeline, the (SAM) processes session cookies in WS-Federation scenarios. It uses the cookie handler specified by the property to read the raw session cookie from the HTTP request and write it to the HTTP response. It uses the that is configured for an application to deserialize the raw session cookie into objects. The session security token contains the claims () and principal () associated with the entity for which the request is being served. - The SAM adds its event handler to the event in the ASP.NET pipeline. This handler intercepts sign-in requests, and, if there is a session cookie, deserializes it into a session token, and sets the and properties to the claims principal contained in the session token. It invokes several of the other methods exposed by the SAM during this process. + The SAM adds its event handler to the event in the ASP.NET pipeline. This handler intercepts sign-in requests, and, if there is a session cookie, deserializes it into a session token, and sets the and properties to the claims principal contained in the session token. It invokes several of the other methods exposed by the SAM during this process. - The method can be invoked to sign the user out of a session (for example, in a SignOut.aspx.cs code-behind file). + The method can be invoked to sign the user out of a session (for example, in a SignOut.aspx.cs code-behind file). The SAM exposes several events that provide access to its processing pipeline. The and events enable you to modify session tokens that are read from cookies or created during processing. Typically, this is done to add, remove, or transform claims in the token or to adjust its expiration time. The , , and events provide hooks into the processing of sign-out requests. For many scenarios, simply adding handlers for these events, often to the global.asax.cs file, will be sufficient. - For more complicated scenarios, you can derive from to implement a custom SAM. To this end, many of the methods that are invoked during and are exposed so that you can provide custom behavior at specific stages of the session processing lifecycle. + For more complicated scenarios, you can derive from to implement a custom SAM. To this end, many of the methods that are invoked during and are exposed so that you can provide custom behavior at specific stages of the session processing lifecycle. You can add the SAM to the ASP.NET pipeline in a configuration file by adding it to the HTTP modules under either the `` element for IIS version 7 and later or under the `` element for versions prior to IIS 7. The cookie handler used by the SAM can be configured with the [<cookieHandler>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/cookiehandler) element. @@ -106,7 +106,7 @@ method is called from the method. It calls the method to validate the incoming token and update the and the properties. If the `writeCookie` parameter is `true`, the method is invoked to write the session token to a cookie. + The method is called from the method. It calls the method to validate the incoming token and update the and the properties. If the `writeCookie` parameter is `true`, the method is invoked to write the session token to a cookie. ]]> @@ -183,7 +183,7 @@ property is initialized by the method. This method initializes the property based on the cookie handler specified on the object that is set on the property. You can set the cookie handler in a configuration file through the [<cookieHandler>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/cookiehandler) element. + The property is initialized by the method. This method initializes the property based on the cookie handler specified on the object that is set on the property. You can set the cookie handler in a configuration file through the [<cookieHandler>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/cookiehandler) element. ]]> @@ -249,7 +249,7 @@ property. This method is called during sign-out by the method. + Deletes the session cookie by using the cookie handler specified by the property. This method is called during sign-out by the method. ]]> @@ -280,7 +280,7 @@ and the handlers to the and events of the application object specified by the `context` parameter. + Adds the and the handlers to the and events of the application object specified by the `context` parameter. ]]> @@ -375,19 +375,19 @@ ## Remarks This method does the following: -1. Invokes the method to read a from the session cookie, if one is present. +1. Invokes the method to read a from the session cookie, if one is present. 2. If a session security token cannot be read (most likely because a session has not been established), return. -3. Invokes the method to raise the event. This provides an opportunity for the token read from the cookie to be modified or for the request to be canceled. The handler can also specify that the token should be reissued, by setting the property. +3. Invokes the method to raise the event. This provides an opportunity for the token read from the cookie to be modified or for the request to be canceled. The handler can also specify that the token should be reissued, by setting the property. -4. If the token is to be reissued, removes it from the cache and invokes the method to raise the event. This provides opportunity for the token to again be modified. The reissue behavior can also be modified by setting the property in the event handler. +4. If the token is to be reissued, removes it from the cache and invokes the method to raise the event. This provides opportunity for the token to again be modified. The reissue behavior can also be modified by setting the property in the event handler. -5. Invokes the method to authenticate the user. If successful, this has the effect of setting the property to the principal that is contained in the property of the incoming token. +5. Invokes the method to authenticate the user. If successful, this has the effect of setting the property to the principal that is contained in the property of the incoming token. -6. If the session has expired, invokes the method. +6. If the session has expired, invokes the method. - The method is added to the handlers for the event in the method. + The method is added to the handlers for the event in the method. ]]> @@ -423,7 +423,7 @@ ## Remarks The default implementation is empty. - The handler is added to the handlers for the event in the method. + The handler is added to the handlers for the event in the method. ]]> @@ -454,7 +454,7 @@ method. + Called from the method. ]]> @@ -485,7 +485,7 @@ method. + Called from the method. ]]> @@ -516,7 +516,7 @@ method after the sign-out has been performed and the session cookie has been deleted. + This method is invoked from the method after the sign-out has been performed and the session cookie has been deleted. ]]> @@ -547,7 +547,7 @@ method to perform sign-out. It is invoked before the session cookie is deleted. + This method is invoked from the method to perform sign-out. It is invoked before the session cookie is deleted. ]]> @@ -578,7 +578,7 @@ method if an error occurs during sign-out. + This method is invoked from the method if an error occurs during sign-out. ]]> @@ -634,7 +634,7 @@ ## Remarks You can use this event to modify the session security token before it is written to a cookie. - The event is raised from within the method after a session token () has been created. This happens, for example, if an event handler for the event modifies the token. + The event is raised from within the method after a session token () has been created. This happens, for example, if an event handler for the event modifies the token. You can use this event to modify properties of the session token before it is passed further along the pipeline and is used to authenticate the entity making the request (user). @@ -673,7 +673,7 @@ event is raised from within the method after a session token () has been successfully read from the session cookie. + The event is raised from within the method after a session token () has been successfully read from the session cookie. You can use this event to modify properties of the session token before it is passed further along the pipeline and is used to authenticate the entity making the request (user). One of the most common scenarios involves modifying the session expiration time (accessible through the property) to override the session expiration time set in configuration through the `lifetime` attribute of the [<sessionTokenRequirement>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/sessiontokenrequirement) element. By modifying this property on each request, you can implement a sliding session; that is, a session in which the lifetime is extended each time the user accesses the site. @@ -715,9 +715,9 @@ method and sets the property and the property on using the identities that are returned. + Invokes the method and sets the property and the property on using the identities that are returned. - This method is called from the method. + This method is called from the method. ]]> @@ -745,7 +745,7 @@ method just after the method is invoked. + Raised from the method just after the method is invoked. This event is not guaranteed to be called for every session. For example, the cookies may be deleted at the client-side, in which case, this event would never be raised because there is no server-side event for deleting the session. @@ -782,7 +782,7 @@ method just before the method is invoked. + Raised from the method just before the method is invoked. This event is not guaranteed to be called for every session. For example, the cookies may be deleted at the client-side, in which case, this event would never be raised because there is no server-side event for deleting the session. @@ -819,14 +819,14 @@ , , and methods to perform sign-out. If an exception occurs, the method is invoked to raise the event. You can set the property of the object passed into the event handler for this event to cancel the sign-out and prevent the exception from being propagated to the client. + Invokes the , , and methods to perform sign-out. If an exception occurs, the method is invoked to raise the event. You can set the property of the object passed into the event handler for this event to cancel the sign-out and prevent the exception from being propagated to the client. You can override this method to add application-specific behavior. ## Examples - The following code shows code for invoking the method from a SignOut.aspx page (SignOut.aspx.cs) in an ASP.NET web application. A more complete example is shown in the overview topic. + The following code shows code for invoking the method from a SignOut.aspx page (SignOut.aspx.cs) in an ASP.NET web application. A more complete example is shown in the overview topic. :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Services/SessionAuthenticationModule/Overview/global.asax.cs" id="Snippet7"::: @@ -856,7 +856,7 @@ method when an error occurs during sign-out. + Raised from the method when an error occurs during sign-out. In an event handler, you can get the exception that resulted in the event being raised from the property. You can cancel further processing of the exception, which has the result of not propagating the exception to the client, by setting the property of the to `true`. @@ -900,7 +900,7 @@ property and then invokes the method to read the token from the cookie. + Reads the cookie by using the cookie handler that is configured in the property and then invokes the method to read the token from the cookie. ]]> @@ -932,7 +932,7 @@ method. It invokes the method of the configured session token handler to validate the token and extract its identities. + This method is called from the method. It invokes the method of the configured session token handler to validate the token and extract its identities. ]]> diff --git a/xml/System.IdentityModel.Services/SessionSecurityTokenCreatedEventArgs.xml b/xml/System.IdentityModel.Services/SessionSecurityTokenCreatedEventArgs.xml index da7b6978bbe..ac1832c0d95 100644 --- a/xml/System.IdentityModel.Services/SessionSecurityTokenCreatedEventArgs.xml +++ b/xml/System.IdentityModel.Services/SessionSecurityTokenCreatedEventArgs.xml @@ -21,7 +21,7 @@ ## Remarks By default: -- In the session authentication module (SAM) the event is raised from within the method after a session token () has been created. This happens, for example, if an event handler for the event modifies the token. You can use the to modify the session token before it is passed further along the pipeline and is used to authenticate the entity making the request (user). +- In the session authentication module (SAM) the event is raised from within the method after a session token () has been created. This happens, for example, if an event handler for the event modifies the token. You can use the to modify the session token before it is passed further along the pipeline and is used to authenticate the entity making the request (user). - In the WS-Federation authentication module (WSFAM), the event is raised from the request processing pipeline just after a session token has been created from the WS-Federation sign-in response message received from the STS and just before the SAM is called to set the thread principal and write the session cookie. diff --git a/xml/System.IdentityModel.Services/SessionSecurityTokenReceivedEventArgs.xml b/xml/System.IdentityModel.Services/SessionSecurityTokenReceivedEventArgs.xml index 005b4ebd589..66cf1fcd88d 100644 --- a/xml/System.IdentityModel.Services/SessionSecurityTokenReceivedEventArgs.xml +++ b/xml/System.IdentityModel.Services/SessionSecurityTokenReceivedEventArgs.xml @@ -19,7 +19,7 @@ event is raised from within the method after a session token () has been successfully read from the session cookie. In the event handler, you can modify properties of the session token before it is passed further along the pipeline and is used to authenticate the entity making the request (user). + By default, the event is raised from within the method after a session token () has been successfully read from the session cookie. In the event handler, you can modify properties of the session token before it is passed further along the pipeline and is used to authenticate the entity making the request (user). You can access the token through the property. After modifying the token, you can ensure that it is written back to the cookie by setting the to `true`. Finally, the event is a cancelable event, and you can set the property (inherited from ) to abort further processing of the request. diff --git a/xml/System.IdentityModel.Services/SignInRequestMessage.xml b/xml/System.IdentityModel.Services/SignInRequestMessage.xml index eaae7ed26ff..68c79b7b7a1 100644 --- a/xml/System.IdentityModel.Services/SignInRequestMessage.xml +++ b/xml/System.IdentityModel.Services/SignInRequestMessage.xml @@ -21,7 +21,7 @@ ## Remarks A WS-Federation sign-in message is sent by a relying party (RP) to a security token service (STS) to request a security token. The wa parameter must be set to "wsignout1.0" and the wtrealm parameter should be set to the security realm of the requested resource (this is often the URL of the requested resource). Other optional parameters may also be specified in the request. - A message is created by the static methods of the class, for example the method, when the wa parameter is set to "wsignin1.0", there is no wresult or wresultptr parameter present, and either a wtrealm parameter or a wreply parameter is present. + A message is created by the static methods of the class, for example the method, when the wa parameter is set to "wsignin1.0", there is no wresult or wresultptr parameter present, and either a wtrealm parameter or a wreply parameter is present. > [!IMPORTANT] > For backward compatibility with Active Directory Federation Services (AD FS) version 1.0, Windows Identity Foundation (WIF) allows either the wtrealm parameter or the wreply parameter to be set (or both) for a sign-in message to be valid; however, the WS-Federation protocol requires that the wtrealm parameter be present in a sign-in request. In most scenarios, you should ensure that the wtrealm parameter is specified. @@ -439,7 +439,7 @@ method is invoked to perform the serialization. + The string contains a URL (including query parameters) that is created by serializing the current instance. The method is invoked to perform the serialization. ]]> @@ -535,7 +535,7 @@ method before writing the message. + This method calls the method before writing the message. ]]> diff --git a/xml/System.IdentityModel.Services/SignInResponseMessage.xml b/xml/System.IdentityModel.Services/SignInResponseMessage.xml index 017ba50462c..66cb754ec37 100644 --- a/xml/System.IdentityModel.Services/SignInResponseMessage.xml +++ b/xml/System.IdentityModel.Services/SignInResponseMessage.xml @@ -247,7 +247,7 @@ method before writing the message. + This method calls the method before writing the message. ]]> diff --git a/xml/System.IdentityModel.Services/SignOutCleanupRequestMessage.xml b/xml/System.IdentityModel.Services/SignOutCleanupRequestMessage.xml index 7e242bae267..dab5b3e7a4c 100644 --- a/xml/System.IdentityModel.Services/SignOutCleanupRequestMessage.xml +++ b/xml/System.IdentityModel.Services/SignOutCleanupRequestMessage.xml @@ -174,7 +174,7 @@ method before writing the message. + This method calls the method before writing the message. ]]> diff --git a/xml/System.IdentityModel.Services/SignOutRequestMessage.xml b/xml/System.IdentityModel.Services/SignOutRequestMessage.xml index 45290d61018..642ed1c572b 100644 --- a/xml/System.IdentityModel.Services/SignOutRequestMessage.xml +++ b/xml/System.IdentityModel.Services/SignOutRequestMessage.xml @@ -21,7 +21,7 @@ ## Remarks A WS-Federation sign-out message is sent by a relying party (RP) to a security token service (STS) to sign out of the current session with that STS. The wa parameter must be set to "wsignout1.0" and an optional wreply parameter may be set to indicate the URL to which the client should be redirected by the STS after sign-out completes. - A message is created by the static methods of the class, for example the method, when the wa parameter is set to "wsignout1.0". + A message is created by the static methods of the class, for example the method, when the wa parameter is set to "wsignout1.0". [!INCLUDE[wif_wsfed_ref](~/includes/wif-wsfed-ref-md.md)] @@ -187,7 +187,7 @@ method before writing the message. + This method calls the method before writing the message. ]]> diff --git a/xml/System.IdentityModel.Services/WSFederationAuthenticationModule.xml b/xml/System.IdentityModel.Services/WSFederationAuthenticationModule.xml index 3cf386cb5c9..352f097163c 100644 --- a/xml/System.IdentityModel.Services/WSFederationAuthenticationModule.xml +++ b/xml/System.IdentityModel.Services/WSFederationAuthenticationModule.xml @@ -74,11 +74,11 @@ - : Raised if an exception occurs during sign-out. You can cancel sign-out and prevent the exception from being returned to the caller. > [!NOTE] -> The sign-out events are not raised when signing out at the STS by calling the method. +> The sign-out events are not raised when signing out at the STS by calling the method. - There are two ways of signing in to an STS using WSFAM. The first is by enabling passive redirects through the property. In this case, when authorization fails on a requested resource, rather than returning a `401:Access Denied` response to the client, WSFAM builds a WS-Federation sign-in request message from its properties and redirects the client to the STS to retrieve a security token. The second way is to explicitly redirect the client to the STS by calling the method from a web page or custom control in your application. The method also uses the properties of the WSFAM to construct the sign-in request. + There are two ways of signing in to an STS using WSFAM. The first is by enabling passive redirects through the property. In this case, when authorization fails on a requested resource, rather than returning a `401:Access Denied` response to the client, WSFAM builds a WS-Federation sign-in request message from its properties and redirects the client to the STS to retrieve a security token. The second way is to explicitly redirect the client to the STS by calling the method from a web page or custom control in your application. The method also uses the properties of the WSFAM to construct the sign-in request. - Any of the overloaded methods can be used to sign out of the session. This deletes the session cookie on the client. It does not send a WS-Federation sign-out message ("wsignout1.0") to the STS. To sign-out at the STS, you must use the method. + Any of the overloaded methods can be used to sign out of the session. This deletes the session cookie on the client. It does not send a WS-Federation sign-out message ("wsignout1.0") to the STS. To sign-out at the STS, you must use the method. The WSFAM handles WS-Federation sign-out clean-up requests ("wsignoutcleanup1.0"), by deleting its session with the client. If the wreply parameter in the sign-out clean-up message is not set, the WSFAM returns an image of a green check mark to the STS that sent the message. This feature can be used by an STS as an acknowledgment that the RP has completed its sign-out. @@ -176,7 +176,7 @@ event is raised when authorization has failed for an HTTP request. It is raised from within the event-handler delegate through a call to the method. + The event is raised when authorization has failed for an HTTP request. It is raised from within the event-handler delegate through a call to the method. You can set the property to control whether the request is redirected to the identity provider. The framework initializes this property to `false` if the user has already been authenticated. In this case, setting the property to `true` may cause a circular loop with the STS. @@ -240,7 +240,7 @@ ## Remarks This method is invoked from the request processing pipeline to determine whether the incoming HTTP request is a FORM post that contains a WS-Federation sign-in response message. - It invokes the overload with the `onPage` parameter set `false` to indicate that the call did not originate while processing a page. + It invokes the overload with the `onPage` parameter set `false` to indicate that the call did not originate while processing a page. ]]> @@ -280,15 +280,15 @@ overload to determine whether the incoming HTTP request is a form POST that contains a WS-Federation sign-in response message. + This method is invoked from the request processing pipeline through the overload to determine whether the incoming HTTP request is a form POST that contains a WS-Federation sign-in response message. The default implementation performs the following: -- If the incoming request is a form POST, it calls the method to determine whether the form POST contains a sign-in response. +- If the incoming request is a form POST, it calls the method to determine whether the form POST contains a sign-in response. -- If the incoming request is not a form POST, and the request contains a WS-Federation sign-out clean-up request (the wa parameter is "wsignoutcleanup1.0"), sign-out clean-up is performed. In this case, the method is invoked (with the parameter set to `true` to indicate a sign-out clean-up) to sign out of the session. This also causes the sign-out events to be raised. +- If the incoming request is not a form POST, and the request contains a WS-Federation sign-out clean-up request (the wa parameter is "wsignoutcleanup1.0"), sign-out clean-up is performed. In this case, the method is invoked (with the parameter set to `true` to indicate a sign-out clean-up) to sign out of the session. This also causes the sign-out events to be raised. - Next, if the sign-out clean-up request contains a wreply parameter, the client is redirected to the URL returned by the method; otherwise, an image of a green check mark is returned to the STS. The receipt of this image can be used by the STS as a confirmation that the sign-out clean-up request was received and successfully processed by the RP. + Next, if the sign-out clean-up request contains a wreply parameter, the client is redirected to the URL returned by the method; otherwise, an image of a green check mark is returned to the STS. The receipt of this image can be used by the STS as a confirmation that the sign-out clean-up request was received and successfully processed by the RP. ]]> @@ -337,13 +337,13 @@ The parameters passed to the method are used to create the wctx message parameter. This is a string with the following format: `ru=returnUrl&cx=SignInContext&rm=rememberMeSet&id=uniqueId`. -- The `ru` value is set to the value of the `returnUrl` parameter passed in to the method and it specifies the URL that the module should direct the browser to following successful authentication. This is the only value stored in the wctx string that is used by the WSFAM. The module calls the method to extract this value from the wctx parameter when processing a WS-Federation sign-in response. It should not be confused with the wreply message parameter, which is specified by the property and which provides the address at the RP to which the security token service (STS) should direct its response. +- The `ru` value is set to the value of the `returnUrl` parameter passed in to the method and it specifies the URL that the module should direct the browser to following successful authentication. This is the only value stored in the wctx string that is used by the WSFAM. The module calls the method to extract this value from the wctx parameter when processing a WS-Federation sign-in response. It should not be confused with the wreply message parameter, which is specified by the property and which provides the address at the RP to which the security token service (STS) should direct its response. -- The `cx` parameter is set to the value of the property. This property is exposed to enable you to set any application-defined context that should be stored in the wctx string; however, WSFAM does not expose a method to extract this value in the response. If the value is needed by your application, you must provide the code to parse the wctx string and read this value when processing the response. You might accomplish this by overriding the method. +- The `cx` parameter is set to the value of the property. This property is exposed to enable you to set any application-defined context that should be stored in the wctx string; however, WSFAM does not expose a method to extract this value in the response. If the value is needed by your application, you must provide the code to parse the wctx string and read this value when processing the response. You might accomplish this by overriding the method. - Neither the `rm` value, which is set to the value of the `rememberMeSet` parameter, nor the `id` parameter, which is set to the value of the `uniqueId` parameter are used by WSFAM. These can be set to any value. - The method is called from the method. + The method is called from the method. ]]> @@ -388,14 +388,14 @@ 1. Creates a WS-Federation sign-out request message by using the specified parameters. -2. Calls the method on the SAM to delete the session cookie. +2. Calls the method on the SAM to delete the session cookie. 3. Redirects to the STS using the sign-out request message from the first step. - None of the sign-out events: , , or are raised by this method. To delete the session without sending a sign-out request message to the STS, call one of the overloaded methods. + None of the sign-out events: , , or are raised by this method. To delete the session without sending a sign-out request message to the STS, call one of the overloaded methods. > [!NOTE] -> To perform passive sign-out by using the session token, the module relies on a value that was stored in the property during sign-in, for more information, see the method. +> To perform passive sign-out by using the session token, the module relies on a value that was stored in the property during sign-in, for more information, see the method. ]]> @@ -505,7 +505,7 @@ method from inside the processing pipeline to resolve the URL specified in the wresultptr parameter in the sign-in response message received from a security token service (STS). + Called by the method from inside the processing pipeline to resolve the URL specified in the wresultptr parameter in the sign-in response message received from a security token service (STS). By default this method throws a . Override this method in a derived class to support the wresultptr parameter. The URL points to the issuance result, which should be one of the following: a `` element, a `` element, a SOAP response, or a SOAP `` element. @@ -540,11 +540,11 @@ method) to get the URL of the page at the relying party (RP) to direct the client to after successful sign-in. This is, typically, the URL of the RP resource to which the client originally requested access. + This method is called from the request processing pipeline (the method) to get the URL of the page at the relying party (RP) to direct the client to after successful sign-in. This is, typically, the URL of the RP resource to which the client originally requested access. By default, WSFAM saves the return URL inside the wctx message parameter when it sends the WS-Federation sign-in request to the security token service (STS). In accordance with the WS-Federation specification, the wctx parameter is preserved across entities through which the message passes and is returned unaltered in the WS-Federation sign-in response message that is sent by the STS. - The default implementation gets the return URL from the wctx parameter in the sign-in response. For more information about the format of the wctx parameter that is used by WSFAM, see the method. + The default implementation gets the return URL from the wctx parameter in the sign-in response. For more information about the format of the wctx parameter that is used by WSFAM, see the method. ]]> @@ -589,7 +589,7 @@ method to get the token and reads it by using the appropriate handler from the configured security token handlers. + The default implementation invokes the method to get the token and reads it by using the appropriate handler from the configured security token handlers. ]]> @@ -625,7 +625,7 @@ ## Remarks Called from the request processing pipeline to get the WS-Federation sign-in request message as a object. - The default implementation invokes the method to get a object and then invokes the overload. + The default implementation invokes the method to get a object and then invokes the overload. Use a derived class to interpret a specific type of request. @@ -658,7 +658,7 @@ method is called from the request processing pipeline when processing a WS-Federation sign-in response message to get the value to store in the property inside the session cookie. + The method is called from the request processing pipeline when processing a WS-Federation sign-in response message to get the value to store in the property inside the session cookie. You can override this method to provide an application-specific value to be stored in the cookie. WSFAM does not expose any methods to retrieve the value from the cookie. You must provide the logic in your application to read the value back from the cookie if it is needed. @@ -694,7 +694,7 @@ method in the request processing pipeline to get a sign-in response message from the form POST contained in the HTTP request. + Called from the method in the request processing pipeline to get a sign-in response message from the form POST contained in the HTTP request. ]]> @@ -729,7 +729,7 @@ method in the request processing pipeline to determine the URL to redirect to after processing a WS-Federation sign-out clean-up request. It is only invoked if the message has a wreply parameter (the `signOutMessage` parameter has a property that is neither `null` nor empty). + This method is called from the method in the request processing pipeline to determine the URL to redirect to after processing a WS-Federation sign-out clean-up request. It is only invoked if the message has a wreply parameter (the `signOutMessage` parameter has a property that is neither `null` nor empty). The default implementation validates the reply URL contained in the message (the property) against the address of the security token service (STS) that is specified by the property. The following conditions must be true for the reply URL to be valid: @@ -788,7 +788,7 @@ method is called to try to get the token using the wresultptr parameter. + If there is no wresult parameter in the sign-in response message, the method is called to try to get the token using the wresultptr parameter. ]]> @@ -886,12 +886,12 @@ |Event|Handler| |-----------|-------------| -||| -||| -||| +||| +||| +||| > [!NOTE] -> The module properties, such as , are initialized from the method. +> The module properties, such as , are initialized from the method. ]]> @@ -957,7 +957,7 @@ method in the request processing pipeline to determine whether the incoming HTTP request is a WS-Federation sign-in response message. + This method is called from the method in the request processing pipeline to determine whether the incoming HTTP request is a WS-Federation sign-in response message. The default implementation returns `true` if the wa parameter is "wsignin1.0" and the wreq and wreqptr parameters are not both set. @@ -1031,13 +1031,13 @@ method implements the WS-Federation request processing pipeline. It is added to the event in the ASP.NET pipeline by the method. + The method implements the WS-Federation request processing pipeline. It is added to the event in the ASP.NET pipeline by the method. The method performs the following: -1. Calls the method to determine whether a WS-Federation sign-in response message ("wsignin1.0") has been received. If the response is a WS-Federation sign-out clean-up request ("wsignoutcleanup1.0"), processes the message, terminates the request and redirects the client according to the WS-Federation parameters in the request. If the message is not a sign-in response or a sign-out clean-up request, the module just returns; otherwise it performs the following steps to process the sign-in response. +1. Calls the method to determine whether a WS-Federation sign-in response message ("wsignin1.0") has been received. If the response is a WS-Federation sign-out clean-up request ("wsignoutcleanup1.0"), processes the message, terminates the request and redirects the client according to the WS-Federation parameters in the request. If the message is not a sign-in response or a sign-out clean-up request, the module just returns; otherwise it performs the following steps to process the sign-in response. -2. Calls the method to deserialize a object from the request. +2. Calls the method to deserialize a object from the request. 3. Raises the event. You can cancel further processing or modify the received security token in a handler for this event. A handler is typically used to modify the or properties. @@ -1047,14 +1047,14 @@ 6. Uses the configured session authentication module (SAM) to create a object. (The configured SAM is the object returned by the property.) The session token is created by using the claims principal returned in step 5. The and properties are set by using the and properties of the returned in step 3 and are validated against the current time and the token lifetime specified by either the or the property of the object in the token handler collection being used by WSFAM. The token lifetime on the session token handler can be specified in configuration through the [<sessionTokenRequirement>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/sessiontokenrequirement) element. Note: The property on the cookie handler configured for the SAM is not used. -7. Calls the method with the session token to write the session cookie. The method first raises the event. You can change properties on the session token or change whether the cookie should be persisted in a handler for this event. After the event is raised, the method then writes the cookie using the SAM. +7. Calls the method with the session token to write the session cookie. The method first raises the event. You can change properties on the session token or change whether the cookie should be persisted in a handler for this event. After the event is raised, the method then writes the cookie using the SAM. > [!NOTE] > The set in configuration is not used to write the cookie. -8. Calls the method to raise the event. +8. Calls the method to raise the event. -9. Calls the method to get the RP page to which to redirect the client. By default, this method reads the return URL from the wctx parameter in the sign-in response. For more information about how WSFAM stores the return URL, see the method. +9. Calls the method to get the RP page to which to redirect the client. By default, this method reads the return URL from the wctx parameter in the sign-in response. For more information about how WSFAM stores the return URL, see the method. ]]> @@ -1085,7 +1085,7 @@ event-handler delegate when authorization has failed. + Called from the event-handler delegate when authorization has failed. Initializes the property before raising the event to prevent circular redirects if the user has already been authenticated. If the user is already authenticated, the property is initialized to `false` to prevent redirects; otherwise, it is initialized to `true`. @@ -1256,7 +1256,7 @@ method just after the session is deleted. + Called from the method just after the session is deleted. ]]> @@ -1312,7 +1312,7 @@ method just before the session is deleted. + Called from the method just before the session is deleted. ]]> @@ -1344,7 +1344,7 @@ method if an exception occurs during processing. + Called from the method if an exception occurs during processing. ]]> @@ -1377,7 +1377,7 @@ The module will not initiate WS-Federation protocol redirects when this mode is not enabled. If this property is `true`, the property must be set to the URL of the Security Token Service (STS) to which the caller should be redirected. > [!WARNING] -> Application code can issue WS-Federation sign-in requests explicitly by using the method, regardless of the value of the property. +> Application code can issue WS-Federation sign-in requests explicitly by using the method, regardless of the value of the property. ]]> @@ -1505,7 +1505,7 @@ ## Remarks You can access and modify the WS-Federation sign-in request through the property. For example, you can modify the property in the sign-in message to change the identity provider to which the request will be redirected. The event is a cancelable event and you can set the property to `true` to cancel the redirect. - The event is raised from inside the method through a call to the method. + The event is raised from inside the method through a call to the method. To handle this event in an ASP.NET application, create a method called `WSFederationAuthentication_RedirectingToIdentityProvider` in the global.asax file. @@ -1557,17 +1557,17 @@ method is called from the method when the request is issued from a web page presented by the relying party (RP) or from the event-handler delegate to perform a passive redirect to the identity provider on authorization failure. + The method is called from the method when the request is issued from a web page presented by the relying party (RP) or from the event-handler delegate to perform a passive redirect to the identity provider on authorization failure. The parameters passed to the method are used to create the wctx message parameter. The only significant parameter is the `returnUrl` parameter. This specifies the URL that the RP should direct the browser to following successful authentication. It should not be confused with the wreply message parameter, which is specified by the property and which provides the address at the RP to which the security token service (STS) should direct its response. The method performs the following: -1. Invokes the method to ensure that a valid sign-in request can be issued by the module. +1. Invokes the method to ensure that a valid sign-in request can be issued by the module. -2. Invokes the method to create the sign-in request from the properties configured on the module. +2. Invokes the method to create the sign-in request from the properties configured on the module. -3. Invokes the method to raise the event. You can cancel the redirect or modify the sign-in request message in the event handler for this event. +3. Invokes the method to raise the event. You can cancel the redirect or modify the sign-in request message in the event handler for this event. ]]> @@ -1757,7 +1757,7 @@ ## Remarks You can add an event handler to modify the token before it is validated. In the event handler you can access the security token through the property. The event is a cancelable event, you can set the property to `true` in an event handler to terminate processing of the WS-Federation sign-in response message. - This event is raised from inside the event-handler delegate when processing a WS-Federation sign-in response message ("wsignin1.0") received from the security token service (STS). It is raised just after a security token has been deserialized from the wresult or the wresultptr parameter in the sign-in response message, but before the security token is validated. + This event is raised from inside the event-handler delegate when processing a WS-Federation sign-in response message ("wsignin1.0") received from the security token service (STS). It is raised just after a security token has been deserialized from the wresult or the wresultptr parameter in the sign-in response message, but before the security token is validated. @@ -1793,7 +1793,7 @@ ## Remarks You can add an event handler to modify the principal created while processing a WS-Federation sign-in response message from a security token service (STS) before it is used to create the session token. In the event handler, you can access the principal through the property. The event is a cancelable event, you can set the property to `true` in an event handler to terminate processing of the WS-Federation sign-in response message. - This event is raised from inside the event-handler delegate when processing a WS-Federation sign-in response message ("wsignin1.0") received from the security token service (STS). It is raised just after the security token that was deserialized from the wresult or the wresultptr parameter in the sign-in response message has been validated, and before the session security token is created. + This event is raised from inside the event-handler delegate when processing a WS-Federation sign-in response message ("wsignin1.0") received from the security token service (STS). It is raised just after the security token that was deserialized from the wresult or the wresultptr parameter in the sign-in response message has been validated, and before the session security token is created. @@ -1828,7 +1828,7 @@ ## Remarks You can add an event handler to modify the session token before it is used to set the thread principal and is written to the session cookie. In the event handler, you can access the session token through the property. You can specify whether a session cookie should be written by setting the property. - This event is raised from inside the event-handler delegate when processing a WS-Federation sign-in response message ("wsignin1.0") received from the security token service (STS). It is raised just after the security token that was deserialized from the wresult or the wresultptr parameter in the sign-in response message has been validated, and before the claims principal is set on the (and on the property of ). + This event is raised from inside the event-handler delegate when processing a WS-Federation sign-in response message ("wsignin1.0") received from the security token service (STS). It is raised just after the security token that was deserialized from the wresult or the wresultptr parameter in the sign-in response message has been validated, and before the claims principal is set on the (and on the property of ). > [!IMPORTANT] > To operate sessions in reference mode, Microsoft recommends providing a handler for the event in the global.asax.cs file and setting the property on the token passed in the property. This will ensure that the session token operates in reference mode for every request and is favored over merely setting the property on the Session Authentication Module. @@ -1870,11 +1870,11 @@ event-handler delegate. This method does the following: + Called from the request processing pipeline implemented in the event-handler delegate. This method does the following: -1. Invokes the method to raise the event. You can use this event to modify the session token before it is used to set the thread principal and written to the session cookie and to specify whether the session cookie should be written. +1. Invokes the method to raise the event. You can use this event to modify the session token before it is used to set the thread principal and written to the session cookie and to specify whether the session cookie should be written. -2. Invokes the method on the configured session authentication module () to set the thread principal and optionally write the session cookie. +2. Invokes the method on the configured session authentication module () to set the thread principal and optionally write the session cookie. ]]> @@ -1938,7 +1938,7 @@ method from inside the method while signing out of the session at the relying party (RP). The event is not raised when doing federated sign-out through the method. + This event is raised through a call to the method from inside the method while signing out of the session at the relying party (RP). The event is not raised when doing federated sign-out through the method. You can add an event handler to perform any additional processing that is needed by your application after the session cookie has been deleted. @@ -1973,7 +1973,7 @@ method to perform the sign-in. + The default implementation invokes the method to perform the sign-in. ]]> @@ -2001,11 +2001,11 @@ method is invoked, the sign-in message that is generated contains a wctx parameter that has the following format: `ru=returnUrl&cx=SignInContext&rm=rememberMeSet&id=uniqueId`. The value of the is stored in the `cx` parameter. can be called directly from your code. It is also called when the WSFAM is performing passive redirects and also when either the method or the method is invoked by application code. + When the method is invoked, the sign-in message that is generated contains a wctx parameter that has the following format: `ru=returnUrl&cx=SignInContext&rm=rememberMeSet&id=uniqueId`. The value of the is stored in the `cx` parameter. can be called directly from your code. It is also called when the WSFAM is performing passive redirects and also when either the method or the method is invoked by application code. Although the WSFAM saves the value in sign-in request messages, if the value is used by your application during response processing, you must provide the logic for extracting it from the wctx parameter in the sign-in response message. - For more information about the format and processing of the wctx parameter, see the method. + For more information about the format and processing of the wctx parameter, see the method. ]]> @@ -2062,7 +2062,7 @@ method from inside the method while signing out of the session at the relying party (RP). The event is not raised when doing federated sign-out through the method. + This event is raised through a call to the method from inside the method while signing out of the session at the relying party (RP). The event is not raised when doing federated sign-out through the method. You can add an event handler to perform any additional processing that is needed by your application before the session cookie is deleted. You can read the property in the event handler to determine whether the sign-out is the result of receiving a WS-Federation sign-out clean-up request message ("wsignoutcleanup1.0") from a security token service (STS) or whether it was initiated at the RP. @@ -2116,7 +2116,7 @@ ## Remarks Deletes the current session. - No sign-out request message ("wsignout1.0") is sent to the security token service (STS). To sign-out at the STS using WS-Federation protocol, use the method. + No sign-out request message ("wsignout1.0") is sent to the security token service (STS). To sign-out at the STS using WS-Federation protocol, use the method. ]]> @@ -2146,9 +2146,9 @@ ## Remarks Deletes the current session and redirects the browser back to the URL specified in the current HTTP request. - Invokes the method with the `redirectUrl` parameter set to the URL of the current request. + Invokes the method with the `redirectUrl` parameter set to the URL of the current request. - No sign-out request message ("wsignout1.0") is sent to the security token service (STS). To sign-out at the STS using WS-Federation protocol, use the method. + No sign-out request message ("wsignout1.0") is sent to the security token service (STS). To sign-out at the STS using WS-Federation protocol, use the method. ]]> @@ -2182,17 +2182,17 @@ ## Remarks This method performs the actual work of deleting the current session and raising the appropriate sign-out events. The method does the following: -1. Invokes the method to raise the event. An event handler can provide any necessary processing before the session is deleted. The property is set according to the `isIPRequest` parameter. +1. Invokes the method to raise the event. An event handler can provide any necessary processing before the session is deleted. The property is set according to the `isIPRequest` parameter. -2. Calls the method on the current session authentication manager to delete the session cookie. +2. Calls the method on the current session authentication manager to delete the session cookie. - Invokes the method to raise the event. + Invokes the method to raise the event. -3. If an error occurs during sign-out processing, invokes the method to raise the event. An event handler can cancel the processing and prevent an exception from being returned to the caller of +3. If an error occurs during sign-out processing, invokes the method to raise the event. An event handler can cancel the processing and prevent an exception from being returned to the caller of - You can call the method with the `isIPRequest` parameter set `false` to sign out of a session without performing a redirect. The method is ultimately called by all of the other overloaded methods (with the `isIPRequest` parameter set to `false`) to perform the sign out handling. The method is called from the method with the `isIPRequest` parameter set `true` to sign out of the session when it is processing a WS-Federation sign-out clean-up message ("wsignoutcleanup1.0"). + You can call the method with the `isIPRequest` parameter set `false` to sign out of a session without performing a redirect. The method is ultimately called by all of the other overloaded methods (with the `isIPRequest` parameter set to `false`) to perform the sign out handling. The method is called from the method with the `isIPRequest` parameter set `true` to sign out of the session when it is processing a WS-Federation sign-out clean-up message ("wsignoutcleanup1.0"). - No sign-out request message ("wsignout1.0") is sent to the security token service (STS). To sign-out at the STS using WS-Federation protocol, use the method. + No sign-out request message ("wsignout1.0") is sent to the security token service (STS). To sign-out at the STS using WS-Federation protocol, use the method. ]]> @@ -2225,9 +2225,9 @@ ## Remarks Deletes the current session and redirects the browser back to the specified URL. - Invokes the method with the `redirectUrl` parameter and with the `initiateSignoutCleanup` set `false`. + Invokes the method with the `redirectUrl` parameter and with the `initiateSignoutCleanup` set `false`. - No sign-out request message ("wsignout1.0") is sent to the security token service (STS). To sign-out at the STS using WS-Federation protocol, use the method. + No sign-out request message ("wsignout1.0") is sent to the security token service (STS). To sign-out at the STS using WS-Federation protocol, use the method. ]]> @@ -2264,9 +2264,9 @@ ## Remarks Deletes the current session and redirects the browser back to the specified URL. - Invokes the method with the `initiateSignoutCleanup` parameter set `false`. + Invokes the method with the `initiateSignoutCleanup` parameter set `false`. - No sign-out request message ("wsignout1.0") is sent to the security token service (STS). To sign-out at the STS using WS-Federation protocol, use the method. + No sign-out request message ("wsignout1.0") is sent to the security token service (STS). To sign-out at the STS using WS-Federation protocol, use the method. ]]> @@ -2297,7 +2297,7 @@ method from inside the method while signing out of the session at the relying party (RP). The event is not raised when doing federated sign-out through the method. + This event is raised through a call to the method from inside the method while signing out of the session at the relying party (RP). The event is not raised when doing federated sign-out through the method. The event is a cancellable event. You can set the property in an event handler to prevent the exception that caused the error from being returned to the initiator of the sign-out. @@ -2329,7 +2329,7 @@ ## Remarks By default, this property is initialized from the `signOutQueryString` attribute of the [<wsFederation>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/wsfederation) element in the configuration file. It is intended to contain any application-specific parameters to be sent in a WS-Federation sign-out request. To remove these parameters, you can set the property to an empty string. - The WSFAM does not use this property directly; however, you can pass it to the method to create a complete WS-Federation sign-out URL that can then be used by your code. + The WSFAM does not use this property directly; however, you can pass it to the method to create a complete WS-Federation sign-out URL that can then be used by your code. ]]> @@ -2362,7 +2362,7 @@ The wreply parameter is optional. If the property is set to `null` or an empty string, the wreply parameter is not included in the sign-out request. - The WSFAM does not use this property directly. However, you can pass it to the method when performing WS-Federation sign-out from your code or you can pass it to the method to create a complete WS-Federation sign-out URL. + The WSFAM does not use this property directly. However, you can pass it to the method when performing WS-Federation sign-out from your code or you can pass it to the method to create a complete WS-Federation sign-out URL. ]]> diff --git a/xml/System.IdentityModel.Services/WSFederationMessage.xml b/xml/System.IdentityModel.Services/WSFederationMessage.xml index c9b4cac54a0..8868aa06153 100644 --- a/xml/System.IdentityModel.Services/WSFederationMessage.xml +++ b/xml/System.IdentityModel.Services/WSFederationMessage.xml @@ -148,7 +148,7 @@ ## Remarks If a message can be created, the method returns an appropriate implementation of based on the wa parameter submitted in the form post; for example, if wa parameter is "wsignout1.0" then a object is returned. - Gets the base URL and the collection of form variables submitted by the client from the request and invokes the method. + Gets the base URL and the collection of form variables submitted by the client from the request and invokes the method. ]]> @@ -238,7 +238,7 @@ Other exceptions may be thrown depending on the combination and values of parameters present in the query string. - Invokes the method. + Invokes the method. ]]> @@ -308,7 +308,7 @@ ## Remarks If a message can be created, the method returns an appropriate implementation of based on the wa parameter in the query string; for example, if wa parameter is "wsignout1.0" then a object is returned. - Invokes the method. + Invokes the method. ]]> diff --git a/xml/System.IdentityModel.Tokens/AggregateTokenResolver.xml b/xml/System.IdentityModel.Tokens/AggregateTokenResolver.xml index b15263c0c29..e7cef39a334 100644 --- a/xml/System.IdentityModel.Tokens/AggregateTokenResolver.xml +++ b/xml/System.IdentityModel.Tokens/AggregateTokenResolver.xml @@ -139,7 +139,7 @@ method is called by the and methods. + The method is called by the and methods. ]]> @@ -184,7 +184,7 @@ method is called by the and methods. + The method is called by the and methods. ]]> @@ -229,7 +229,7 @@ method is called by the and methods. + The method is called by the and methods. ]]> diff --git a/xml/System.IdentityModel.Tokens/BinaryKeyIdentifierClause.xml b/xml/System.IdentityModel.Tokens/BinaryKeyIdentifierClause.xml index e019fd41cb2..a1f3466a113 100644 --- a/xml/System.IdentityModel.Tokens/BinaryKeyIdentifierClause.xml +++ b/xml/System.IdentityModel.Tokens/BinaryKeyIdentifierClause.xml @@ -27,11 +27,11 @@ Represents a base class for key identifier clauses that are based upon binary data. - does not need to be used, other than when a custom security token service is created. When a security token service returns a security token, the issued security token contains references to attached and unattached security tokens. Attached references refer to security tokens that are contained within the security header of a SOAP message and unattached references are security tokens that are not included within the security header of the SOAP message. These references typically affirm the authenticity of the issued security token. - + does not need to be used, other than when a custom security token service is created. When a security token service returns a security token, the issued security token contains references to attached and unattached security tokens. Attached references refer to security tokens that are contained within the security header of a SOAP message and unattached references are security tokens that are not included within the security header of the SOAP message. These references typically affirm the authenticity of the issued security token. + ]]> @@ -121,13 +121,13 @@ The size of the derived key. Sets the value of the property. Initializes a new instance of the class using the specified key identifier clause type, binary data, a value that indicates whether the binary data must be cloned, a nonce and the key length. - method always returns a clone of the array passed into the `identificationData` parameter. - + method always returns a clone of the array passed into the `identificationData` parameter. + ]]> @@ -165,11 +165,11 @@ Gets the binary data that represents the key identifier. An array of that contains the binary data that represents the key identifier. - method always returns a clone of the array passed into the constructor's `identificationData` parameter. - + method always returns a clone of the array passed into the constructor's `identificationData` parameter. + ]]> @@ -204,13 +204,13 @@ Gets the binary data that represents the key identifier. An array of that contains the binary data that represents the key identifier. - method is a clone of the constructor's `identificationData` parameter when the value passed into the `cloneBuffer` is `true`; otherwise it is same array. - - The method always returns a clone of the array passed into the constructor's `identificationData` parameter. - + method is a clone of the constructor's `identificationData` parameter when the value passed into the `cloneBuffer` is `true`; otherwise it is same array. + + The method always returns a clone of the array passed into the constructor's `identificationData` parameter. + ]]> diff --git a/xml/System.IdentityModel.Tokens/BootstrapContext.xml b/xml/System.IdentityModel.Tokens/BootstrapContext.xml index 7748333cf16..b61a16a093b 100644 --- a/xml/System.IdentityModel.Tokens/BootstrapContext.xml +++ b/xml/System.IdentityModel.Tokens/BootstrapContext.xml @@ -104,18 +104,18 @@ The handler with which to serialize the token. Initializes a new instance of the class by using the specified security token and token handler. - - is . - - -or- - + is . + + -or- + is . @@ -194,11 +194,11 @@ Gets the security token that was used to initialize the context. The security token or . - constructor was used; otherwise it is `null`. - + constructor was used; otherwise it is `null`. + ]]> @@ -222,11 +222,11 @@ Gets the token handler that was used to initialize the context. The token handler or . - constructor was used; otherwise it is `null`. - + constructor was used; otherwise it is `null`. + ]]> @@ -250,11 +250,11 @@ Gets the string that was used to initialize the context. The string that was used to initialize the context or . - constructor was used; otherwise it is `null`. - + constructor was used; otherwise it is `null`. + ]]> @@ -278,11 +278,11 @@ Gets the array that was used to initialize the context. The array that was used to initialize the context or . - constructor was used; otherwise it is `null`. - + constructor was used; otherwise it is `null`. + ]]> diff --git a/xml/System.IdentityModel.Tokens/ConfigurationBasedIssuerNameRegistry.xml b/xml/System.IdentityModel.Tokens/ConfigurationBasedIssuerNameRegistry.xml index 643aad693e2..47e51b6f00d 100644 --- a/xml/System.IdentityModel.Tokens/ConfigurationBasedIssuerNameRegistry.xml +++ b/xml/System.IdentityModel.Tokens/ConfigurationBasedIssuerNameRegistry.xml @@ -23,7 +23,7 @@ The map of trusted issuers is specified in a configuration file by adding entries under the [<trustedIssuers>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/trustedissuers) element. The `` element is a child element of the [<issuerNameRegistry>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/issuernameregistry) element and it is valid when the class is specified in the `type` attribute of that element. For more information, see the documentation for each of these elements in the [WIF Configuration Schema](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/). For more information about issuer name registries, see the class. - You can derive from to implement your own configuration based issuer name registry. Which methods you override will depend upon your implementation. For example, you can override the method to load configuration from a custom configuration schema. + You can derive from to implement your own configuration based issuer name registry. Which methods you override will depend upon your implementation. For example, you can override the method to load configuration from a custom configuration schema. @@ -94,7 +94,7 @@ dictionary. In derived classes, you can call this method from the method to add issuers to the dictionary. + You can call this method to add issuers to the dictionary. In derived classes, you can call this method from the method to add issuers to the dictionary. ]]> @@ -129,7 +129,7 @@ method. + The key to the dictionary is the ASN.1 encoded form of the thumbprint of the trusted issuer's certificate and the value is the issuer name. The dictionary contains the issuers that were specified in configuration and any additional issuers that have been added with the method. ]]> @@ -194,7 +194,7 @@ method is called by the configuration infrastructure. When this method is called, the `nodelist` will contain the top-level child elements of the [<issuerNameRegistry>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/issuernameregistry) element from the configuration file. Each of these may, in turn, contain attributes or child elements depending on the configuration schema you define for your derived class. + The method is called by the configuration infrastructure. When this method is called, the `nodelist` will contain the top-level child elements of the [<issuerNameRegistry>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/issuernameregistry) element from the configuration file. Each of these may, in turn, contain attributes or child elements depending on the configuration schema you define for your derived class. This method is called by the configuration infrastructure. The default implementation loads configuration from a [<trustedIssuers>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/trustedissuers) element (configured under the [<issuerNameRegistry>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/issuernameregistry) element). You can override this method to provide support for your own custom configuration elements in derived classes. diff --git a/xml/System.IdentityModel.Tokens/EncryptedKeyIdentifierClause.xml b/xml/System.IdentityModel.Tokens/EncryptedKeyIdentifierClause.xml index 3769e2a32a8..55a9b105bcb 100644 --- a/xml/System.IdentityModel.Tokens/EncryptedKeyIdentifierClause.xml +++ b/xml/System.IdentityModel.Tokens/EncryptedKeyIdentifierClause.xml @@ -30,7 +30,7 @@ does not need to be used, other than when a custom security token service is created. When a security token service returns a security token, the issued security token contains references to attached and unattached security tokens. Attached references refer to security tokens that are contained within the security header of a SOAP message and unattached references are security tokens that are not included within the security header of a SOAP message. These references typically affirm the authenticity of the issued security token. Use the class to reference an encrypted key. The method returns the encrypted key. + Typically, the does not need to be used, other than when a custom security token service is created. When a security token service returns a security token, the issued security token contains references to attached and unattached security tokens. Attached references refer to security tokens that are contained within the security header of a SOAP message and unattached references are security tokens that are not included within the security header of a SOAP message. These references typically affirm the authenticity of the issued security token. Use the class to reference an encrypted key. The method returns the encrypted key. WCF accepts wrapped keys that are well formed with respect to the wire format. The key wrap algorithm specified on the wire is accepted and used. It is not verified to be compatible with the specified by the endpoint. @@ -387,7 +387,7 @@ method is a clone of the encrypted key. + The array that is returned by the method is a clone of the encrypted key. ]]> @@ -513,7 +513,7 @@ method returns a string that contains the encrypted key and the cryptographic algorithm that is used to encrypt the key. + The method returns a string that contains the encrypted key and the cryptographic algorithm that is used to encrypt the key. ]]> diff --git a/xml/System.IdentityModel.Tokens/GenericXmlSecurityToken.xml b/xml/System.IdentityModel.Tokens/GenericXmlSecurityToken.xml index 1ca6ae25249..a302186559c 100644 --- a/xml/System.IdentityModel.Tokens/GenericXmlSecurityToken.xml +++ b/xml/System.IdentityModel.Tokens/GenericXmlSecurityToken.xml @@ -204,7 +204,7 @@ method to determine if a security token can create a specific key identifier. To create the key identifier call the method. + Use the method to determine if a security token can create a specific key identifier. To create the key identifier call the method. ]]> @@ -257,9 +257,9 @@ property or the property is returned by the method depending on the type that is passed into the `T` parameter. + The value of the property or the property is returned by the method depending on the type that is passed into the `T` parameter. - Use the method to determine if a security token can create a specific key identifier. To create the key identifier call the method. + Use the method to determine if a security token can create a specific key identifier. To create the key identifier call the method. ]]> @@ -427,7 +427,7 @@ and property values using the method on the key identifier clause that is returned by the property values. + The `keyIdentifierClause` parameter is matched against the and property values using the method on the key identifier clause that is returned by the property values. ]]> @@ -603,7 +603,7 @@ method returns the , , , and properties. + The method returns the , , , and properties. ]]> diff --git a/xml/System.IdentityModel.Tokens/IssuerNameRegistry.xml b/xml/System.IdentityModel.Tokens/IssuerNameRegistry.xml index 8e3631be33d..e0dc75b94e8 100644 --- a/xml/System.IdentityModel.Tokens/IssuerNameRegistry.xml +++ b/xml/System.IdentityModel.Tokens/IssuerNameRegistry.xml @@ -29,7 +29,7 @@ Windows Identity Foundation (WIF) provides an implementation of the class out of the box: the class. When you use this implementation you can specify the list of trusted issuers in the configuration file of the RP application under the [<trustedIssuers>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/trustedissuers) element, which is a child element of the `` element when the .class is referenced in that element's `type` attribute. Under the `` element, each issuer name is mapped to the X.509 certificate that should be used to verify its signature. - To create a custom issuer name registry, you must override the method. This method returns the issuer name for the specified security token. You can optionally override the method to provide a hinting mechanism when retrieving issuer names and the method if you want to provide an issuer name for Windows tokens that is different from . Override the method to enable your issuer name registry to be initialized from a configuration file. + To create a custom issuer name registry, you must override the method. This method returns the issuer name for the specified security token. You can optionally override the method to provide a hinting mechanism when retrieving issuer names and the method if you want to provide an issuer name for Windows tokens that is different from . Override the method to enable your issuer name registry to be initialized from a configuration file. @@ -125,7 +125,7 @@ ## Examples - The following code shows the method for an issuer name registry. The full sample is in the class overview topic. + The following code shows the method for an issuer name registry. The full sample is in the class overview topic. > [!WARNING] > The following code is for illustrative purposes only. Validating certificates based on subject name is not a good practice. This code should not be used as is in production. @@ -165,7 +165,7 @@ method. + The default implementation ignores the `requestedIssuerName` parameter and simply calls the method. Called from the processing pipeline by the security token handler that is processing the token. The method should return a unique name for the issuer within the context of the RP application. @@ -234,7 +234,7 @@ method is called by the configuration infrastructure. When this method is called, the `nodelist` will contain the top-level child elements of the [<issuerNameRegistry>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/issuernameregistry) element from the configuration file. Each of these may, in turn, contain attributes or child elements depending on the configuration schema you define for your derived class. + The method is called by the configuration infrastructure. When this method is called, the `nodelist` will contain the top-level child elements of the [<issuerNameRegistry>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/issuernameregistry) element from the configuration file. Each of these may, in turn, contain attributes or child elements depending on the configuration schema you define for your derived class. The default implementation throws a . Override this method in your derived class to enable initialization of your issuer name registry from a configuration file. diff --git a/xml/System.IdentityModel.Tokens/KerberosReceiverSecurityToken.xml b/xml/System.IdentityModel.Tokens/KerberosReceiverSecurityToken.xml index 1eda8b83283..167da9a43bd 100644 --- a/xml/System.IdentityModel.Tokens/KerberosReceiverSecurityToken.xml +++ b/xml/System.IdentityModel.Tokens/KerberosReceiverSecurityToken.xml @@ -60,7 +60,7 @@ method. + For the `request` parameter, pass the Kerberos ticket that is the returned from the method. This constructor generates a unique identifier of the security token and sets that value to the property. @@ -150,7 +150,7 @@ method. + To create the key identifier clause, call the method. ]]> @@ -188,7 +188,7 @@ class can create the specified key identifier clause, call the method. + To determine whether the class can create the specified key identifier clause, call the method. ]]> diff --git a/xml/System.IdentityModel.Tokens/KerberosRequestorSecurityToken.xml b/xml/System.IdentityModel.Tokens/KerberosRequestorSecurityToken.xml index 203db040bd2..5616182cbe7 100644 --- a/xml/System.IdentityModel.Tokens/KerberosRequestorSecurityToken.xml +++ b/xml/System.IdentityModel.Tokens/KerberosRequestorSecurityToken.xml @@ -160,7 +160,7 @@ method. + To create the key identifier clause, call the method. ]]> @@ -198,7 +198,7 @@ class can create the specified key identifier clause, call the method. + To determine whether the class can create the specified key identifier clause, call the method. ]]> diff --git a/xml/System.IdentityModel.Tokens/KerberosTicketHashKeyIdentifierClause.xml b/xml/System.IdentityModel.Tokens/KerberosTicketHashKeyIdentifierClause.xml index 8ee87ad441d..ac780330a09 100644 --- a/xml/System.IdentityModel.Tokens/KerberosTicketHashKeyIdentifierClause.xml +++ b/xml/System.IdentityModel.Tokens/KerberosTicketHashKeyIdentifierClause.xml @@ -17,11 +17,11 @@ Represents a key identifier clause that identifies a or security token. - class to reference a or security token using a SHA-1 hash of the Kerberos ticket. The SHA-1 hash of the Kerberos ticket can be obtained by calling the method. - + class to reference a or security token using a SHA-1 hash of the Kerberos ticket. The SHA-1 hash of the Kerberos ticket can be obtained by calling the method. + ]]> @@ -86,11 +86,11 @@ The size of the derived key. Initializes a new instance of the class using the specified Kerberos ticket, nonce, and key length. - @@ -143,11 +143,11 @@ Returns the current object. A that represents the current object. - method returns the SHA-1 hash of a Kerberos service ticket. - + method returns the SHA-1 hash of a Kerberos service ticket. + ]]> diff --git a/xml/System.IdentityModel.Tokens/LocalIdKeyIdentifierClause.xml b/xml/System.IdentityModel.Tokens/LocalIdKeyIdentifierClause.xml index 19e45066379..ce397b71653 100644 --- a/xml/System.IdentityModel.Tokens/LocalIdKeyIdentifierClause.xml +++ b/xml/System.IdentityModel.Tokens/LocalIdKeyIdentifierClause.xml @@ -363,7 +363,7 @@ method returns a string that contains the values of the and properties. + The method returns a string that contains the values of the and properties. ]]> diff --git a/xml/System.IdentityModel.Tokens/RsaKeyIdentifierClause.xml b/xml/System.IdentityModel.Tokens/RsaKeyIdentifierClause.xml index ca3b035f5b0..49ff7e4489b 100644 --- a/xml/System.IdentityModel.Tokens/RsaKeyIdentifierClause.xml +++ b/xml/System.IdentityModel.Tokens/RsaKeyIdentifierClause.xml @@ -74,7 +74,7 @@ method. + To create the key, call the method. ]]> @@ -258,7 +258,7 @@ method returns a string that contains the `Modulus` and `Exponent` values of the RSA algorithm. The `Modulus` and `Exponent` values are the values returned by the and methods that are Base64 encoded. + The method returns a string that contains the `Modulus` and `Exponent` values of the RSA algorithm. The `Modulus` and `Exponent` values are the values returned by the and methods that are Base64 encoded. ]]> diff --git a/xml/System.IdentityModel.Tokens/RsaSecurityToken.xml b/xml/System.IdentityModel.Tokens/RsaSecurityToken.xml index e6a7b1753d5..be9f0f3642d 100644 --- a/xml/System.IdentityModel.Tokens/RsaSecurityToken.xml +++ b/xml/System.IdentityModel.Tokens/RsaSecurityToken.xml @@ -129,7 +129,7 @@ method. + To create the key identifier clause, call the method. ]]> @@ -167,7 +167,7 @@ class can create the specified key identifier clause, call the method. + To determine whether the class can create the specified key identifier clause, call the method. ]]> diff --git a/xml/System.IdentityModel.Tokens/Saml2Assertion.xml b/xml/System.IdentityModel.Tokens/Saml2Assertion.xml index 15b7ba148f4..9523164e966 100644 --- a/xml/System.IdentityModel.Tokens/Saml2Assertion.xml +++ b/xml/System.IdentityModel.Tokens/Saml2Assertion.xml @@ -106,7 +106,7 @@ method and can re-emit the original data as long as the property has not changed from the time that assertion was read. + The default implementation preserves the source data when read using the method and can re-emit the original data as long as the property has not changed from the time that assertion was read. > [!IMPORTANT] > It is very important that SAML assertions with different data have different IDs. If implementing a scheme whereby an assertion "template" is loaded and certain bits of data are filled in, the Id must be changed. diff --git a/xml/System.IdentityModel.Tokens/Saml2AuthenticationContext.xml b/xml/System.IdentityModel.Tokens/Saml2AuthenticationContext.xml index 8e0bdfb56f2..614a8986404 100644 --- a/xml/System.IdentityModel.Tokens/Saml2AuthenticationContext.xml +++ b/xml/System.IdentityModel.Tokens/Saml2AuthenticationContext.xml @@ -19,7 +19,7 @@ class, overriding the and methods to read and write the by-value declaration. + This base class does not directly support any by-value authentication context declarations (represented in XML by the AuthnContextDecl element). To support by-value declarations, extend this class to support the data model and extend the class, overriding the and methods to read and write the by-value declaration. For more information about the element that this class represents, see the SAML V2.0 Core specification. diff --git a/xml/System.IdentityModel.Tokens/Saml2SecurityToken.xml b/xml/System.IdentityModel.Tokens/Saml2SecurityToken.xml index 73f46a146d1..fdbe99dade1 100644 --- a/xml/System.IdentityModel.Tokens/Saml2SecurityToken.xml +++ b/xml/System.IdentityModel.Tokens/Saml2SecurityToken.xml @@ -120,7 +120,7 @@ ## Remarks For security tokens, the claims are specified using a SAML assertion. - Use a constructor or the method to set the property. + Use a constructor or the method to set the property. ]]> @@ -158,7 +158,7 @@ method to determine if a security token can create a specific key identifier. To create the key identifier call the method. + Use the method to determine if a security token can create a specific key identifier. To create the key identifier call the method. ]]> @@ -195,7 +195,7 @@ method to determine if a security token can create a specific key identifier. To create the key identifier call the method. + Use the method to determine if a security token can create a specific key identifier. To create the key identifier call the method. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlAction.xml b/xml/System.IdentityModel.Tokens/SamlAction.xml index 8e4ead8ccba..429f9b8ca3a 100644 --- a/xml/System.IdentityModel.Tokens/SamlAction.xml +++ b/xml/System.IdentityModel.Tokens/SamlAction.xml @@ -205,7 +205,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -234,7 +234,7 @@ method is called, the property is set to `true`. + When the method is called, the property is set to `true`. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlAdvice.xml b/xml/System.IdentityModel.Tokens/SamlAdvice.xml index 7a150055d87..a0441682eb6 100644 --- a/xml/System.IdentityModel.Tokens/SamlAdvice.xml +++ b/xml/System.IdentityModel.Tokens/SamlAdvice.xml @@ -57,7 +57,7 @@ method, an empty `` element is generated by the method. + When this constructor is called and the instance is not modified prior to serializing it into XML by calling the method, an empty `` element is generated by the method. ]]> @@ -250,7 +250,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -279,7 +279,7 @@ method is called, the property is set to `true`. + When the method is called, the property is set to `true`. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlAssertion.xml b/xml/System.IdentityModel.Tokens/SamlAssertion.xml index 108def4b8ec..485aa592fe7 100644 --- a/xml/System.IdentityModel.Tokens/SamlAssertion.xml +++ b/xml/System.IdentityModel.Tokens/SamlAssertion.xml @@ -208,7 +208,7 @@ method and can re-emit the original data as long as the property has not changed from the time that assertion was read. + The default implementation preserves the source data when read using the method and can re-emit the original data as long as the property has not changed from the time that assertion was read. > [!IMPORTANT] > It is very important that SAML assertions with different data have different IDs. If implementing a scheme whereby an assertion "template" is loaded and certain bits of data are filled in, the Id must be changed. @@ -272,7 +272,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -391,7 +391,7 @@ method is called, the property is set to `true`. + When the method is called, the property is set to `true`. ]]> @@ -458,7 +458,7 @@ method is called, the property is set. + When the method is called, the property is set. ]]> @@ -571,7 +571,7 @@ method is called and a SAML assertion is digitally signed, the digital signature is set to the property. When the SAML assertion is not digitally signed, the value of the property is `null`. + When the method is called and a SAML assertion is digitally signed, the digital signature is set to the property. When the SAML assertion is not digitally signed, the value of the property is `null`. ]]> @@ -600,7 +600,7 @@ to set the SAML statements associated with a SAML assertion or add it directly to the collection that is returned by this property when the property is `false`. + Use the to set the SAML statements associated with a SAML assertion or add it directly to the collection that is returned by this property when the property is `false`. The following table maps the three types of SAML statements defined in the Assertions and Protocol for the OASIS SAML specification to their respective types. @@ -641,7 +641,7 @@ method and can re-emit the original data as long as the property has not changed from the time that assertion was read. + The default implementation preserves the source data when read using the method and can re-emit the original data as long as the property has not changed from the time that assertion was read. > [!IMPORTANT] > It is very important that SAML assertions with different data have different IDs. If implementing a scheme whereby an assertion "template" is loaded and certain bits of data are filled in, the Id must be changed. diff --git a/xml/System.IdentityModel.Tokens/SamlAssertionKeyIdentifierClause.xml b/xml/System.IdentityModel.Tokens/SamlAssertionKeyIdentifierClause.xml index 9829934a668..2072d7d3839 100644 --- a/xml/System.IdentityModel.Tokens/SamlAssertionKeyIdentifierClause.xml +++ b/xml/System.IdentityModel.Tokens/SamlAssertionKeyIdentifierClause.xml @@ -178,7 +178,7 @@ overload returns a value of `true` when either of the following is `true`: + This overload returns a value of `true` when either of the following is `true`: - The property of the `keyIdentifierClause` parameter has the same value as the current instance's property. diff --git a/xml/System.IdentityModel.Tokens/SamlAttribute.xml b/xml/System.IdentityModel.Tokens/SamlAttribute.xml index 4d66b606ac9..d331f0e0816 100644 --- a/xml/System.IdentityModel.Tokens/SamlAttribute.xml +++ b/xml/System.IdentityModel.Tokens/SamlAttribute.xml @@ -22,7 +22,7 @@ ## Remarks The class corresponds to the `` XML element that is defined in the OASIS SAML 1.1 specification. - A instance contains claims for the subject of a . For example, a might contain an `Over21` claim, whose type would be specified in the property and whose resource would be specified as a member of the collection in the property. When the method is called, this `Over21` claim is added to the authorization policy that is returned by returned from by the . When the property contains multiple elements then one claim is returned for each element. + A instance contains claims for the subject of a . For example, a might contain an `Over21` claim, whose type would be specified in the property and whose resource would be specified as a member of the collection in the property. When the method is called, this `Over21` claim is added to the authorization policy that is returned by returned from by the . When the property contains multiple elements then one claim is returned for each element. position in the SAML object hierarchy is: @@ -265,7 +265,7 @@ security tokens specify their claims using SAML assertions that can specify an attribute about the subject represented by the security token. Use the method to convert the SAML attribute into a set of claims. + security tokens specify their claims using SAML assertions that can specify an attribute about the subject represented by the security token. Use the method to convert the SAML attribute into a set of claims. ]]> @@ -295,7 +295,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -324,7 +324,7 @@ method is called, the property is set to `true` and properties of this instance can no longer be set. + When the method is called, the property is set to `true` and properties of this instance can no longer be set. ]]> @@ -448,7 +448,7 @@ method sets the , , and properties. + The method sets the , , and properties. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlAttributeStatement.xml b/xml/System.IdentityModel.Tokens/SamlAttributeStatement.xml index f646be419e8..05c0ab87df5 100644 --- a/xml/System.IdentityModel.Tokens/SamlAttributeStatement.xml +++ b/xml/System.IdentityModel.Tokens/SamlAttributeStatement.xml @@ -125,7 +125,7 @@ method to convert a set of claims into attributes of a SAML assertion. + Use the method to convert a set of claims into attributes of a SAML assertion. ]]> @@ -186,7 +186,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -215,7 +215,7 @@ method is called, the property is set to `true` and properties of this instance can no longer be set. + When the method is called, the property is set to `true` and properties of this instance can no longer be set. ]]> @@ -253,7 +253,7 @@ method sets the and properties. + The method sets the and properties. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlAudienceRestrictionCondition.xml b/xml/System.IdentityModel.Tokens/SamlAudienceRestrictionCondition.xml index 731985759cd..f48d0b4cb28 100644 --- a/xml/System.IdentityModel.Tokens/SamlAudienceRestrictionCondition.xml +++ b/xml/System.IdentityModel.Tokens/SamlAudienceRestrictionCondition.xml @@ -24,7 +24,7 @@ Use the class to specify a is intended for a specific audience and that the issuing SAML authority does not warrant the SAML assertion for other audiences that receive the security token. The claims for security tokens are expressed as part of a , which can optionally have a set of conditions affect the validity of the assertion. One of those conditions is a , which specifies that the assertion is addressed to one or more specific audiences. The issuing SAML authority cannot prevent an unintended recipient from taking action on the basis of the information provided in the SAML assertion. However, the class allows the SAML authority to state explicitly that no warranty is provided to such a party in a machine- and human-readable form. - To specify the set of intended audiences, use the constructor that accepts a set of audiences. To get the set of intended audiences, access the property. + To specify the set of intended audiences, use the constructor that accepts a set of audiences. To get the set of intended audiences, access the property. ]]> @@ -116,7 +116,7 @@ property, use the constructor that accepts a set of audiences. + To set the property, use the constructor that accepts a set of audiences. ]]> @@ -146,7 +146,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -175,7 +175,7 @@ method is called, the property is set to `true`. + When the method is called, the property is set to `true`. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlAuthenticationStatement.xml b/xml/System.IdentityModel.Tokens/SamlAuthenticationStatement.xml index b3cdacd7077..678a7dfe259 100644 --- a/xml/System.IdentityModel.Tokens/SamlAuthenticationStatement.xml +++ b/xml/System.IdentityModel.Tokens/SamlAuthenticationStatement.xml @@ -135,7 +135,7 @@ method adds a claim to the `claims` parameter based on the , , , , , , and properties. + The method adds a claim to the `claims` parameter based on the , , , , , , and properties. ]]> @@ -363,7 +363,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -392,7 +392,7 @@ method is called, the property is set to `true` and properties of this instance can no longer be set. + When the method is called, the property is set to `true` and properties of this instance can no longer be set. ]]> @@ -430,7 +430,7 @@ method sets the , , , , , and properties. + The method sets the , , , , , and properties. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlAuthorityBinding.xml b/xml/System.IdentityModel.Tokens/SamlAuthorityBinding.xml index f4b2e6891d1..de6c68125d8 100644 --- a/xml/System.IdentityModel.Tokens/SamlAuthorityBinding.xml +++ b/xml/System.IdentityModel.Tokens/SamlAuthorityBinding.xml @@ -188,7 +188,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -254,7 +254,7 @@ method is called, the property is set to `true`. + When the method is called, the property is set to `true`. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlAuthorizationDecisionStatement.xml b/xml/System.IdentityModel.Tokens/SamlAuthorizationDecisionStatement.xml index e1b41db47a8..e16bc917f97 100644 --- a/xml/System.IdentityModel.Tokens/SamlAuthorizationDecisionStatement.xml +++ b/xml/System.IdentityModel.Tokens/SamlAuthorizationDecisionStatement.xml @@ -221,7 +221,7 @@ method adds a claim to the `claims` parameter for each action specified in the property. Each claim that is added to the collection is based on the action, and the , , and properties. The claim resource type is . + The method adds a claim to the `claims` parameter for each action specified in the property. Each claim that is added to the collection is based on the action, and the , , and properties. The claim resource type is . ]]> @@ -307,7 +307,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -336,7 +336,7 @@ method is called, the property is set to `true` and properties of this instance can no longer be set. + When the method is called, the property is set to `true` and properties of this instance can no longer be set. ]]> @@ -374,7 +374,7 @@ method sets the following properties: + The method sets the following properties: - @@ -489,7 +489,7 @@ method to write the current instance into a `` element. + Use the method to write the current instance into a `` element. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlCondition.xml b/xml/System.IdentityModel.Tokens/SamlCondition.xml index 743c4846008..d74e81b1108 100644 --- a/xml/System.IdentityModel.Tokens/SamlCondition.xml +++ b/xml/System.IdentityModel.Tokens/SamlCondition.xml @@ -73,7 +73,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -102,7 +102,7 @@ method is called, the property is set to `true` and properties of this instance can no longer be set. + When the method is called, the property is set to `true` and properties of this instance can no longer be set. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlConditions.xml b/xml/System.IdentityModel.Tokens/SamlConditions.xml index bf147d6e491..5d59731494a 100644 --- a/xml/System.IdentityModel.Tokens/SamlConditions.xml +++ b/xml/System.IdentityModel.Tokens/SamlConditions.xml @@ -185,7 +185,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -214,7 +214,7 @@ method is called, the property is set to `true` and properties of this instance can no longer be set. + When the method is called, the property is set to `true` and properties of this instance can no longer be set. ]]> @@ -310,7 +310,7 @@ method sets the following properties: + The method sets the following properties: - @@ -358,7 +358,7 @@ method to write the current instance into a `` element. + Use the method to write the current instance into a `` element. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlDoNotCacheCondition.xml b/xml/System.IdentityModel.Tokens/SamlDoNotCacheCondition.xml index f8839433406..f1c863fa71c 100644 --- a/xml/System.IdentityModel.Tokens/SamlDoNotCacheCondition.xml +++ b/xml/System.IdentityModel.Tokens/SamlDoNotCacheCondition.xml @@ -82,7 +82,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -111,7 +111,7 @@ method is called, the property is set to `true` and properties of this instance can no longer be set. + When the method is called, the property is set to `true` and properties of this instance can no longer be set. ]]> @@ -149,7 +149,7 @@ method does note set any properties. + The method does note set any properties. ]]> @@ -193,7 +193,7 @@ method to write the current instance into a `` element. + Use the method to write the current instance into a `` element. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlEvidence.xml b/xml/System.IdentityModel.Tokens/SamlEvidence.xml index e2840486070..e24b7f4c66b 100644 --- a/xml/System.IdentityModel.Tokens/SamlEvidence.xml +++ b/xml/System.IdentityModel.Tokens/SamlEvidence.xml @@ -254,7 +254,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -283,7 +283,7 @@ method is called, the property is set to `true` and properties of this instance can no longer be set. + When the method is called, the property is set to `true` and properties of this instance can no longer be set. ]]> @@ -321,7 +321,7 @@ method sets the following properties: + The method sets the following properties: - @@ -369,7 +369,7 @@ method to write the current instance into a `` element. + Use the method to write the current instance into a `` element. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlSecurityToken.xml b/xml/System.IdentityModel.Tokens/SamlSecurityToken.xml index a5e446e5799..a970116c3a3 100644 --- a/xml/System.IdentityModel.Tokens/SamlSecurityToken.xml +++ b/xml/System.IdentityModel.Tokens/SamlSecurityToken.xml @@ -78,7 +78,7 @@ method, which can be overridden in derived classes. + This constructor calls the method, which can be overridden in derived classes. For security tokens, the claims are specified using a SAML assertion. @@ -111,7 +111,7 @@ ## Remarks For security tokens, the claims are specified using a SAML assertion. - Use a constructor or the method to set the property. + Use a constructor or the method to set the property. ]]> @@ -150,7 +150,7 @@ method to determine if a security token can create a specific key identifier. To create the key identifier call the method. + Use the method to determine if a security token can create a specific key identifier. To create the key identifier call the method. ]]> @@ -188,7 +188,7 @@ method to determine if a security token can create a specific key identifier. To create the key identifier call the method. + Use the method to determine if a security token can create a specific key identifier. To create the key identifier call the method. ]]> @@ -251,7 +251,7 @@ constructor calls the method, which can be overridden in derived classes. + The constructor calls the method, which can be overridden in derived classes. For security tokens, the claims are specified using a SAML assertion. diff --git a/xml/System.IdentityModel.Tokens/SamlSecurityTokenHandler.xml b/xml/System.IdentityModel.Tokens/SamlSecurityTokenHandler.xml index b46fa690e20..c000ec1f473 100644 --- a/xml/System.IdentityModel.Tokens/SamlSecurityTokenHandler.xml +++ b/xml/System.IdentityModel.Tokens/SamlSecurityTokenHandler.xml @@ -732,7 +732,7 @@ method returns the SAML11 authentication method identifier that matches the specified normalized URI. For example, if is specified for `normalizedAuthenticationType`, the following URI is returned: `urn:oasis:names:tc:SAML:1.0:am:X509-PKI`. If a mapping does not exist for `normalizedAuthenticationType`, it is returned unaltered. + The method returns the SAML11 authentication method identifier that matches the specified normalized URI. For example, if is specified for `normalizedAuthenticationType`, the following URI is returned: `urn:oasis:names:tc:SAML:1.0:am:X509-PKI`. If a mapping does not exist for `normalizedAuthenticationType`, it is returned unaltered. ]]> @@ -1038,7 +1038,7 @@ method returns the value that matches the specified SAML11 authentication method identifier. For example, if `urn:oasis:names:tc:SAML:1.0:am:X509-PKI` is specified for `saml11AuthenticationMethod`, is returned. If a mapping does not exist for `saml11AuthenticationMethod`, it is returned unaltered. + The method returns the value that matches the specified SAML11 authentication method identifier. For example, if `urn:oasis:names:tc:SAML:1.0:am:X509-PKI` is specified for `saml11AuthenticationMethod`, is returned. If a mapping does not exist for `saml11AuthenticationMethod`, it is returned unaltered. ]]> @@ -2379,7 +2379,7 @@ or method to serialize the condition based on the type of specified. + By default, the method invokes either the or method to serialize the condition based on the type of specified. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlSerializer.xml b/xml/System.IdentityModel.Tokens/SamlSerializer.xml index f95d01b7287..3813e0f4957 100644 --- a/xml/System.IdentityModel.Tokens/SamlSerializer.xml +++ b/xml/System.IdentityModel.Tokens/SamlSerializer.xml @@ -27,13 +27,13 @@ Serializes and deserializes objects into and from XML documents. - class serializes and deserializes SAML security tokens, which have an extensible format. Unlike many other security tokens, security tokens include XML elements and attributes that can be customized for an application's needs. Some of the extensibility points for a SAML assertion include the ``, ``, and `` elements. For more details about overriding how each of these elements are read, see the , , and methods. - + class serializes and deserializes SAML security tokens, which have an extensible format. Unlike many other security tokens, security tokens include XML elements and attributes that can be customized for an application's needs. Some of the extensibility points for a SAML assertion include the ``, ``, and `` elements. For more details about overriding how each of these elements are read, see the , , and methods. + ]]> @@ -93,11 +93,11 @@ Reads the additional information provided by the SAML authority within a element of a SAML assertion using the specified XML reader. A that contains additional information provided by the SAML authority within a element of a SAML assertion. - ` element within a SAML assertion is an extension point for SAML tokens. To create a serializer that can read the custom attributes, derive a class from and override the method. - + ` element within a SAML assertion is an extension point for SAML tokens. To create a serializer that can read the custom attributes, derive a class from and override the method. + ]]> @@ -133,13 +133,13 @@ Reads a SAML assertion from the specified XML reader. A that represents the SAML assertion. - ` element. - - The method calls the method to read the SAML assertion. - + ` element. + + The method calls the method to read the SAML assertion. + ]]> @@ -175,11 +175,11 @@ Reads an attribute of the subject of a SAML security token using the specified XML reader. A that represents a claim that is an attribute of the subject of a SAML security token. - ` element and can contain any well-formed XML, not just an attribute. To create a serializer that can read the custom attributes, derive a class from and override the method. - + ` element and can contain any well-formed XML, not just an attribute. To create a serializer that can read the custom attributes, derive a class from and override the method. + ]]> @@ -213,11 +213,11 @@ Reads a condition that must be taken into account when assessing the validity of a SAML assertion using the specified XML reader. A that specifies a condition that must be taken into account when assessing the validity of a SAML assertion. - ` element is an extensibility point, a serializer that understands how to read those conditions is needed. To create a serializer that can read the custom attributes, derive a class from and override the method. - + ` element is an extensibility point, a serializer that understands how to read those conditions is needed. To create a serializer that can read the custom attributes, derive a class from and override the method. + ]]> @@ -253,11 +253,11 @@ Reads a set of conditions that must be taken into account when assessing the validity of a SAML assertion using the specified XML reader. A that specifies a set of conditions that must be taken into account when assessing the validity of a SAML assertion. - method reads the contents of a `` element. - + method reads the contents of a `` element. + ]]> @@ -293,34 +293,34 @@ Reads a SAML statement using the specified XML reader. A that represents the SAML statement. - security tokens specify their claims using SAML assertions where the details of the claims are specified in SAML statements. The SAML specification defines the following statement types: - -- - -- - -- - -- - - The method reads the SAML statements listed previously. When custom statements are defined and used by an application, create a serializer to read the contents of them. To create the custom serializer, derive a class from and override the method. Custom SAML statements are contained within a `` element. - - - -## Examples - - - - - - - - - - + security tokens specify their claims using SAML assertions where the details of the claims are specified in SAML statements. The SAML specification defines the following statement types: + +- + +- + +- + +- + + The method reads the SAML statements listed previously. When custom statements are defined and used by an application, create a serializer to read the contents of them. To create the custom serializer, derive a class from and override the method. Custom SAML statements are contained within a `` element. + + + +## Examples + + + + + + + + + + ]]> @@ -350,11 +350,11 @@ An that contains the set of XML elements and attributes. Replaces the default set of XML elements and attributes that are recognized by this serializer with the specified dictionary of elements and attributes. - method when a custom set of XML elements is defined for one of the extensibility points of a SAML assertion. Extensibility points for a SAML assertion include the ``, ``, and `` elements. For more details about overriding how each of these elements are read, see the , , and methods. - + method when a custom set of XML elements is defined for one of the extensibility points of a SAML assertion. Extensibility points for a SAML assertion include the ``, ``, and `` elements. For more details about overriding how each of these elements are read, see the , , and methods. + ]]> @@ -387,11 +387,11 @@ Reads a SAML security token from the specified XML reader. A security token. - method calls the method to read the SAML assertion. - + method calls the method to read the SAML assertion. + ]]> @@ -427,18 +427,18 @@ A that is capable of writing clauses. Writes the specified SAML security token into the specified XML serializer. - method to serialize a security token. To deserialize a use the method. - + method to serialize a security token. To deserialize a use the method. + ]]> - is - - -or- - + is + + -or- + is diff --git a/xml/System.IdentityModel.Tokens/SamlStatement.xml b/xml/System.IdentityModel.Tokens/SamlStatement.xml index e6d11ac9860..21d06a09003 100644 --- a/xml/System.IdentityModel.Tokens/SamlStatement.xml +++ b/xml/System.IdentityModel.Tokens/SamlStatement.xml @@ -83,7 +83,7 @@ method to get an authorization policy for a security token. + Use the method to get an authorization policy for a security token. ]]> @@ -113,7 +113,7 @@ class, should set the property to `true` when the method is called. + Classes that derive from the class, should set the property to `true` when the method is called. ]]> @@ -142,7 +142,7 @@ method is called, the property is set to `true` and properties of this instance can no longer be set. + When the method is called, the property is set to `true` and properties of this instance can no longer be set. ]]> @@ -180,7 +180,7 @@ method to read in a SAML statement, validate the XML, and set the appropriate properties that correspond to the attributes and elements. + Use the method to read in a SAML statement, validate the XML, and set the appropriate properties that correspond to the attributes and elements. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlSubject.xml b/xml/System.IdentityModel.Tokens/SamlSubject.xml index 909ce257b27..83825686957 100644 --- a/xml/System.IdentityModel.Tokens/SamlSubject.xml +++ b/xml/System.IdentityModel.Tokens/SamlSubject.xml @@ -259,7 +259,7 @@ method to get a set of claims associated with the identity of a security token. + Use the method to get a set of claims associated with the identity of a security token. ]]> @@ -292,7 +292,7 @@ method to get a set of claims associated with the identity of a security token. + Use the method to get a set of claims associated with the identity of a security token. ]]> @@ -324,7 +324,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -386,7 +386,7 @@ method is called, the property is set to `true` and properties of this instance can no longer be set. + When the method is called, the property is set to `true` and properties of this instance can no longer be set. ]]> @@ -556,7 +556,7 @@ method sets the , , , , , , and properties. + The method sets the , , , , , , and properties. ]]> @@ -647,7 +647,7 @@ method to write the properties of the current instance into a `` element. + Use the method to write the properties of the current instance into a `` element. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlSubjectStatement.xml b/xml/System.IdentityModel.Tokens/SamlSubjectStatement.xml index 116a7602984..e6f2d57d4eb 100644 --- a/xml/System.IdentityModel.Tokens/SamlSubjectStatement.xml +++ b/xml/System.IdentityModel.Tokens/SamlSubjectStatement.xml @@ -115,7 +115,7 @@ method adds a claim to the `claims` parameter based on the property. + The method adds a claim to the `claims` parameter based on the property. ]]> @@ -152,7 +152,7 @@ method to get an authorization policy for a security token. + Use the method to get an authorization policy for a security token. ]]> @@ -182,7 +182,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -211,7 +211,7 @@ method is called, the property is set to `true` and properties of this instance can no longer be set. + When the method is called, the property is set to `true` and properties of this instance can no longer be set. ]]> @@ -273,7 +273,7 @@ property, the method can be called to set the subject of a security token when the property is `true`. + Unlike the property, the method can be called to set the subject of a security token when the property is `true`. ]]> diff --git a/xml/System.IdentityModel.Tokens/SecurityKeyIdentifier.xml b/xml/System.IdentityModel.Tokens/SecurityKeyIdentifier.xml index 3aab5aab355..0286ac6716f 100644 --- a/xml/System.IdentityModel.Tokens/SecurityKeyIdentifier.xml +++ b/xml/System.IdentityModel.Tokens/SecurityKeyIdentifier.xml @@ -373,7 +373,7 @@ class read-only, call the method. + To make this instance of the class read-only, call the method. ]]> @@ -450,7 +450,7 @@ method is called, the property is set to `true` and properties of this instance can no longer be set. For example, a key identifier clause cannot be added to this object. + When the method is called, the property is set to `true` and properties of this instance can no longer be set. For example, a key identifier clause cannot be added to this object. ]]> @@ -530,7 +530,7 @@ This member is an explicit interface member implementation. It can be used only method returns the details of all of the key identifier clauses in the key identifier. + The method returns the details of all of the key identifier clauses in the key identifier. ]]> diff --git a/xml/System.IdentityModel.Tokens/SecurityKeyIdentifierClause.xml b/xml/System.IdentityModel.Tokens/SecurityKeyIdentifierClause.xml index f457cee1cf0..2c1b3e0330b 100644 --- a/xml/System.IdentityModel.Tokens/SecurityKeyIdentifierClause.xml +++ b/xml/System.IdentityModel.Tokens/SecurityKeyIdentifierClause.xml @@ -167,7 +167,7 @@ method to return `true` and implement the method. + When a key can be created using the parameters passed into a constructor, override the method to return `true` and implement the method. ]]> @@ -235,7 +235,7 @@ method to return `true` and implement the method. + When a key can be created using the parameters passed into a constructor, override the method to return `true` and implement the method. ]]> diff --git a/xml/System.IdentityModel.Tokens/SecurityToken.xml b/xml/System.IdentityModel.Tokens/SecurityToken.xml index c61a705a4fd..82f8733f288 100644 --- a/xml/System.IdentityModel.Tokens/SecurityToken.xml +++ b/xml/System.IdentityModel.Tokens/SecurityToken.xml @@ -46,7 +46,7 @@ A security token can be used to provide authentication credentials, cryptographic key material, or, in the case of a security token issued by a security token service (STS), a collection of claims about a subject. All security tokens derive from the class. - Beginning with .NET 4.5, Windows Identity Foundation (WIF) has been fully integrated into the .NET Framework and the classes exposed by WIF are the preferred method of handling security tokens in your code. In WIF, security tokens are serialized and deserialized to and from their XML representation and are validated by using classes derived from the base class. Validating a token involves not just ensuring that the token is valid, but also returning a instance from the token that can be used in making authentication and authorization decisions. The is constructed by the token handler's implementation of the method from the claims contained in the token as well as from claims that are intrinsic to the token type itself. + Beginning with .NET 4.5, Windows Identity Foundation (WIF) has been fully integrated into the .NET Framework and the classes exposed by WIF are the preferred method of handling security tokens in your code. In WIF, security tokens are serialized and deserialized to and from their XML representation and are validated by using classes derived from the base class. Validating a token involves not just ensuring that the token is valid, but also returning a instance from the token that can be used in making authentication and authorization decisions. The is constructed by the token handler's implementation of the method from the claims contained in the token as well as from claims that are intrinsic to the token type itself. WIF ships with support for the following types of security tokens: @@ -168,7 +168,7 @@ method to determine whether a security token can create a specific key identifier. To create the key identifier call the method. + Use the method to determine whether a security token can create a specific key identifier. To create the key identifier call the method. The default implementation supports key identifier clauses of type . @@ -218,7 +218,7 @@ method to determine whether a security token can create a specific key identifier. To create the key identifier call the method. + Use the method to determine whether a security token can create a specific key identifier. To create the key identifier call the method. The default implementation supports key identifier clauses of type . If a key identifier clause of type cannot be created, a is thrown. @@ -355,9 +355,9 @@ method calls the to first determine whether the specified key identifier clause is the same as this instance. + The method calls the to first determine whether the specified key identifier clause is the same as this instance. - The default implementation returns the first element of the collection if the collection is not empty and if returns `true`; otherwise, it returns `null`. + The default implementation returns the first element of the collection if the collection is not empty and if returns `true`; otherwise, it returns `null`. ]]> diff --git a/xml/System.IdentityModel.Tokens/SecurityTokenElement.xml b/xml/System.IdentityModel.Tokens/SecurityTokenElement.xml index 8942b59c43b..47bad8f0b4c 100644 --- a/xml/System.IdentityModel.Tokens/SecurityTokenElement.xml +++ b/xml/System.IdentityModel.Tokens/SecurityTokenElement.xml @@ -56,7 +56,7 @@ method is not supported by the new instance unless the method is overridden. + When this constructor is used, the method is not supported by the new instance unless the method is overridden. If the `securityToken` parameter is an instance of then the property is set to the value of the property. @@ -132,7 +132,7 @@ object by using the constructor, then the method is called to return the security token. + If the current instance was not constructed explicitly from a object by using the constructor, then the method is called to return the security token. ]]> @@ -187,7 +187,7 @@ constructor. + This property is `null` unless the current instance was initialized by using the constructor. ]]> diff --git a/xml/System.IdentityModel.Tokens/SecurityTokenHandler.xml b/xml/System.IdentityModel.Tokens/SecurityTokenHandler.xml index 73fec4746c1..ab21165ed24 100644 --- a/xml/System.IdentityModel.Tokens/SecurityTokenHandler.xml +++ b/xml/System.IdentityModel.Tokens/SecurityTokenHandler.xml @@ -61,27 +61,27 @@ Most of these classes expose additional members that implement functionality that is specific to the processing of the tokens for which the class is designed. In many cases it may be better to derive from one of these classes rather than directly from the class. - A security token handler can be added or removed from a token handler collection by specifying the [<add>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/add), [<remove>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/remove), or [<clear>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/clear) elements under the [<securityTokenHandlers>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/securitytokenhandlers) element in a configuration file. The object that contains the configuration settings for the handler collection can be accessed through the property and the handler collection that the token handler is a member of can be accessed from the property. You can override the method to process any custom configuration elements that your handler takes. + A security token handler can be added or removed from a token handler collection by specifying the [<add>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/add), [<remove>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/remove), or [<clear>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/clear) elements under the [<securityTokenHandlers>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/securitytokenhandlers) element in a configuration file. The object that contains the configuration settings for the handler collection can be accessed through the property and the handler collection that the token handler is a member of can be accessed from the property. You can override the method to process any custom configuration elements that your handler takes. The class exposes several other properties and methods. Depending on the functionality that you choose to implement, you may override some or all of these members. - You must override the property and the method to provide the WIF infrastructure with information about the type of security token that your class is designed to process. + You must override the property and the method to provide the WIF infrastructure with information about the type of security token that your class is designed to process. Validation, serialization, and deserialization functionality is exposed through properties or methods that indicate whether the handler can perform a specific function combined with the method or methods that implement the functionality. The following list pairs the properties or methods that indicate functionality with the methods that implement that functionality: -- The property and the method: Validates a token and packages the claims contained in the token into a . +- The property and the method: Validates a token and packages the claims contained in the token into a . -- The property and the methods: Token serialization. +- The property and the methods: Token serialization. -- The methods and the methods: Token deserialization. +- The methods and the methods: Token deserialization. -- The method and the method: Deserializing key identifier clauses. +- The method and the method: Deserializing key identifier clauses. -- The method and the method: Serializing key identifier clauses. +- The method and the method: Serializing key identifier clauses. - The and the methods are called from the pipeline in implementations of the class. + The and the methods are called from the pipeline in implementations of the class. - The method is called by the WIF infrastructure to determine whether the specified token has already been received. By default this method returns `false`, which indicates that the token has not already been received. You can override the method and provide logic to detect replayed tokens. + The method is called by the WIF infrastructure to determine whether the specified token has already been received. By default this method returns `false`, which indicates that the token has not already been received. You can override the method and provide logic to detect replayed tokens. @@ -158,7 +158,7 @@ ## Remarks The default implementation returns `false` to indicate that the key identifier clause cannot be read. - A derived class checks the element that the reader is referring to in order to determine whether the instance can deserialize a key identifier clause. This is typically accomplished through a call to the method with the appropriate element and namespace strings specified. If you override , you must also override the method to provide the logic to deserialize the key identifier clause. + A derived class checks the element that the reader is referring to in order to determine whether the instance can deserialize a key identifier clause. This is typically accomplished through a call to the method with the appropriate element and namespace strings specified. If you override , you must also override the method to provide the logic to deserialize the key identifier clause. ]]> @@ -202,7 +202,7 @@ ## Remarks The default implementation always returns `false`. - If you override this method, you must also override the method to provide the logic to deserialize the token. + If you override this method, you must also override the method to provide the logic to deserialize the token. ]]> @@ -237,12 +237,12 @@ ## Remarks The default implementation always returns `false`. - A derived class checks the element that the reader is referring to in order to determine whether the instance can deserialize a security token. This is typically accomplished through a call to the method with the appropriate element and namespace strings specified. If you override , you must also override the method or the method to provide the logic to deserialize the key identifier clause. + A derived class checks the element that the reader is referring to in order to determine whether the instance can deserialize a security token. This is typically accomplished through a call to the method with the appropriate element and namespace strings specified. If you override , you must also override the method or the method to provide the logic to deserialize the key identifier clause. ## Examples - The following code shows how to override the method to determine whether a token can be read by a handler. The code is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). + The following code shows how to override the method to determine whether a token can be read by a handler. The code is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet1"::: @@ -273,7 +273,7 @@ method to implement the validation logic. + To implement validation in a derived class, override this property to return `true` and override the method to implement the validation logic. @@ -315,7 +315,7 @@ ## Remarks The default implementation always returns `false`. - If you override , you must also override the method to provide the logic to serialize the key identifier clause. + If you override , you must also override the method to provide the logic to serialize the key identifier clause. ]]> @@ -344,7 +344,7 @@ methods to implement the serialization logic. + To implement serialization in a derived class, override this property to return `true` and override the methods to implement the serialization logic. @@ -381,7 +381,7 @@ ## Remarks The property is typically set by the configuration infrastructure from the [<securityTokenHandlerConfiguration>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/securitytokenhandlerconfiguration) element in the configuration file during application start up. - In derived classes, you use the property to access configuration settings; for example, the issuer name registry to use in the method can be accessed from the property of the configuration object. + In derived classes, you use the property to access configuration settings; for example, the issuer name registry to use in the method can be accessed from the property of the configuration object. ]]> @@ -455,7 +455,7 @@ ## Examples - The following code shows how to override the method to create a key identifier clause from the specified token. The code is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). + The following code shows how to override the method to create a key identifier clause from the specified token. The code is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet5"::: @@ -496,7 +496,7 @@ ## Examples - The following code shows how to override the method to create and return a token from a token descriptor. The code is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). + The following code shows how to override the method to create and return a token from a token descriptor. The code is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet4"::: @@ -533,7 +533,7 @@ Derived classes should throw a if the token has already been used. - Windows Identity Foundation (WIF) provides the class from which replay caches may be derived and the [<tokenReplayCache>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/tokenreplaycache) configuration element, which can be used to configure the replay cache used by token handlers in an application; however, the exact implementation of the method is up to the designer of the derived class. + Windows Identity Foundation (WIF) provides the class from which replay caches may be derived and the [<tokenReplayCache>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/tokenreplaycache) configuration element, which can be used to configure the replay cache used by token handlers in an application; however, the exact implementation of the method is up to the designer of the derived class. ]]> @@ -562,12 +562,12 @@ of the token processed by the current instance is accessed through the property. The method returns the set of acceptable identifiers that can be used in messages to refer to the token type. For example, the URI value used in the `` element under the `` element to request a specific kind of token (represented by the property in the object model). + The of the token processed by the current instance is accessed through the property. The method returns the set of acceptable identifiers that can be used in messages to refer to the token type. For example, the URI value used in the `` element under the `` element to request a specific kind of token (represented by the property in the object model). ## Examples - The following code shows how to override the method to return the token type identifiers for a custom token. The code is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). + The following code shows how to override the method to return the token type identifiers for a custom token. The code is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet17"::: :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet6"::: @@ -604,7 +604,7 @@ method is called by the configuration infrastructure. When this method is called, the `nodelist` will contain the top-level child elements of the token handler's [<add>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/add) element from the configuration file. Each of these may, in turn, contain attributes or child elements depending on the configuration schema you define for your derived class. + The method is called by the configuration infrastructure. When this method is called, the `nodelist` will contain the top-level child elements of the token handler's [<add>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/add) element from the configuration file. Each of these may, in turn, contain attributes or child elements depending on the configuration schema you define for your derived class. The default implementation throws a . Override this method in your derived class to enable initialization of your security token handler from a configuration file. @@ -640,7 +640,7 @@ ## Remarks By default this method throws a exception. - Override this method to provide the logic to deserialize a key identifier clause from XML. If you override this method, you should also override the method. + Override this method to provide the logic to deserialize a key identifier clause from XML. If you override this method, you should also override the method. ]]> @@ -686,7 +686,7 @@ By default this method throws a exception. - Override this method to provide functionality that can deserialize a security token from a string. If you override, this method, you should also override the method. + Override this method to provide functionality that can deserialize a security token from a string. If you override, this method, you should also override the method. ]]> @@ -723,12 +723,12 @@ By default this method throws a exception. - Override this method to provide the logic to deserialize a security token from XML. If you override this method, you should also override the method. Typically, in derived classes, if the method cannot deserialize the token from the referenced XML, it throws an . + Override this method to provide the logic to deserialize a security token from XML. If you override this method, you should also override the method. Typically, in derived classes, if the method cannot deserialize the token from the referenced XML, it throws an . ## Examples - The following code shows how to override the method to read a custom token from the specified XML reader. The code is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). + The following code shows how to override the method to read a custom token from the specified XML reader. The code is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet7"::: :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet8"::: @@ -769,9 +769,9 @@ [!INCLUDE [untrusted-data-method-note](~/includes/untrusted-data-method-note.md)] - The default implementation ignores the `tokenResolver` parameter and delegates the call to the method. + The default implementation ignores the `tokenResolver` parameter and delegates the call to the method. - Override this method to provide the logic to deserialize a security token from XML. If you override this method, you should also override the method. Typically, in derived classes, if the method cannot deserialize the token from the referenced XML, it throws an . + Override this method to provide the logic to deserialize a security token from XML. If you override this method, you should also override the method. Typically, in derived classes, if the method cannot deserialize the token from the referenced XML, it throws an . ]]> @@ -839,7 +839,7 @@ method when validation of the token fails. + This method should be called from the method when validation of the token fails. ]]> @@ -870,7 +870,7 @@ method after the token has been successfully validated. + This method should be called from the method after the token has been successfully validated. ]]> @@ -904,29 +904,29 @@ ## Remarks By default this method throws a exception. - The method is called by the infrastructure to validate and extract the claims from the deserialized security token. These claims are returned in the collection of objects returned by the method. In the typical case, this collection will contain a single identity. + The method is called by the infrastructure to validate and extract the claims from the deserialized security token. These claims are returned in the collection of objects returned by the method. In the typical case, this collection will contain a single identity. In derived classes, validation typically includes validating the intended audience specified in the token against the audience URIs specified in the property of the token handler configuration object specified on the property. These URIs are typically set in the configuration file under the [<audienceUris>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/audienceuris) element. If the audience cannot be validated, an exception should be thrown. - When processing the token, the issuer is typically validated by passing the issuer token to one of the methods on the object that is configured for the handler through the property. The issuer name registry is typically configured through the [<issuerNameRegistry>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/issuernameregistry) element in the configuration file. The returns the name of the issuer. This name should be used to set the property in claims contained in the token. If the issuer name registry does not contain an entry for the issuer token, returns `null`. In this case a is typically thrown in derived classes, but this behavior is up to the designer of the class. + When processing the token, the issuer is typically validated by passing the issuer token to one of the methods on the object that is configured for the handler through the property. The issuer name registry is typically configured through the [<issuerNameRegistry>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/issuernameregistry) element in the configuration file. The returns the name of the issuer. This name should be used to set the property in claims contained in the token. If the issuer name registry does not contain an entry for the issuer token, returns `null`. In this case a is typically thrown in derived classes, but this behavior is up to the designer of the class. ## Examples - The following code shows an override of the method for a security token handler that processes simple web tokens (SWT). The code is taken from the `CustomToken` sample. For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). + The following code shows an override of the method for a security token handler that processes simple web tokens (SWT). The code is taken from the `CustomToken` sample. For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet9"::: - The following code shows `CreateClaims` method that is invoked from the override of the method in the previous example. This method returns a object that is created from the claims in the token. The code is taken from the `CustomToken` sample. For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). + The following code shows `CreateClaims` method that is invoked from the override of the method in the previous example. This method returns a object that is created from the claims in the token. The code is taken from the `CustomToken` sample. For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet15"::: - The following code shows `ValidateSignature` method that is invoked from the override of the method in the simple web token handler. This method validates the signature on the token by using the configured . The code is taken from the `CustomToken` sample. For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). + The following code shows `ValidateSignature` method that is invoked from the override of the method in the simple web token handler. This method validates the signature on the token by using the configured . The code is taken from the `CustomToken` sample. For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet11"::: - The following code shows `ValidateAudience` method that is invoked from the override of the method in the simple web token handler. This method validates the audience contained in the token against the audience URIs that were specified in configuration. The code is taken from the `CustomToken` sample. For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). + The following code shows `ValidateAudience` method that is invoked from the override of the method in the simple web token handler. This method validates the audience contained in the token against the audience URIs that were specified in configuration. The code is taken from the `CustomToken` sample. For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet13"::: @@ -963,7 +963,7 @@ ## Remarks By default this method throws a exception. - Override this method to provide the logic to serialize a key identifier clause to XML. If you override this method, you should also override the method. + Override this method to provide the logic to serialize a key identifier clause to XML. If you override this method, you should also override the method. ]]> @@ -1046,7 +1046,7 @@ ## Examples - The following code shows how to override the method to serialize a custom token. The code is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). + The following code shows how to override the method to serialize a custom token. The code is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT). For information about this sample and other samples available for WIF and where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet10"::: :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Tokens/SecurityTokenHandler/CanReadToken/simplewebtokenhandler.cs" id="Snippet11"::: diff --git a/xml/System.IdentityModel.Tokens/SecurityTokenHandlerCollection.xml b/xml/System.IdentityModel.Tokens/SecurityTokenHandlerCollection.xml index fefdc0d9931..9357d3d86b9 100644 --- a/xml/System.IdentityModel.Tokens/SecurityTokenHandlerCollection.xml +++ b/xml/System.IdentityModel.Tokens/SecurityTokenHandlerCollection.xml @@ -45,11 +45,11 @@ Initializes a new instance of the class. - @@ -73,11 +73,11 @@ The token handlers with which to initialize the new instance. Initializes a new instance of the class with the specified token handlers. - class, use the **Clone** method instead. - + class, use the **Clone** method instead. + ]]> @@ -101,11 +101,11 @@ The base configuration to associate with the collection. Initializes a new instance of the class with the specified configuration. - @@ -131,11 +131,11 @@ The base configuration to associate with the collection. Initializes a new instance of the class with the specified token handlers and configuration. - class, use the **Clone** method instead. - + class, use the **Clone** method instead. + ]]> @@ -249,11 +249,11 @@ if the collection contains a token handler that can read the specified token; otherwise . - method on the token handlers () in the collection to determine whether the token can be read. - + method on the token handlers () in the collection to determine whether the token can be read. + ]]> @@ -885,10 +885,10 @@ Serializes the specified security token to XML. To be added. - is . - - -or- - + is . + + -or- + is . The collection does not contain a handler capable of serializing the specified token. diff --git a/xml/System.IdentityModel.Tokens/SecurityTokenValidationException.xml b/xml/System.IdentityModel.Tokens/SecurityTokenValidationException.xml index 6f206ca8234..0d796edbd20 100644 --- a/xml/System.IdentityModel.Tokens/SecurityTokenValidationException.xml +++ b/xml/System.IdentityModel.Tokens/SecurityTokenValidationException.xml @@ -40,11 +40,11 @@ The exception that is thrown when a received security token is invalid. - is typically thrown by the method. - + is typically thrown by the method. + ]]> diff --git a/xml/System.IdentityModel.Tokens/SessionSecurityToken.xml b/xml/System.IdentityModel.Tokens/SessionSecurityToken.xml index 591f8a74a44..a34b463eb75 100644 --- a/xml/System.IdentityModel.Tokens/SessionSecurityToken.xml +++ b/xml/System.IdentityModel.Tokens/SessionSecurityToken.xml @@ -649,7 +649,7 @@ The class uses both the context ID and the key generation to generate a key for the token in the . - The class serializes this property as the `` child element of the `` element. For more information, see the documentation for the method. + The class serializes this property as the `` child element of the `` element. For more information, see the documentation for the method. ]]> @@ -737,7 +737,7 @@ class serializes this property as the `Id` attribute of the `` element. For more information, see the documentation for the method. + The class serializes this property as the `Id` attribute of the `` element. For more information, see the documentation for the method. ]]> @@ -875,7 +875,7 @@ The class uses both the context ID and the key generation to generate a key for the token in the . - The class serializes this property as the `` child element of the `` element. For more information, see the documentation for the method. + The class serializes this property as the `` child element of the `` element. For more information, see the documentation for the method. ]]> diff --git a/xml/System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.xml b/xml/System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.xml index 1d969d14312..2dec1c63490 100644 --- a/xml/System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.xml +++ b/xml/System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.xml @@ -193,7 +193,7 @@ property is treated by the following methods and operators: , , , , and . + This property affects the manner in which the property is treated by the following methods and operators: , , , , and . ]]> diff --git a/xml/System.IdentityModel.Tokens/SessionSecurityTokenHandler.xml b/xml/System.IdentityModel.Tokens/SessionSecurityTokenHandler.xml index 20cc557e23a..405ebf1f430 100644 --- a/xml/System.IdentityModel.Tokens/SessionSecurityTokenHandler.xml +++ b/xml/System.IdentityModel.Tokens/SessionSecurityTokenHandler.xml @@ -26,9 +26,9 @@ > [!NOTE] > The \ configuration element can be used to specify a that has the responsibility for securing the application's sessions. Developers should use caution when changing this configuration setting, as a misconfigured system could result in application compromise. For example, specifying a derived and passing an empty Transforms (CookieTransform) collection to the base, would result in the users identity being serialized into a cookie that was not protected. This could allow an attacker to modify the identity and therefore change access privileges. - If the session token is in reference mode, that is, its property is `true`, the session token handler only serializes properties of the session token that are needed to regenerate its key in the . In the default case, the class is used to represent cache keys, and the token handler writes the and properties of the token. If the session token is not in reference mode, that is, the property is `false`, then, in addition to the properties mentioned previously, the handler invokes the method on a byte array serialized from the token and stores the resulting value in the cookie as well. For more details about how the token is serialized, see the method. + If the session token is in reference mode, that is, its property is `true`, the session token handler only serializes properties of the session token that are needed to regenerate its key in the . In the default case, the class is used to represent cache keys, and the token handler writes the and properties of the token. If the session token is not in reference mode, that is, the property is `false`, then, in addition to the properties mentioned previously, the handler invokes the method on a byte array serialized from the token and stores the resulting value in the cookie as well. For more details about how the token is serialized, see the method. - The property gets the list of transforms that are applied to the session token in the method. All transforms derive from the class. In the default case the and the are applied. The uses the Data Protection API (DPAPI) to protect the cookie material. DPAPI uses a key that is specific to the computer on which it is running in its protection algorithms. For this reason, the default session token handler is not usable in Web farm scenarios because, in such scenarios, tokens written on one computer may need to be read on another computer. You can use many strategies to circumvent this issue. For example, you can: + The property gets the list of transforms that are applied to the session token in the method. All transforms derive from the class. In the default case the and the are applied. The uses the Data Protection API (DPAPI) to protect the cookie material. DPAPI uses a key that is specific to the computer on which it is running in its protection algorithms. For this reason, the default session token handler is not usable in Web farm scenarios because, in such scenarios, tokens written on one computer may need to be read on another computer. You can use many strategies to circumvent this issue. For example, you can: - Replace the default with the . The enables you to specify signing and encryption keys under the ASP.NET `` element in the configuration file. @@ -40,7 +40,7 @@ For more information about using sessions in Web farm scenarios, see [WIF and Web Farms](/dotnet/framework/security/wif-and-web-farms). - The is included in the default token handler collection; however, you can replace it with a custom session token handler by first specifying a [<remove>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/remove) element under the [<securityTokenHandlers>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/securitytokenhandlers) element to remove the default handler from the collection and then adding your custom token handler using the [<add>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/add) element. By default, you can specify the default token lifetime by including the [<sessionTokenRequirement>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/sessiontokenrequirement) element under the `` element. You can design a custom token handler to take custom configuration elements under the `` element by overriding the method to provide the logic to process them. + The is included in the default token handler collection; however, you can replace it with a custom session token handler by first specifying a [<remove>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/remove) element under the [<securityTokenHandlers>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/securitytokenhandlers) element to remove the default handler from the collection and then adding your custom token handler using the [<add>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/add) element. By default, you can specify the default token lifetime by including the [<sessionTokenRequirement>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/sessiontokenrequirement) element under the `` element. You can design a custom token handler to take custom configuration elements under the `` element by overriding the method to provide the logic to process them. @@ -186,7 +186,7 @@ ## Remarks When encoding a cookie transforms are applied in the order in which they appear in the property. When decoding a cookie, they are applied in the reverse order. - Called from the and methods to encode and decode the cookie material. + Called from the and methods to encode and decode the cookie material. ]]> @@ -287,7 +287,7 @@ and methods to determine the element under which the encoded token material should be written or read. + This property is used in the and methods to determine the element under which the encoded token material should be written or read. ]]> @@ -318,7 +318,7 @@ and methods to determine the namespace of the element under which the encoded token material should be written or read. + This property is used in the and methods to determine the namespace of the element under which the encoded token material should be written or read. ]]> @@ -389,7 +389,7 @@ , and . If the property is set `true` on the token handler configuration specified by the property, the bootstrap context is created from the property and is saved in the session token. + Creates and returns a session security token by using the following properties in the token descriptor: , and . If the property is set `true` on the token handler configuration specified by the property, the bootstrap context is created from the property and is saved in the session token. ]]> @@ -578,7 +578,7 @@ The reader must be positioned at either a WS-Secure Conversation Feb2005 or a WS-Secure Conversation 1.3 `` element. - The default implementation invokes the method using a default token resolver. + The default implementation invokes the method using a default token resolver. ]]> @@ -618,7 +618,7 @@ [!INCLUDE [untrusted-data-method-note](~/includes/untrusted-data-method-note.md)] - The default implementation creates an over the token and invokes the method. + The default implementation creates an over the token and invokes the method. ]]> @@ -657,9 +657,9 @@ The reader must be positioned at either a WS-Secure Conversation Feb2005 or a WS-Secure Conversation 1.3 `` element. - If the token material is cached, it is read from the token cache, which is an instance of the class. Otherwise, the token material is read from the child element of the `` element that is specified by the and properties and the method is invoked to decode the cookie. + If the token material is cached, it is read from the token cache, which is an instance of the class. Otherwise, the token material is read from the child element of the `` element that is specified by the and properties and the method is invoked to decode the cookie. - For more information about how session tokens are serialized into a ` method. + For more information about how session tokens are serialized into a ` method. ]]> @@ -700,7 +700,7 @@ Sets the list of transforms returned by the property. Transforms will be applied in the order in which they appear in the list when encoding a cookie and in the reverse order when decoding a cookie. > [!WARNING] -> If the `transforms` parameter is `null`, an exception will be thrown from the method when it is called to encode or decode the cookie. +> If the `transforms` parameter is `null`, an exception will be thrown from the method when it is called to encode or decode the cookie. ]]> @@ -728,7 +728,7 @@ property is initialized to the value of the `lifetime` attribute by the method. + By default, if the [<sessionTokenRequirement>](/dotnet/framework/configure-apps/file-schema/windows-identity-foundation/sessiontokenrequirement) element is specified in the configuration file, the property is initialized to the value of the `lifetime` attribute by the method. ]]> @@ -779,7 +779,7 @@ method. + The transforms are applied in the method. ]]> @@ -812,7 +812,7 @@ ## Remarks The token is not valid if its property is set to a value that occurs later than , or if its property is set to a value that occurs earlier than . - Called from the methods to validate the session. + Called from the methods to validate the session. ]]> @@ -859,7 +859,7 @@ method to validate the token. + Invokes the method to validate the token. ]]> @@ -899,7 +899,7 @@ method; otherwise, throws a . + Performs a check to make sure that the specified token is scoped for the specified endpoint ID and, if so, invokes the method; otherwise, throws a . > [!IMPORTANT] > Session tokens that have an property that is `null` or empty are considered to be globally scoped. This presents a potential security risk. For this reason you should make sure that the property is set in your session tokens. @@ -962,7 +962,7 @@ and invoking the method. See that overload for more details. + Serializes the specified token by creating and XML writer over a and invoking the method. See that overload for more details. ]]> @@ -998,7 +998,7 @@ ` element, depending on the value of the property. The property is serialized as the `Id` attribute. The property is serialized as the `` child element. If not `null` the property is serialized as an `` element. Finally, if the property is `false`, the entire token is serialized into binary array which is passed to the method to be encoded. The encoded token is then written as a base64 encoded value to the element and namespace specified by the and properties. If the property is `true`, the token is not serialized. + The default implementation serializes the specified token as either a WS-Secure Conversation Feb2005 or WS-Secure Conversation 1.3 `` element, depending on the value of the property. The property is serialized as the `Id` attribute. The property is serialized as the `` child element. If not `null` the property is serialized as an `` element. Finally, if the property is `false`, the entire token is serialized into binary array which is passed to the method to be encoded. The encoded token is then written as a base64 encoded value to the element and namespace specified by the and properties. If the property is `true`, the token is not serialized. ]]> diff --git a/xml/System.IdentityModel.Tokens/TokenReplayCache.xml b/xml/System.IdentityModel.Tokens/TokenReplayCache.xml index 5f2d31f1295..9397288ef00 100644 --- a/xml/System.IdentityModel.Tokens/TokenReplayCache.xml +++ b/xml/System.IdentityModel.Tokens/TokenReplayCache.xml @@ -20,11 +20,11 @@ The abstract base class that defines methods for a cache used to detect replayed tokens. - method associates a security token with a key and an expiration time. The can be used to search the cache for the token or to remove the token from the cache. The expiration time indicates the time at which the token should be purged from the cache. - + method associates a security token with a key and an expiration time. The can be used to search the cache for the token or to remove the token from the cache. The expiration time indicates the time at which the token should be purged from the cache. + ]]> @@ -150,11 +150,11 @@ The custom configuration XML elements. When overridden in a derived class, loads custom configuration from the specified XML. - - + + ]]> diff --git a/xml/System.IdentityModel.Tokens/WindowsSecurityToken.xml b/xml/System.IdentityModel.Tokens/WindowsSecurityToken.xml index 51503667fb8..130c0d72d30 100644 --- a/xml/System.IdentityModel.Tokens/WindowsSecurityToken.xml +++ b/xml/System.IdentityModel.Tokens/WindowsSecurityToken.xml @@ -136,7 +136,7 @@ method to initialize the properties of this class. + This constructor calls the method to initialize the properties of this class. ]]> @@ -232,10 +232,10 @@ method when you are finished using the . The method leaves the in an unusable state. After calling the method, you must release all references to the so the garbage collector can reclaim the memory that the was occupying. + Call the method when you are finished using the . The method leaves the in an unusable state. After calling the method, you must release all references to the so the garbage collector can reclaim the memory that the was occupying. > [!NOTE] -> Always call the method before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. +> Always call the method before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. ]]> @@ -315,7 +315,7 @@ method is called by the constructors for the class. + The method is called by the constructors for the class. ]]> diff --git a/xml/System.IdentityModel.Tokens/X509AsymmetricSecurityKey.xml b/xml/System.IdentityModel.Tokens/X509AsymmetricSecurityKey.xml index f8e62e74f5b..cd357ee18e1 100644 --- a/xml/System.IdentityModel.Tokens/X509AsymmetricSecurityKey.xml +++ b/xml/System.IdentityModel.Tokens/X509AsymmetricSecurityKey.xml @@ -484,7 +484,7 @@ method returns `true` when one of the following is true: + The method returns `true` when one of the following is true: - The `algorithm` parameter is and the public key for the X.509 certificate specified in the constructor is of type . diff --git a/xml/System.IdentityModel.Tokens/X509DataSecurityKeyIdentifierClauseSerializer.xml b/xml/System.IdentityModel.Tokens/X509DataSecurityKeyIdentifierClauseSerializer.xml index 3cd21414c7b..0d9d3fc3aca 100644 --- a/xml/System.IdentityModel.Tokens/X509DataSecurityKeyIdentifierClauseSerializer.xml +++ b/xml/System.IdentityModel.Tokens/X509DataSecurityKeyIdentifierClauseSerializer.xml @@ -87,17 +87,17 @@ if the key identifier clause is supported by this handler; otherwise, . - - -2. - -3. - + + +2. + +3. + ]]> @@ -127,11 +127,11 @@ Deserializes a key identifier clause from XML by using the specified XML reader. The key identifier clause that was deserialized from the XML or if a key identifier clause could not be read. - method reads ``, ``, and `` elements and returns the first one found as a , a , or a . If one of these elements is not found under the `` element, the method returns `null`. - + method reads ``, ``, and `` elements and returns the first one found as a , a , or a . If one of these elements is not found under the `` element, the method returns `null`. + ]]> @@ -164,24 +164,24 @@ The key identifier clause to serialize. Serializes the specified key identifier clause. - - -2. - -3. - + + +2. + +3. + ]]> - is . - - -or- - + is . + + -or- + is . is not a supported clause type. diff --git a/xml/System.IdentityModel.Tokens/X509IssuerSerialKeyIdentifierClause.xml b/xml/System.IdentityModel.Tokens/X509IssuerSerialKeyIdentifierClause.xml index 61d194c122b..445438fdb89 100644 --- a/xml/System.IdentityModel.Tokens/X509IssuerSerialKeyIdentifierClause.xml +++ b/xml/System.IdentityModel.Tokens/X509IssuerSerialKeyIdentifierClause.xml @@ -86,7 +86,7 @@ and to the value of the property and the issuer serial number returned from the method, respectively. + This constructor sets the and to the value of the property and the issuer serial number returned from the method, respectively. ]]> @@ -302,7 +302,7 @@ property and calling the method, respectively. + The issuer name and issuer serial number are obtained from the `certificate` parameter, by getting the value of the property and calling the method, respectively. ]]> @@ -377,7 +377,7 @@ method returns the values of the and properties. + The method returns the values of the and properties. ]]> diff --git a/xml/System.IdentityModel.Tokens/X509RawDataKeyIdentifierClause.xml b/xml/System.IdentityModel.Tokens/X509RawDataKeyIdentifierClause.xml index 204f7ade9c2..ca24dfaf6a4 100644 --- a/xml/System.IdentityModel.Tokens/X509RawDataKeyIdentifierClause.xml +++ b/xml/System.IdentityModel.Tokens/X509RawDataKeyIdentifierClause.xml @@ -27,21 +27,21 @@ Represents a key identifier clause that identifies a security token using the X.509 certificate's raw data. - does not need to be used, other than when a custom security token service is created. When a security token service returns a security token, the issued security token contains references to attached and unattached security tokens. Attached references refer to security tokens that are contained within the security header of a SOAP message and unattached references are security tokens that are not included within the security header of a SOAP message. These references typically affirm the authenticity of the issued security token. Use the class to reference a security token using the X.509 certificate's raw data. The method returns the raw data. - - Windows Communication Foundation (WCF) supports the following types of security token references for security tokens. - -- - -- - -- - - - + does not need to be used, other than when a custom security token service is created. When a security token service returns a security token, the issued security token contains references to attached and unattached security tokens. Attached references refer to security tokens that are contained within the security header of a SOAP message and unattached references are security tokens that are not included within the security header of a SOAP message. These references typically affirm the authenticity of the issued security token. Use the class to reference a security token using the X.509 certificate's raw data. The method returns the raw data. + + Windows Communication Foundation (WCF) supports the following types of security token references for security tokens. + +- + +- + +- + + + ]]> @@ -117,11 +117,11 @@ An that contains the X.509 certificate. Initializes a new instance of the class using the specified X.509 certificate. - method. - + method. + ]]> @@ -157,11 +157,11 @@ in all cases. - method. - + method. + ]]> @@ -261,11 +261,11 @@ if has the raw data that matches the current instance; otherwise, . - method calls the method for the `certificate` and then compares that to the current instance. - + method calls the method for the `certificate` and then compares that to the current instance. + ]]> @@ -301,11 +301,11 @@ Returns the current object. A that represents the current object. - method returns the raw data that is Base-64 encoded. - + method returns the raw data that is Base-64 encoded. + ]]> diff --git a/xml/System.IdentityModel.Tokens/X509SecurityToken.xml b/xml/System.IdentityModel.Tokens/X509SecurityToken.xml index a4a835bcb4c..b439e473b55 100644 --- a/xml/System.IdentityModel.Tokens/X509SecurityToken.xml +++ b/xml/System.IdentityModel.Tokens/X509SecurityToken.xml @@ -249,7 +249,7 @@ method is one of the key identifier clause types that an X.509 certificate key identifier can be expressed in. The possible return types are represented by the , , , and classes. + The return value for the method is one of the key identifier clause types that an X.509 certificate key identifier can be expressed in. The possible return types are represented by the , , , and classes. ]]> @@ -289,10 +289,10 @@ method when you are finished using the . The method leaves the in an unusable state. After calling the method, you must release all references to the so the garbage collector can reclaim the memory that the was occupying. + Call the method when you are finished using the . The method leaves the in an unusable state. After calling the method, you must release all references to the so the garbage collector can reclaim the memory that the was occupying. > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. ]]> @@ -360,14 +360,14 @@ method matches criteria in the X.509 certificate in the property based on the type of the `keyIdentifierClause` parameter. The following table details what is matched. + The method matches criteria in the X.509 certificate in the property based on the type of the `keyIdentifierClause` parameter. The following table details what is matched. |Key identifier clause type|What is matched| |--------------------------------|---------------------| -||The value of the property and the issuer serial number returned from the method.| -||The data returned from the method.| +||The value of the property and the issuer serial number returned from the method.| +||The data returned from the method.| ||The subject key identifier extension in the property is matched.| -||The thumbprint that is returned by the method.| +||The thumbprint that is returned by the method.| ]]> diff --git a/xml/System.IdentityModel.Tokens/X509SubjectKeyIdentifierClause.xml b/xml/System.IdentityModel.Tokens/X509SubjectKeyIdentifierClause.xml index cdeeab60ce5..2cc07a0b3af 100644 --- a/xml/System.IdentityModel.Tokens/X509SubjectKeyIdentifierClause.xml +++ b/xml/System.IdentityModel.Tokens/X509SubjectKeyIdentifierClause.xml @@ -27,21 +27,21 @@ Represents a key identifier clause that identifies a security token using the X.509 certificate's subject key identifier extension. - does not need to be used, other than when a custom security token service is created. When a security token service returns a security token, the issued security token contains references to attached and unattached security tokens. Attached references refer to security tokens that are contained within the security header of a SOAP message and unattached references are security tokens that are not included within the security header of a SOAP message. These references typically affirm the authenticity of the issued security token. Use the class to reference a security token using the X.509 certificate's subject key identifier extension. The method returns the subject key identifier extension. - - Windows Communication Foundation supports the following types of security token references for security tokens. - -- - -- - -- - - - + does not need to be used, other than when a custom security token service is created. When a security token service returns a security token, the issued security token contains references to attached and unattached security tokens. Attached references refer to security tokens that are contained within the security header of a SOAP message and unattached references are security tokens that are not included within the security header of a SOAP message. These references typically affirm the authenticity of the issued security token. Use the class to reference a security token using the X.509 certificate's subject key identifier extension. The method returns the subject key identifier extension. + + Windows Communication Foundation supports the following types of security token references for security tokens. + +- + +- + +- + + + ]]> @@ -111,11 +111,11 @@ if a key identifier clause can be created for ; otherwise, . - extension. - + extension. + ]]> @@ -186,11 +186,11 @@ if has the same subject key identifier as the current instance; otherwise, . - method compares the extension for the two X.509 certificates. - + method compares the extension for the two X.509 certificates. + ]]> @@ -226,11 +226,11 @@ Returns a string that represents the current object. A that represents the current object. - method returns the subject key identifier. - + method returns the subject key identifier. + ]]> @@ -270,11 +270,11 @@ when a key identifier clause can be created for the specified X.509 certificate; otherwise, . - key identifier clause can be created for the X.509 certificate when it contains a subject key identifier. - + key identifier clause can be created for the X.509 certificate when it contains a subject key identifier. + ]]> diff --git a/xml/System.IdentityModel.Tokens/X509ThumbprintKeyIdentifierClause.xml b/xml/System.IdentityModel.Tokens/X509ThumbprintKeyIdentifierClause.xml index 972c5679ef5..9157375cee6 100644 --- a/xml/System.IdentityModel.Tokens/X509ThumbprintKeyIdentifierClause.xml +++ b/xml/System.IdentityModel.Tokens/X509ThumbprintKeyIdentifierClause.xml @@ -27,21 +27,21 @@ Represents a key identifier clause that identifies a security tokens using the X.509 certificate's thumbprint. - does not need to be used, other than when a custom security token service is created. When a security token service returns a security token, the issued security token contains references to attached and unattached security tokens. Attached references refer to security tokens that are contained within the security header of a SOAP message token and unattached references reference security tokens that are not included within the security header of a SOAP message. These references typically affirm the authenticity of the issued security token. Use the class to reference a security token using the X.509 certificate's thumbprint. The method returns the thumbprint. - - Windows Communication Foundation supports the following types of security token references for security tokens. - -- - -- - -- - -- - + does not need to be used, other than when a custom security token service is created. When a security token service returns a security token, the issued security token contains references to attached and unattached security tokens. Attached references refer to security tokens that are contained within the security header of a SOAP message token and unattached references reference security tokens that are not included within the security header of a SOAP message. These references typically affirm the authenticity of the issued security token. Use the class to reference a security token using the X.509 certificate's thumbprint. The method returns the thumbprint. + + Windows Communication Foundation supports the following types of security token references for security tokens. + +- + +- + +- + +- + ]]> @@ -84,10 +84,10 @@ Initializes a new instance of the class using the specified thumbprint for an X.509 certificate. To be added. - is . - - -or- - + is . + + -or- + is zero length. @@ -119,11 +119,11 @@ An that contains the X.509 certificate. Initializes a new instance of the class using the specified X.509 certificate. - method. - + method. + ]]> @@ -225,11 +225,11 @@ Returns a string that represents the current object. A that represents the current object. - method returns the thumbprint. - + method returns the thumbprint. + ]]> diff --git a/xml/System.IdentityModel.Tokens/X509WindowsSecurityToken.xml b/xml/System.IdentityModel.Tokens/X509WindowsSecurityToken.xml index fad6ab34af0..be1aa7440c0 100644 --- a/xml/System.IdentityModel.Tokens/X509WindowsSecurityToken.xml +++ b/xml/System.IdentityModel.Tokens/X509WindowsSecurityToken.xml @@ -163,10 +163,10 @@ method when you are finished using the . The method leaves the in an unusable state. After calling the method, you must release all references to the so the garbage collector can reclaim the memory that the was occupying. + Call the method when you are finished using the . The method leaves the in an unusable state. After calling the method, you must release all references to the so the garbage collector can reclaim the memory that the was occupying. > [!NOTE] -> Always call the method before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. +> Always call the method before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. ]]> diff --git a/xml/System.IdentityModel/AsyncResult.xml b/xml/System.IdentityModel/AsyncResult.xml index 5e47b3a7eb4..fa7087b23ac 100644 --- a/xml/System.IdentityModel/AsyncResult.xml +++ b/xml/System.IdentityModel/AsyncResult.xml @@ -28,7 +28,7 @@ ## Remarks For more information see the interface. - The class derives from . + The class derives from . ]]> diff --git a/xml/System.IdentityModel/DelegatingXmlDictionaryReader.xml b/xml/System.IdentityModel/DelegatingXmlDictionaryReader.xml index f55062fb648..7d96b41bc11 100644 --- a/xml/System.IdentityModel/DelegatingXmlDictionaryReader.xml +++ b/xml/System.IdentityModel/DelegatingXmlDictionaryReader.xml @@ -19,7 +19,7 @@ property. Call the method to set the wrapped reader and initialize the property. + The reader that is wrapped can be accessed through the property. Call the method to set the wrapped reader and initialize the property. ]]> diff --git a/xml/System.IdentityModel/DelegatingXmlDictionaryWriter.xml b/xml/System.IdentityModel/DelegatingXmlDictionaryWriter.xml index 5cc8bff8e69..360ddbd516f 100644 --- a/xml/System.IdentityModel/DelegatingXmlDictionaryWriter.xml +++ b/xml/System.IdentityModel/DelegatingXmlDictionaryWriter.xml @@ -19,7 +19,7 @@ property. Call the method to set the wrapped writer and initialize the property. You can call the method to set an to which non-canonical XML will be echoed. + The writer that is wrapped can be accessed through the property. Call the method to set the wrapped writer and initialize the property. You can call the method to set an to which non-canonical XML will be echoed. ]]> diff --git a/xml/System.IdentityModel/EnvelopedSignatureReader.xml b/xml/System.IdentityModel/EnvelopedSignatureReader.xml index e534aa37734..e31c2e9ce62 100644 --- a/xml/System.IdentityModel/EnvelopedSignatureReader.xml +++ b/xml/System.IdentityModel/EnvelopedSignatureReader.xml @@ -48,25 +48,25 @@ The token serializer to be used to deserialize the of the signature. Initializes a new instance of the class by using the specified reader and security token serializer. - constructor is invoked with the following additional parameters: - -|Parameter Name|Value| -|--------------------|-----------| -|`signingTokenResolver`|`null`| -|`requireSignature`|`true`| -|`automaticallyReadSignature`|`true`| -|`resolveIntrinsicSigningKeys`|`true`| - + constructor is invoked with the following additional parameters: + +|Parameter Name|Value| +|--------------------|-----------| +|`signingTokenResolver`|`null`| +|`requireSignature`|`true`| +|`automaticallyReadSignature`|`true`| +|`resolveIntrinsicSigningKeys`|`true`| + ]]> - is . - - -or- - + is . + + -or- + is . @@ -93,24 +93,24 @@ The token resolver to be used to resolve the signing token. specifies that a default security token resolver should be used. Initializes a new instance of the class by using the specified reader, security token serializer, and token resolver. - constructor is invoked with the following additional parameters: - -|Parameter Name|Value| -|--------------------|-----------| -|`requireSignature`|`true`| -|`automaticallyReadSignature`|`true`| -|`resolveIntrinsicSigningKeys`|`true`| - + constructor is invoked with the following additional parameters: + +|Parameter Name|Value| +|--------------------|-----------| +|`requireSignature`|`true`| +|`automaticallyReadSignature`|`true`| +|`resolveIntrinsicSigningKeys`|`true`| + ]]> - is . - - -or- - + is . + + -or- + is . @@ -147,10 +147,10 @@ Initializes a new instance of the class by using the specified reader, security token serializer, token resolver, and behavior. To be added. - is . - - -or- - + is . + + -or- + is . @@ -199,11 +199,11 @@ if the next node was read successfully; if there are no more nodes. - ` element, the whole signature is read in if the `automaticallyReadSignature` parameter was specified `true` in the constructor. - + ` element, the whole signature is read in if the `automaticallyReadSignature` parameter was specified `true` in the constructor. + ]]> @@ -250,11 +250,11 @@ if the signature was successfully read; otherwise, . - ` element, invokes the method to read the signature. - + ` element, invokes the method to read the signature. + ]]> diff --git a/xml/System.IdentityModel/EnvelopedSignatureWriter.xml b/xml/System.IdentityModel/EnvelopedSignatureWriter.xml index d945c837719..e72f25951ac 100644 --- a/xml/System.IdentityModel/EnvelopedSignatureWriter.xml +++ b/xml/System.IdentityModel/EnvelopedSignatureWriter.xml @@ -16,11 +16,11 @@ Wraps a writer and generates a signature automatically when the envelope has been completely written. This class cannot be inherited. - method to indicate the location inside the envelope where the signature should be inserted. - + method to indicate the location inside the envelope where the signature should be inserted. + ]]> @@ -53,14 +53,14 @@ is or empty. - is . - - -or- - - is . - - -or- - + is . + + -or- + + is . + + -or- + is . @@ -107,11 +107,11 @@ Closes one element and pops the corresponding namespace scope. - method was explicitly called, the signature is inserted at the appropriate position inside the envelope; otherwise, it is inserted at the end of the envelope. - + method was explicitly called, the signature is inserted at the appropriate position inside the envelope; otherwise, it is inserted at the end of the envelope. + ]]> @@ -135,11 +135,11 @@ Closes one element and pops the corresponding namespace scope. - method was explicitly called, the signature is inserted at the appropriate position inside the envelope; otherwise, it is inserted at the end of the envelope. - + method was explicitly called, the signature is inserted at the appropriate position inside the envelope; otherwise, it is inserted at the end of the envelope. + ]]> diff --git a/xml/System.IdentityModel/RsaSignatureCookieTransform.xml b/xml/System.IdentityModel/RsaSignatureCookieTransform.xml index 452ba8e2543..e08d2050b3c 100644 --- a/xml/System.IdentityModel/RsaSignatureCookieTransform.xml +++ b/xml/System.IdentityModel/RsaSignatureCookieTransform.xml @@ -174,7 +174,7 @@ ## Remarks The key specified by the property must include the private key in order to sign the data. - The signed data may be verified by calling the method. + The signed data may be verified by calling the method. ]]> diff --git a/xml/System.IdentityModel/Scope.xml b/xml/System.IdentityModel/Scope.xml index 3ae635c0910..f88634e20bf 100644 --- a/xml/System.IdentityModel/Scope.xml +++ b/xml/System.IdentityModel/Scope.xml @@ -23,7 +23,7 @@ objects contain information about the address of the RP, the encrypting and signing credentials to be used with the issued security token, and whether the token itself or symmetric keys issued with the token should be encrypted. By default, both the token and symmetric keys are encrypted. You can extend the class to carry additional information about the request, such as token types accepted by the RP, default token lifetime, maximum token lifetime, algorithm suites used by the RP, and so on; however, the information encapsulated in this class should not vary for individual requests. - The token issuance pipeline is implemented in the method and this method invokes the method to get the configuration for the RST. You must implement a method in your custom STS and return a object appropriate for the RP and your STS implementation. + The token issuance pipeline is implemented in the method and this method invokes the method to get the configuration for the RST. You must implement a method in your custom STS and return a object appropriate for the RP and your STS implementation. ]]> diff --git a/xml/System.IdentityModel/SecurityTokenService.xml b/xml/System.IdentityModel/SecurityTokenService.xml index f1224693ce4..86df4595137 100644 --- a/xml/System.IdentityModel/SecurityTokenService.xml +++ b/xml/System.IdentityModel/SecurityTokenService.xml @@ -19,18 +19,18 @@ class. In your custom class you must, at a minimum, override the and methods. With these overrides, the STS created using the default implementation of all the other methods defined in the class is capable of issuing security tokens in response to security token requests (RST). That is, the Issue binding defined in the WS-Trust specification is implemented. This binding is implemented in the method. None of the other WS-Trust bindings (Renew, Cancel, and Validate) are implemented in the default case and an appropriate fault is returned to the caller if an RST that corresponds to one of these bindings is encountered. You can, of course, override the appropriate methods (, , and ) to implement these bindings in your STS. + To create an STS you must derive from the class. In your custom class you must, at a minimum, override the and methods. With these overrides, the STS created using the default implementation of all the other methods defined in the class is capable of issuing security tokens in response to security token requests (RST). That is, the Issue binding defined in the WS-Trust specification is implemented. This binding is implemented in the method. None of the other WS-Trust bindings (Renew, Cancel, and Validate) are implemented in the default case and an appropriate fault is returned to the caller if an RST that corresponds to one of these bindings is encountered. You can, of course, override the appropriate methods (, , and ) to implement these bindings in your STS. > [!IMPORTANT] > Implementing a production-ready STS entails careful planning and considerable resources to mitigate the potential security risks inherent in exposing such a service. Most developers using Windows Identity Foundation (WIF) will be developing applications that outsource identity management to an STS, rather than developing an STS itself. WIF provides a Visual Studio extension, the Identity and Access Tool for Visual Studio 2012, to help developers test solutions in the development environment. This tool includes an STS, `LocalSTS`, that you can configure to serve specific claims to the application that you are developing. For more information about the Identity and Access tool, see [Identity and Access Tool for Visual Studio 2012](/dotnet/framework/security/identity-and-access-tool-for-vs). In some scenarios, `LocalSTS` may not provide the functionality necessary to adequately test your application; for example, in a scenario that involves developing a custom token handler for use by an application. In these cases, you can derive from to create one or more simple STSs that can be deployed in your development environment and that can be used to test such features in your application. The rest of this section focuses on the methods exposed by the class that enable you to implement a simple STS and extend the token issuance pipeline. The following list provides a brief overview of the methods of primary importance to the developer for use in a test or development environment. -- The method. This method returns a object that contains information about the RP. This object is used in the rest of the token issuance pipeline and includes information about the signing and encrypting credentials to use in the response, as well as the `AppliesTo` and `ReplyTo` (if required) addresses. You must override this method. +- The method. This method returns a object that contains information about the RP. This object is used in the rest of the token issuance pipeline and includes information about the signing and encrypting credentials to use in the response, as well as the `AppliesTo` and `ReplyTo` (if required) addresses. You must override this method. -- The method. This method returns an object that contains the claims to return to the RP. You must override this method. +- The method. This method returns an object that contains the claims to return to the RP. You must override this method. -- The method. This method implements the token request pipeline, which processes an incoming security token request (RST) and returns a response (RSTR) to the caller that contains a token that can be used to authenticate with an RP. Many of the other methods defined in the class are called from this method, including the and methods. You do not have to override this method, but an understanding of the token request pipeline it implements may be helpful. +- The method. This method implements the token request pipeline, which processes an incoming security token request (RST) and returns a response (RSTR) to the caller that contains a token that can be used to authenticate with an RP. Many of the other methods defined in the class are called from this method, including the and methods. You do not have to override this method, but an understanding of the token request pipeline it implements may be helpful. An STS is configured through the class. @@ -41,7 +41,7 @@ :::code language="csharp" source="~/snippets/csharp/System.IdentityModel/SecurityTokenService/Overview/customsecuritytokenservice.cs" id="Snippet3"::: - The following code shows how to invoke a custom passive STS to process a WS-Federation request by calling the method from the code behind in the `default.aspx.cs` file. + The following code shows how to invoke a custom passive STS to process a WS-Federation request by calling the method from the code behind in the `default.aspx.cs` file. :::code language="csharp" source="~/snippets/csharp/System.IdentityModel/SecurityTokenService/Overview/default.aspx.cs" id="Snippet1"::: @@ -377,7 +377,7 @@ . + Invoked during token issuance after . ]]> @@ -604,7 +604,7 @@ method. + This method is called from the default token issuance pipeline implemented in the method. The default implementation returns the property from configuration accessed through the property. @@ -643,7 +643,7 @@ method is called from the token issuance pipeline, which is implemented by the method. It returns an that contains the claims to include in the issued security token based on the requestor of the token (the `principal` parameter), the incoming RST (the `request` parameter), and the relying party for which the token is intended (the `scope` parameter). The logic in this method is primarily concerned with answering the following questions: + The method is called from the token issuance pipeline, which is implemented by the method. It returns an that contains the claims to include in the issued security token based on the requestor of the token (the `principal` parameter), the incoming RST (the `request` parameter), and the relying party for which the token is intended (the `scope` parameter). The logic in this method is primarily concerned with answering the following questions: - **Which claim types should be included in the response based on the RP for which it is intended?** Typically this is decided on a per-RP basis from lists of claim types required for each RP or on a per-request basis by examining the property of the request. However, the logic and details for determining the claims to include in the response is completely up to your implementation. @@ -652,7 +652,7 @@ ## Examples - The code example that is used in this topic is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT) and it includes an implementation of a passive STS that is capable of serving an SWT token. For an example of how to implement an active STS, you can see the `Federation Metadata` sample. For information about these samples and other samples available for WIF and about where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). The following code shows how to override the method to return claims for your STS. In this example, the Request Security Token (RST) message is ignored and a collection of claims based on the user as authenticated at the STS is returned. + The code example that is used in this topic is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT) and it includes an implementation of a passive STS that is capable of serving an SWT token. For an example of how to implement an active STS, you can see the `Federation Metadata` sample. For information about these samples and other samples available for WIF and about where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). The following code shows how to override the method to return claims for your STS. In this example, the Request Security Token (RST) message is ignored and a collection of claims based on the user as authenticated at the STS is returned. :::code language="csharp" source="~/snippets/csharp/System.IdentityModel/SecurityTokenService/Overview/customsecuritytokenservice.cs" id="Snippet6"::: @@ -693,7 +693,7 @@ method. + This method is called from the default token issuance pipeline implemented in the method. The default implementation returns a proof descriptor or throws an appropriate exception. @@ -734,7 +734,7 @@ method. + This method is called from the method. The default implementation does the following. Returns `null` if there is no encryption token specified in the request (the property is `null`). Otherwise, if it can get the token as an , it returns credentials based on that token. If it cannot resolve the token as an , a is thrown. @@ -772,14 +772,14 @@ method is called as the last step from the token issuance pipeline, which is implemented by the method. It creates and returns the response (RSTR) by using the original incoming request (RST) and the token descriptor that was built up during previous steps in the token issuance pipeline. + The method is called as the last step from the token issuance pipeline, which is implemented by the method. It creates and returns the response (RSTR) by using the original incoming request (RST) and the token descriptor that was built up during previous steps in the token issuance pipeline. - The default implementation creates the RSTR by passing the RST specified in the request parameter to the constructor, invoking the method on the token descriptor passed into to apply its properties to the newly created RSTR, setting the property on the RSTR by using the property on the token descriptor, and finally setting the property on the RSTR according to the following table: + The default implementation creates the RSTR by passing the RST specified in the request parameter to the constructor, invoking the method on the token descriptor passed into to apply its properties to the newly created RSTR, setting the property on the RSTR by using the property on the token descriptor, and finally setting the property on the RSTR according to the following table: |`RST.ReplyTo` property| property.|`RSTR.ReplyTo` property| |----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------| |Set|Not Set|Not Set| -|Set|Set|| +|Set|Set|| |Not Set|Set|Not Set| |Not Set|Not Set|Not Set| @@ -816,7 +816,7 @@ method is called from the token issuance pipeline after the method and should return a object configured for the incoming request. (The token issuance pipeline is implemented in the method.) The object encapsulates information about the RP associated with the security token request (RST). This includes information about the encrypting and signing credentials to be used with the RP and whether or not to encrypt any issued tokens and/or symmetric keys in the response. Some typical tasks performed in the method are: + The method is called from the token issuance pipeline after the method and should return a object configured for the incoming request. (The token issuance pipeline is implemented in the method.) The object encapsulates information about the RP associated with the security token request (RST). This includes information about the encrypting and signing credentials to be used with the RP and whether or not to encrypt any issued tokens and/or symmetric keys in the response. Some typical tasks performed in the method are: - Determine whether the RP for which the token is intended is a recognized RP. How this is accomplished depends on your implementation. If the intended RP is not a valid RP for this STS, then the method should throw an . @@ -834,7 +834,7 @@ ## Examples The code example that is used in this topic is taken from the `Custom Token` sample. This sample provides custom classes that enable processing of Simple Web Tokens (SWT) and it includes an implementation of a passive STS that is capable of serving an SWT token. For an example of how to implement an active STS, you can see the `Federation Metadata` sample. For information about these samples and other samples available for WIF and about where to download them, see [WIF Code Sample Index](/previous-versions/dotnet/framework/windows-identity-foundation/wif-code-sample-index). - The following code example shows an implementation of the method. This implementation verifies that the RP is recognized by the STS, validates the address in the request and sets the property accordingly, and sets the signing and encrypting credentials to use with the RP based on certificates that are hard-coded in the file. + The following code example shows an implementation of the method. This implementation verifies that the RP is recognized by the STS, validates the address in the request and sets the property accordingly, and sets the signing and encrypting credentials to use with the RP based on certificates that are hard-coded in the file. :::code language="csharp" source="~/snippets/csharp/System.IdentityModel/SecurityTokenService/Overview/customsecuritytokenservice.cs" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.IdentityModel/SecurityTokenService/Overview/customsecuritytokenservice.cs" id="Snippet5"::: @@ -877,7 +877,7 @@ ## Remarks In the default implementation if `requestedTokenType` is `null` or an empty string, the default token type from configuration is used. This is specified by the property of the STS configuration object accessed through the property. - This method is called from the default token issuance pipeline implemented in the method. + This method is called from the default token issuance pipeline implemented in the method. ]]> @@ -914,12 +914,12 @@ |Created (in)|Expires (in)|Created (in)|Expires (out)| |--------------------|--------------------|--------------------|---------------------| -|`null`|`null`|| + | -|C|`null`|C|C + | +|`null`|`null`|| + | +|C|`null`|C|C + | |`null`|E||E| |C|E|C|E| - This method is called from the default token issuance pipeline implemented in the method. + This method is called from the default token issuance pipeline implemented in the method. ]]> @@ -954,27 +954,27 @@ method processes the incoming request (RST) through a token issuance (claims issuance) pipeline and returns either a response (RSTR) that contains a security token with the appropriate claims to authenticate the requestor with the RP or an appropriate exception. The token issuance pipeline in the default implementation consists of calls to the following methods (of the class). + This method implements the Issue binding defined in the WS-Trust specification. The default implementation of the method processes the incoming request (RST) through a token issuance (claims issuance) pipeline and returns either a response (RSTR) that contains a security token with the appropriate claims to authenticate the requestor with the RP or an appropriate exception. The token issuance pipeline in the default implementation consists of calls to the following methods (of the class). -1. The method to validate the request (RST). +1. The method to validate the request (RST). -2. The method to get a object that contains information about the relying party (RP) associated with the request. You must override this method. If returns `null`, a is thrown. +2. The method to get a object that contains information about the relying party (RP) associated with the request. You must override this method. If returns `null`, a is thrown. -3. The method to return a security token descriptor based on the RST and the object returned in the previous step. The security token descriptor () contains information about the request in a form that can be used by a token handler. The property is set to the descriptor returned by the call. If `null` is returned or if the property of the descriptor is `null`, an is thrown. The exception is also thrown if the property is `true` but the property on the returned descriptor is `null`. +3. The method to return a security token descriptor based on the RST and the object returned in the previous step. The security token descriptor () contains information about the request in a form that can be used by a token handler. The property is set to the descriptor returned by the call. If `null` is returned or if the property of the descriptor is `null`, an is thrown. The exception is also thrown if the property is `true` but the property on the returned descriptor is `null`. -4. The method to get the appropriate token handler based on the kind of token requested. If `null` is returned, a is thrown. +4. The method to get the appropriate token handler based on the kind of token requested. If `null` is returned, a is thrown. -5. The method to get the issuer name for the token. Throws an if the name is `null` or empty; otherwise sets the property on the descriptor. +5. The method to get the issuer name for the token. Throws an if the name is `null` or empty; otherwise sets the property on the descriptor. -6. The method to get the lifetime for the token and sets the property on the descriptor. +6. The method to get the lifetime for the token and sets the property on the descriptor. -7. The method to get the proof token to include in the issued token and sets the property on the descriptor. +7. The method to get the proof token to include in the issued token and sets the property on the descriptor. -8. The method to get the claims to include in the issued token and sets the property on the descriptor. You must override this method. +8. The method to get the claims to include in the issued token and sets the property on the descriptor. You must override this method. -9. The method to create a response (RSTR) that contains the issued token. +9. The method to create a response (RSTR) that contains the issued token. - You can override the method to implement a custom token issuance pipeline; however this is typically not necessary in the development and test environments for which most custom implementations of the class are intended. In many of these cases you override the and methods and optionally override the method to provide a serviceable STS for your environment. If further customization is necessary you can often provide it by overriding the methods that implement each stage of the default token issuance pipeline listed above. + You can override the method to implement a custom token issuance pipeline; however this is typically not necessary in the development and test environments for which most custom implementations of the class are intended. In many of these cases you override the and methods and optionally override the method to provide a serviceable STS for your environment. If further customization is necessary you can often provide it by overriding the methods that implement each stage of the default token issuance pipeline listed above. ]]> @@ -1179,7 +1179,7 @@ method is called from the token issuance pipeline (the method) to validate the incoming RST. The RST is validated against the requirements (policy) of the STS and an appropriate exception is thrown if it is not valid. + The method is called from the token issuance pipeline (the method) to validate the incoming RST. The RST is validated against the requirements (policy) of the STS and an appropriate exception is thrown if it is not valid. The default implementation of the class supports only the RST-RSTR pattern and only the Issue binding of the WS-Trust specification (the property of the request must be set to ). The default implementation of this method enforces these requirements (and others noted in the exceptions section). You can override this method if you must enforce different validation requirements for your custom STS. diff --git a/xml/System.IdentityModel/TypedAsyncResult`1.xml b/xml/System.IdentityModel/TypedAsyncResult`1.xml index 5cacae5b060..238c679fb9b 100644 --- a/xml/System.IdentityModel/TypedAsyncResult`1.xml +++ b/xml/System.IdentityModel/TypedAsyncResult`1.xml @@ -50,11 +50,11 @@ A user-defined object that qualifies or contains information about an asynchronous operation. Initializes a new instance of the class that has a state object. - instance does not need a callback delegate. - + instance does not need a callback delegate. + ]]> diff --git a/xml/System.IdentityModel/UnsupportedTokenTypeBadRequestException.xml b/xml/System.IdentityModel/UnsupportedTokenTypeBadRequestException.xml index 5658e5c3680..f94d471dffd 100644 --- a/xml/System.IdentityModel/UnsupportedTokenTypeBadRequestException.xml +++ b/xml/System.IdentityModel/UnsupportedTokenTypeBadRequestException.xml @@ -205,7 +205,7 @@ sets a with all the exception object data targeted for serialization. During deserialization, the exception object is reconstituted from the transmitted over the stream. + sets a with all the exception object data targeted for serialization. During deserialization, the exception object is reconstituted from the transmitted over the stream. ]]> diff --git a/xml/Windows.Foundation/Point.xml b/xml/Windows.Foundation/Point.xml index 084482e698a..eb1a4934add 100644 --- a/xml/Windows.Foundation/Point.xml +++ b/xml/Windows.Foundation/Point.xml @@ -83,7 +83,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Point` struct. For more information, see [Point](https://learn.microsoft.com/uwp/api/windows.foundation.point) in the UWP API reference. - For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) + For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) ]]> @@ -215,7 +215,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Point` struct. For more information, see [Point](https://learn.microsoft.com/uwp/api/windows.foundation.point) in the UWP API reference. - For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) + For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) ]]> @@ -252,7 +252,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Point` struct. For more information, see [Point](https://learn.microsoft.com/uwp/api/windows.foundation.point) in the UWP API reference. - For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) + For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) ]]> diff --git a/xml/Windows.Foundation/Rect.xml b/xml/Windows.Foundation/Rect.xml index a6b9c9b4e03..683fc8b2599 100644 --- a/xml/Windows.Foundation/Rect.xml +++ b/xml/Windows.Foundation/Rect.xml @@ -190,7 +190,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Rect` struct. For more information, see [Rect](https://learn.microsoft.com/uwp/api/windows.foundation.rect) in the UWP API reference. - For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) + For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) ]]> @@ -240,7 +240,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Rect` struct. For more information, see [Rect](https://learn.microsoft.com/uwp/api/windows.foundation.rect) in the UWP API reference. - For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) + For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) ]]> @@ -335,7 +335,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Rect` struct. For more information, see [Rect](https://learn.microsoft.com/uwp/api/windows.foundation.rect) in the UWP API reference. - For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) + For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) ]]> @@ -398,7 +398,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Rect` struct. For more information, see [Rect](https://learn.microsoft.com/uwp/api/windows.foundation.rect) in the UWP API reference. - For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) + For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) ]]> @@ -496,7 +496,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Rect` struct. For more information, see [Rect](https://learn.microsoft.com/uwp/api/windows.foundation.rect) in the UWP API reference. - For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) + For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) ]]> @@ -533,7 +533,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Rect` struct. For more information, see [Rect](https://learn.microsoft.com/uwp/api/windows.foundation.rect) in the UWP API reference. - For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) + For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) ]]> @@ -656,7 +656,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Rect` struct. For more information, see [Rect](https://learn.microsoft.com/uwp/api/windows.foundation.rect) in the UWP API reference. - For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) + For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) ]]> @@ -729,7 +729,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Rect` struct. For more information, see [Rect](https://learn.microsoft.com/uwp/api/windows.foundation.rect) in the UWP API reference. - For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) + For more information and examples of this member, see in the .NET Framework API reference. (Examples show WPF usage and might not translate directly to UWP XAML.) ]]> diff --git a/xml/Windows.Foundation/Size.xml b/xml/Windows.Foundation/Size.xml index 4a3ad8dad62..9a09ec89b6e 100644 --- a/xml/Windows.Foundation/Size.xml +++ b/xml/Windows.Foundation/Size.xml @@ -111,7 +111,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Size` struct. For more information, see [Size](https://learn.microsoft.com/uwp/api/windows.foundation.size) in the UWP API reference. - For more information about this member, see in the .NET Framework API reference. + For more information about this member, see in the .NET Framework API reference. ]]> @@ -371,7 +371,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Size` struct. For more information, see [Size](https://learn.microsoft.com/uwp/api/windows.foundation.size) in the UWP API reference. - For more information about this member, see in the .NET Framework API reference. + For more information about this member, see in the .NET Framework API reference. ]]> diff --git a/xml/Windows.UI.Xaml.Media/Matrix.xml b/xml/Windows.UI.Xaml.Media/Matrix.xml index 22720fad623..ac496ea03de 100644 --- a/xml/Windows.UI.Xaml.Media/Matrix.xml +++ b/xml/Windows.UI.Xaml.Media/Matrix.xml @@ -446,7 +446,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Matrix` struct. For more information, see [Matrix](https://learn.microsoft.com/uwp/api/windows.ui.xaml.media.matrix) in the UWP API reference. - For more information and examples of this member, see in the .NET Framework API reference. + For more information and examples of this member, see in the .NET Framework API reference. ]]> @@ -483,7 +483,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Matrix` struct. For more information, see [Matrix](https://learn.microsoft.com/uwp/api/windows.ui.xaml.media.matrix) in the UWP API reference. - For more information and examples of this member, see in the .NET Framework API reference. + For more information and examples of this member, see in the .NET Framework API reference. ]]> diff --git a/xml/Windows.UI/Color.xml b/xml/Windows.UI/Color.xml index fbfbcb5f661..160a59a7359 100644 --- a/xml/Windows.UI/Color.xml +++ b/xml/Windows.UI/Color.xml @@ -113,7 +113,7 @@ ## Remarks This struct represents the .NET projection of the Windows Runtime (WinRT) `Color` struct. For more information, see [Color](https://learn.microsoft.com/uwp/api/windows.ui.color) in the UWP API reference. - For more information about this member, see in the .NET Framework API reference. + For more information about this member, see in the .NET Framework API reference. ]]> From 6025aaac2dc6b8ef0368febd3e9edc313ca093f9 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:46:45 -0700 Subject: [PATCH 5/8] Revert "System.R*" This reverts commit 4eaaf460e21fe1a571a27cc0f1f19e22a51e490a. --- .../CustomReflectionContext.xml | 82 +- .../AssemblyBuilder.xml | 50 +- .../ConstructorBuilder.xml | 16 +- .../CustomAttributeBuilder.xml | 8 +- xml/System.Reflection.Emit/DynamicILInfo.xml | 20 +- xml/System.Reflection.Emit/DynamicMethod.xml | 60 +- xml/System.Reflection.Emit/EnumBuilder.xml | 42 +- xml/System.Reflection.Emit/EventToken.xml | 4 +- xml/System.Reflection.Emit/FieldBuilder.xml | 10 +- xml/System.Reflection.Emit/FieldToken.xml | 4 +- .../GenericTypeParameterBuilder.xml | 26 +- xml/System.Reflection.Emit/ILGenerator.xml | 34 +- xml/System.Reflection.Emit/Label.xml | 4 +- xml/System.Reflection.Emit/LocalBuilder.xml | 10 +- xml/System.Reflection.Emit/MethodBuilder.xml | 78 +- xml/System.Reflection.Emit/MethodToken.xml | 4 +- xml/System.Reflection.Emit/ModuleBuilder.xml | 88 +- xml/System.Reflection.Emit/OpCode.xml | 4 +- xml/System.Reflection.Emit/OpCodes.xml | 896 +++++++++--------- .../ParameterBuilder.xml | 2 +- xml/System.Reflection.Emit/ParameterToken.xml | 4 +- .../PropertyBuilder.xml | 6 +- xml/System.Reflection.Emit/PropertyToken.xml | 4 +- .../SignatureHelper.xml | 14 +- xml/System.Reflection.Emit/SignatureToken.xml | 4 +- xml/System.Reflection.Emit/StringToken.xml | 4 +- xml/System.Reflection.Emit/TypeBuilder.xml | 176 ++-- xml/System.Reflection.Emit/TypeToken.xml | 4 +- .../MethodBodyBlock.xml | 2 +- .../MethodDebugInformation.xml | 4 +- .../CodeViewDebugDirectoryData.xml | 2 +- .../AmbiguousMatchException.xml | 14 +- xml/System.Reflection/Assembly.xml | 272 +++--- .../AssemblyFlagsAttribute.xml | 2 +- xml/System.Reflection/AssemblyName.xml | 44 +- .../AssemblyVersionAttribute.xml | 4 +- xml/System.Reflection/Binder.xml | 10 +- xml/System.Reflection/BindingFlags.xml | 36 +- xml/System.Reflection/ConstructorInfo.xml | 12 +- xml/System.Reflection/CustomAttributeData.xml | 24 +- .../CustomAttributeExtensions.xml | 120 +-- .../CustomAttributeFormatException.xml | 10 +- .../CustomAttributeNamedArgument.xml | 8 +- .../CustomAttributeTypedArgument.xml | 16 +- xml/System.Reflection/EventInfo.xml | 32 +- .../ExceptionHandlingClause.xml | 16 +- .../ExceptionHandlingClauseOptions.xml | 4 +- xml/System.Reflection/FieldInfo.xml | 46 +- .../GenericParameterAttributes.xml | 2 +- .../ICustomAttributeProvider.xml | 4 +- xml/System.Reflection/IReflect.xml | 6 +- xml/System.Reflection/ImageFileMachine.xml | 14 +- xml/System.Reflection/InterfaceMapping.xml | 44 +- .../InvalidFilterCriteriaException.xml | 12 +- xml/System.Reflection/LocalVariableInfo.xml | 4 +- xml/System.Reflection/MemberFilter.xml | 14 +- xml/System.Reflection/MemberInfo.xml | 18 +- .../MemberInfoExtensions.xml | 20 +- xml/System.Reflection/MemberTypes.xml | 6 +- .../MetadataAssemblyResolver.xml | 2 +- xml/System.Reflection/MetadataLoadContext.xml | 30 +- xml/System.Reflection/MethodBase.xml | 60 +- xml/System.Reflection/MethodBody.xml | 16 +- xml/System.Reflection/MethodInfo.xml | 62 +- xml/System.Reflection/Module.xml | 54 +- .../ObfuscationAttribute.xml | 2 +- xml/System.Reflection/ParameterInfo.xml | 70 +- xml/System.Reflection/ParameterModifier.xml | 2 +- .../PortableExecutableKinds.xml | 14 +- xml/System.Reflection/PropertyInfo.xml | 74 +- .../ReflectionTypeLoadException.xml | 2 +- xml/System.Reflection/TargetException.xml | 12 +- .../TargetInvocationException.xml | 10 +- .../TargetParameterCountException.xml | 12 +- xml/System.Reflection/TypeAttributes.xml | 2 +- xml/System.Reflection/TypeDelegator.xml | 16 +- xml/System.Reflection/TypeFilter.xml | 2 +- xml/System.Reflection/TypeInfo.xml | 4 +- .../StronglyTypedResourceBuilder.xml | 16 +- xml/System.Resources/IResourceReader.xml | 30 +- xml/System.Resources/IResourceWriter.xml | 64 +- .../MissingManifestResourceException.xml | 12 +- .../MissingSatelliteAssemblyException.xml | 22 +- .../NeutralResourcesLanguageAttribute.xml | 2 +- xml/System.Resources/ResXDataNode.xml | 12 +- .../ResXFileRef+Converter.xml | 18 +- xml/System.Resources/ResXFileRef.xml | 66 +- xml/System.Resources/ResXResourceReader.xml | 30 +- xml/System.Resources/ResXResourceSet.xml | 2 +- xml/System.Resources/ResXResourceWriter.xml | 32 +- xml/System.Resources/ResourceManager.xml | 32 +- xml/System.Resources/ResourceReader.xml | 30 +- xml/System.Resources/ResourceSet.xml | 30 +- xml/System.Resources/ResourceWriter.xml | 54 +- .../UltimateResourceFallbackLocation.xml | 14 +- .../IApplicationIdentifier.xml | 4 +- .../IFileChangeNotificationSystem.xml | 4 +- .../IMemoryCacheManager.xml | 4 +- .../CacheEntryChangeMonitor.xml | 2 +- .../CacheEntryRemovedArguments.xml | 46 +- xml/System.Runtime.Caching/CacheItem.xml | 4 +- xml/System.Runtime.Caching/ChangeMonitor.xml | 42 +- .../HostFileChangeMonitor.xml | 2 +- xml/System.Runtime.Caching/MemoryCache.xml | 42 +- xml/System.Runtime.Caching/ObjectCache.xml | 40 +- .../SqlChangeMonitor.xml | 34 +- .../AsyncStateMachineAttribute.xml | 2 +- .../CallConvCdecl.xml | 2 +- .../CallConvFastcall.xml | 2 +- .../CallConvStdcall.xml | 2 +- .../CallConvThiscall.xml | 2 +- ...itionalWeakTable`2+CreateValueCallback.xml | 28 +- .../ConditionalWeakTable`2.xml | 40 +- .../ContractHelper.xml | 20 +- .../DisablePrivateReflectionAttribute.xml | 10 +- .../InlineArrayAttribute.xml | 2 +- .../InternalsVisibleToAttribute.xml | 2 +- .../IsBoxed.xml | 2 +- .../IsByValue.xml | 2 +- .../IsConst.xml | 2 +- .../IsCopyConstructed.xml | 2 +- .../IsExplicitlyDereferenced.xml | 2 +- .../IsImplicitlyDereferenced.xml | 2 +- .../IsJitIntrinsic.xml | 2 +- .../IsLong.xml | 2 +- .../IsPinned.xml | 2 +- .../IsSignUnspecifiedByte.xml | 2 +- .../IsUdtReturn.xml | 2 +- .../IsVolatile.xml | 2 +- .../IteratorStateMachineAttribute.xml | 2 +- .../MethodImplAttribute.xml | 4 +- .../RuntimeHelpers+CleanupCode.xml | 10 +- .../RuntimeHelpers+TryCode.xml | 10 +- .../RuntimeHelpers.xml | 32 +- .../RuntimeWrappedException.xml | 2 +- .../TupleElementNamesAttribute.xml | 10 +- .../Unsafe.xml | 22 +- .../Cer.xml | 36 +- .../Consistency.xml | 24 +- .../ReliabilityContractAttribute.xml | 4 +- .../InstanceStore.xml | 120 +-- .../ExceptionDispatchInfo.xml | 44 +- .../ApplicationActivator.xml | 12 +- .../CONNECTDATA.xml | 16 +- .../IAdviseSink.xml | 60 +- .../ITypeInfo.xml | 198 ++-- .../ITypeInfo2.xml | 8 +- .../ITypeLib.xml | 112 +-- .../ITypeLib2.xml | 112 +-- .../EnumerableToDispatchMarshaler.xml | 72 +- .../EnumeratorToEnumVariantMarshaler.xml | 72 +- .../ExpandoToDispatchExMarshaler.xml | 80 +- .../TypeToTypeInfoMarshaler.xml | 80 +- .../ReadOnlySpanMarshaller`2.xml | 2 +- .../SpanMarshaller`2.xml | 2 +- .../EventRegistrationTokenTable`1.xml | 4 +- .../WindowsRuntimeMarshal.xml | 2 +- .../WindowsRuntimeMetadata.xml | 52 +- .../ArrayWithOffset.xml | 14 +- .../COMException.xml | 16 +- .../CONNECTDATA.xml | 14 +- .../CollectionsMarshal.xml | 2 +- .../ComAwareEventInfo.xml | 24 +- .../ComRegisterFunctionAttribute.xml | 2 +- .../ComUnregisterFunctionAttribute.xml | 26 +- .../CriticalHandle.xml | 34 +- .../DllImportAttribute.xml | 6 +- .../ExporterEventKind.xml | 10 +- .../ExtensibleClassFactory.xml | 38 +- .../ExternalException.xml | 20 +- .../GCHandle.xml | 188 ++-- .../HandleRef.xml | 2 +- .../ICustomFactory.xml | 20 +- .../IRegistrationServices.xml | 92 +- .../ITypeLibExporterNameProvider.xml | 20 +- .../ImporterEventKind.xml | 10 +- .../InvalidComObjectException.xml | 14 +- .../InvalidOleVariantTypeException.xml | 12 +- .../Marshal.xml | 504 +++++----- .../MarshalDirectiveException.xml | 12 +- .../MemoryMarshal.xml | 8 +- xml/System.Runtime.InteropServices/NFloat.xml | 22 +- .../NativeLibrary.xml | 2 +- .../OSPlatform.xml | 62 +- .../RegistrationClassContext.xml | 14 +- .../RegistrationConnectionType.xml | 14 +- .../RegistrationServices.xml | 20 +- .../RuntimeEnvironment.xml | 8 +- .../SEHException.xml | 14 +- .../SafeArrayRankMismatchException.xml | 12 +- .../SafeArrayTypeMismatchException.xml | 12 +- .../SafeBuffer.xml | 10 +- .../SafeHandle.xml | 42 +- .../TypeIdentifierAttribute.xml | 2 +- .../TypeLibExporterFlags.xml | 10 +- .../TypeLibImporterFlags.xml | 2 +- .../TypeMapAssociationAttribute`1.xml | 4 +- .../TypeMapAttribute`1.xml | 4 +- .../UCOMITypeInfo.xml | 234 ++--- .../UCOMITypeLib.xml | 132 +-- .../VariantWrapper.xml | 50 +- .../_Assembly.xml | 88 +- .../_ConstructorInfo.xml | 26 +- .../_EventInfo.xml | 36 +- .../_Exception.xml | 12 +- .../_FieldInfo.xml | 26 +- .../_MemberInfo.xml | 14 +- .../_MethodBase.xml | 24 +- .../_MethodInfo.xml | 26 +- .../_PropertyInfo.xml | 46 +- xml/System.Runtime.InteropServices/_Type.xml | 156 +-- ...yLoadContext+ContextualReflectionScope.xml | 2 +- .../AssemblyLoadContext.xml | 4 +- .../ActivatorLevel.xml | 10 +- .../IActivator.xml | 2 +- .../IConstructionCallMessage.xml | 6 +- .../UrlAttribute.xml | 6 +- .../HttpChannel.xml | 16 +- .../HttpClientChannel.xml | 8 +- .../HttpRemotingHandler.xml | 30 +- .../HttpRemotingHandlerFactory.xml | 20 +- .../HttpServerChannel.xml | 16 +- .../IpcChannel.xml | 18 +- .../IpcClientChannel.xml | 10 +- .../IpcServerChannel.xml | 16 +- .../TcpChannel.xml | 14 +- .../TcpClientChannel.xml | 6 +- .../TcpServerChannel.xml | 12 +- .../BaseChannelObjectWithProperties.xml | 122 +-- .../BinaryClientFormatterSink.xml | 4 +- .../BinaryClientFormatterSinkProvider.xml | 4 +- .../BinaryServerFormatterSink.xml | 6 +- .../BinaryServerFormatterSinkProvider.xml | 4 +- .../ChannelServices.xml | 8 +- .../ClientChannelSinkStack.xml | 50 +- .../IAuthorizeRemotingConnection.xml | 30 +- .../IChannel.xml | 70 +- .../IChannelReceiver.xml | 90 +- .../IChannelSender.xml | 40 +- .../IClientChannelSink.xml | 2 +- .../IClientChannelSinkProvider.xml | 74 +- .../IClientChannelSinkStack.xml | 28 +- .../IClientResponseChannelSinkStack.xml | 30 +- .../IServerChannelSink.xml | 78 +- .../IServerChannelSinkProvider.xml | 70 +- .../IServerChannelSinkStack.xml | 48 +- .../IServerResponseChannelSinkStack.xml | 10 +- .../ServerChannelSinkStack.xml | 86 +- .../SoapClientFormatterSink.xml | 2 +- .../SoapClientFormatterSinkProvider.xml | 4 +- .../SoapServerFormatterSink.xml | 2 +- .../SoapServerFormatterSinkProvider.xml | 4 +- .../Context.xml | 134 +-- .../ContextAttribute.xml | 4 +- .../IContextAttribute.xml | 2 +- .../IContributeClientContextSink.xml | 14 +- .../IContributeEnvoySink.xml | 20 +- .../IContributeServerContextSink.xml | 18 +- .../IDynamicMessageSink.xml | 30 +- .../SynchronizationAttribute.xml | 102 +- .../ClientSponsor.xml | 4 +- .../ILease.xml | 6 +- .../ISponsor.xml | 40 +- .../LifetimeServices.xml | 2 +- .../AsyncResult.xml | 24 +- .../CallContext.xml | 6 +- .../ILogicalThreadAffinative.xml | 24 +- .../IMessageSink.xml | 56 +- .../IMethodCallMessage.xml | 2 +- .../IMethodMessage.xml | 2 +- .../IMethodReturnMessage.xml | 4 +- .../LogicalCallContext.xml | 42 +- .../MethodCall.xml | 4 +- .../MethodResponse.xml | 2 +- .../SoapAnyUri.xml | 6 +- .../SoapBase64Binary.xml | 6 +- .../SoapDate.xml | 192 ++-- .../SoapDay.xml | 8 +- .../SoapDuration.xml | 4 +- .../SoapHexBinary.xml | 6 +- .../SoapInteger.xml | 6 +- .../SoapMonth.xml | 8 +- .../SoapMonthDay.xml | 8 +- .../SoapNegativeInteger.xml | 6 +- .../SoapNonNegativeInteger.xml | 6 +- .../SoapNonPositiveInteger.xml | 6 +- .../SoapPositiveInteger.xml | 6 +- .../SoapQName.xml | 6 +- .../SoapTime.xml | 150 +-- .../SoapYear.xml | 168 ++-- .../SoapYearMonth.xml | 190 ++-- .../SoapTypeAttribute.xml | 2 +- .../MetaData.xml | 176 ++-- .../SdlChannelSink.xml | 4 +- .../RealProxy.xml | 12 +- .../EnterpriseServicesHelper.xml | 2 +- .../ActivatedClientTypeEntry.xml | 6 +- .../ActivatedServiceTypeEntry.xml | 6 +- xml/System.Runtime.Remoting/IChannelInfo.xml | 2 +- xml/System.Runtime.Remoting/ObjRef.xml | 208 ++-- xml/System.Runtime.Remoting/ObjectHandle.xml | 38 +- .../RemotingConfiguration.xml | 44 +- .../RemotingException.xml | 14 +- .../RemotingServices.xml | 24 +- .../RemotingTimeoutException.xml | 14 +- .../ServerException.xml | 14 +- xml/System.Runtime.Remoting/SoapServices.xml | 6 +- .../WellKnownClientTypeEntry.xml | 4 +- .../WellKnownObjectMode.xml | 10 +- .../WellKnownServiceTypeEntry.xml | 2 +- .../BinaryFormatter.xml | 4 +- .../SoapFormatter.xml | 6 +- .../DataContractJsonSerializer.xml | 6 +- .../IXmlJsonReaderInitializer.xml | 60 +- .../IXmlJsonWriterInitializer.xml | 24 +- .../JsonReaderWriterFactory.xml | 112 +-- .../CollectionDataContractAttribute.xml | 6 +- .../DataContractAttribute.xml | 2 +- .../DataContractResolver.xml | 76 +- .../DataContractSerializer.xml | 22 +- .../ExtensionDataObject.xml | 2 +- .../Formatter.xml | 206 ++-- .../FormatterConverter.xml | 150 +-- .../FormatterServices.xml | 14 +- .../IDataContractSurrogate.xml | 10 +- .../IFormatter.xml | 76 +- .../IObjectReference.xml | 14 +- .../ISafeSerializationData.xml | 4 +- .../ISerializable.xml | 46 +- .../ISerializationSurrogate.xml | 22 +- .../ImportOptions.xml | 4 +- .../KnownTypeAttribute.xml | 4 +- .../NetDataContractSerializer.xml | 18 +- .../ObjectIDGenerator.xml | 32 +- .../ObjectManager.xml | 136 +-- .../SerializationException.xml | 16 +- .../SerializationInfo.xml | 16 +- .../SerializationInfoEnumerator.xml | 2 +- .../SerializationObjectManager.xml | 30 +- .../StreamingContext.xml | 2 +- .../XPathQueryGenerator.xml | 80 +- .../XmlObjectSerializer.xml | 166 ++-- .../XmlSerializableServices.xml | 2 +- .../XsdDataContractExporter.xml | 14 +- .../XsdDataContractImporter.xml | 12 +- .../ComponentGuaranteesAttribute.xml | 2 +- .../FrameworkName.xml | 38 +- .../TargetFrameworkAttribute.xml | 4 +- xml/System.Runtime/GCSettings.xml | 2 +- xml/System.Runtime/MemoryFailPoint.xml | 102 +- xml/System.Runtime/ProfileOptimization.xml | 74 +- 351 files changed, 5880 insertions(+), 5880 deletions(-) diff --git a/xml/System.Reflection.Context/CustomReflectionContext.xml b/xml/System.Reflection.Context/CustomReflectionContext.xml index 106b96bcdcb..256e8d55ef1 100644 --- a/xml/System.Reflection.Context/CustomReflectionContext.xml +++ b/xml/System.Reflection.Context/CustomReflectionContext.xml @@ -32,35 +32,35 @@ Represents a customizable reflection context. - provides a way for you to add or remove custom attributes from reflection objects, or add dummy properties to those objects, without re-implementing the complete reflection model. The default simply wraps reflection objects without making any changes, but by subclassing and overriding the relevant methods, you can add, remove, or change the attributes that apply to any reflected parameter or member, or add new properties to a reflected type. - - For example, suppose that your code follows the convention of applying a particular attribute to factory methods, but you are now required to work with third-party code that lacks attributes. You can use to specify a rule for identifying the objects that should have attributes and to supply the objects with those attributes when they are viewed from your code. - - To use effectively, the code that uses the reflected objects must support the notion of specifying a reflection context, instead of assuming that all reflected objects are associated with the runtime reflection context. Many reflection methods in the .NET Framework provide a parameter for this purpose. - - To modify the attributes that are applied to a reflected parameter or member, override the or method. These methods take the reflected object and the list of attributes under its current reflection context, and return the list of attributes it should have under the custom reflection context. - + provides a way for you to add or remove custom attributes from reflection objects, or add dummy properties to those objects, without re-implementing the complete reflection model. The default simply wraps reflection objects without making any changes, but by subclassing and overriding the relevant methods, you can add, remove, or change the attributes that apply to any reflected parameter or member, or add new properties to a reflected type. + + For example, suppose that your code follows the convention of applying a particular attribute to factory methods, but you are now required to work with third-party code that lacks attributes. You can use to specify a rule for identifying the objects that should have attributes and to supply the objects with those attributes when they are viewed from your code. + + To use effectively, the code that uses the reflected objects must support the notion of specifying a reflection context, instead of assuming that all reflected objects are associated with the runtime reflection context. Many reflection methods in the .NET Framework provide a parameter for this purpose. + + To modify the attributes that are applied to a reflected parameter or member, override the or method. These methods take the reflected object and the list of attributes under its current reflection context, and return the list of attributes it should have under the custom reflection context. + > [!WARNING] -> methods should not access the list of attributes of a reflected object or method directly by calling the method on the provided or instance, but should instead use the `declaredAttributes` list, which is passed as a parameter to the method overloads. - - To add properties to a reflected type, override the method. The method accepts a parameter that specifies the reflected type, and returns a list of additional properties. You should use the method to create property objects to return. You can specify delegates when creating the property that will serve as the property accessor, and you can omit one of the accessors to create a read-only or write-only property. Note that such dummy properties have no metadata or Common Intermediate Language (CIL) backing. - +> methods should not access the list of attributes of a reflected object or method directly by calling the method on the provided or instance, but should instead use the `declaredAttributes` list, which is passed as a parameter to the method overloads. + + To add properties to a reflected type, override the method. The method accepts a parameter that specifies the reflected type, and returns a list of additional properties. You should use the method to create property objects to return. You can specify delegates when creating the property that will serve as the property accessor, and you can omit one of the accessors to create a read-only or write-only property. Note that such dummy properties have no metadata or Common Intermediate Language (CIL) backing. + > [!WARNING] -> Be cautious about equality among reflected objects when you work with reflection contexts, because objects may represent the same reflected object in multiple contexts. You can use the method to obtain a particular reflection context's version of a reflected object. - +> Be cautious about equality among reflected objects when you work with reflection contexts, because objects may represent the same reflected object in multiple contexts. You can use the method to obtain a particular reflection context's version of a reflected object. + > [!WARNING] -> A object alters the attributes returned by a particular reflection object, such as those obtained by the method. It does not alter the custom attribute data returned by the method, and these two lists will not match when you use a custom reflection context. - - - -## Examples - The following example demonstrates how to subclass to add a custom attribute to all the members of a given type whose names begin with "To". To run this code, paste it into an empty console project, and make sure to include a reference to System.Reflection.Context.dll. - - :::code language="csharp" source="~/snippets/csharp/System.Reflection.Context/CustomReflectionContext/Overview/program.cs" id="Snippet1"::: - +> A object alters the attributes returned by a particular reflection object, such as those obtained by the method. It does not alter the custom attribute data returned by the method, and these two lists will not match when you use a custom reflection context. + + + +## Examples + The following example demonstrates how to subclass to add a custom attribute to all the members of a given type whose names begin with "To". To run this code, paste it into an empty console project, and make sure to include a reference to System.Reflection.Context.dll. + + :::code language="csharp" source="~/snippets/csharp/System.Reflection.Context/CustomReflectionContext/Overview/program.cs" id="Snippet1"::: + ]]> @@ -157,11 +157,11 @@ When overridden in a derived class, provides a collection of additional properties for the specified type, as represented in this reflection context. A collection of additional properties for the specified type. - method. - + method. + ]]> @@ -222,11 +222,11 @@ Creates an object that represents a property to be added to a type, to be used with the method. An object that represents the property. - objects, and should be used only in the context of the method. - + objects, and should be used only in the context of the method. + ]]> @@ -304,11 +304,11 @@ Creates an object that represents a property to be added to a type, to be used with the method and using the specified custom attributes. An object that represents the property. - objects, and should be used only in the context of the method. - + objects, and should be used only in the context of the method. + ]]> diff --git a/xml/System.Reflection.Emit/AssemblyBuilder.xml b/xml/System.Reflection.Emit/AssemblyBuilder.xml index c2ce717f441..fb16c4cdc58 100644 --- a/xml/System.Reflection.Emit/AssemblyBuilder.xml +++ b/xml/System.Reflection.Emit/AssemblyBuilder.xml @@ -585,7 +585,7 @@ The following code example shows how to define and use a dynamic assembly. The e The defined dynamic module is transient. The dynamic module is not saved, even if the parent dynamic assembly was created with . > [!NOTE] -> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. +> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. ## Examples @@ -670,7 +670,7 @@ The following code example shows how to define and use a dynamic assembly. The e The dynamic module is not saved, even if the parent dynamic assembly was created with . > [!NOTE] -> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. +> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. ## Examples @@ -750,7 +750,7 @@ The following code example shows how to define and use a dynamic assembly. The e In an assembly with only one module, that module should contain the assembly manifest. > [!NOTE] -> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. +> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. ## Examples @@ -837,7 +837,7 @@ The following code example shows how to define and use a dynamic assembly. The e In an assembly with only one module, that module should contain the assembly manifest. > [!NOTE] -> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. +> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. ## Examples @@ -958,14 +958,14 @@ The following code example shows how to define and use a dynamic assembly. The e by calling . + Fine grain resources can be added with the returned by calling . `fileName` should not be the same as that of any other persistable module, stand-alone managed resource, or the stand-alone manifest file. - The runtime calls the method when the dynamic assembly is saved. + The runtime calls the method when the dynamic assembly is saved. ## Examples - The following example uses the method to get a resource writer. The example uses the resource writer to add three resource strings. + The following example uses the method to get a resource writer. The example uses the resource writer to add three resource strings. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/DefineResource/assemblybuilder_defineresource.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/AssemblyBuilder/DefineResource/assemblybuilder_defineresource.vb" id="Snippet1"::: @@ -1041,11 +1041,11 @@ The following code example shows how to define and use a dynamic assembly. The e by calling . + Fine-grain resources can be added with the returned by calling . `fileName` should not be the same as that of any other persistable module, standalone managed resource, or the standalone manifest file. - The runtime calls the method when the dynamic assembly is saved. + The runtime calls the method when the dynamic assembly is saved. ]]> @@ -1111,7 +1111,7 @@ The following code example shows how to define and use a dynamic assembly. The e or after either one of the methods was called previously will throw the System.ArgumentException being throw. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime). + An assembly can be associated with only one unmanaged resource. This means that calling or after either one of the methods was called previously will throw the System.ArgumentException being throw. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime). @@ -1168,7 +1168,7 @@ The following code example shows how to define and use a dynamic assembly. The e or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime). + An assembly can be associated with only one unmanaged resource. This means that calling or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime). ## Examples The example below demonstrates a call to `DefineUnmanagedResource`, passing an external resource file. @@ -1238,7 +1238,7 @@ The following code example shows how to define and use a dynamic assembly. The e or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime SDK). + An assembly can be associated with only one unmanaged resource. This means that calling or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime SDK). Empty argument strings get written as a single space. Spaces are substituted for null characters in the argument strings. @@ -1301,7 +1301,7 @@ The following code example shows how to define and use a dynamic assembly. The e or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft `ResMerge` utility (not supplied with the common language runtime SDK). + An assembly can be associated with only one unmanaged resource. This means that calling or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft `ResMerge` utility (not supplied with the common language runtime SDK). Empty argument strings get written as a single space. Spaces are substituted for null characters in the argument strings. @@ -1633,7 +1633,7 @@ The following code example shows how to define and use a dynamic assembly. The e and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods such as and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. ]]> @@ -2400,7 +2400,7 @@ The following code example shows how to define and use a dynamic assembly. The e ## Remarks This method does not return a complete list of referenced assemblies. For example, if you apply a custom attribute to the , the assembly in which the attribute was defined is included in the list returned by this method. However, if you use a object to specify the type of a method parameter, that type is not included. - To get a complete list of referenced assemblies, save the assembly, load it into another application domain, and call the method. + To get a complete list of referenced assemblies, save the assembly, load it into another application domain, and call the method. ]]> @@ -2525,7 +2525,7 @@ The following code example shows how to define and use a dynamic assembly. The e ## Remarks Satellite assemblies contain localized resources, as distinct from main application assemblies, which contain non-localizable executable code and resources for a single culture that serve as the default or neutral culture. - Call the overload to use your current assembly version. + Call the overload to use your current assembly version. ]]> @@ -2601,7 +2601,7 @@ The following code example shows how to define and use a dynamic assembly. The e method. + A type cannot be found until it has been created by calling the method. ]]> @@ -3039,7 +3039,7 @@ The following code example shows how to define and use a dynamic assembly. The e To emit a dynamic assembly in the reflection-only context, specify when you create the . If a dynamic assembly is emitted in the reflection-only context, its code cannot be executed. > [!NOTE] -> After you have saved a dynamic assembly to disk, you can use the method to load the completed assembly into the reflection-only context. However, the assembly can no longer be modified. +> After you have saved a dynamic assembly to disk, you can use the method to load the completed assembly into the reflection-only context. However, the assembly can no longer be modified. ]]> @@ -3102,11 +3102,11 @@ The following code example shows how to define and use a dynamic assembly. The e This method saves all non-transient dynamic modules defined in this dynamic assembly. Transient dynamic modules are not saved. The assembly file name can be the same as the name of one of the modules. If so, the assembly manifest is stored within that module. `assemblyFileName` can be different from the names of all of the modules contained within the assembly. If so, the assembly file contains only the assembly manifest. - For each obtained using , this method writes the .resources file and calls to close the stream. + For each obtained using , this method writes the .resources file and calls to close the stream. - The `assemblyFileName` needs to be a simple file name without a drive or directory component. To create an assembly in a specific directory, use one of the methods that takes a target directory argument. + The `assemblyFileName` needs to be a simple file name without a drive or directory component. To create an assembly in a specific directory, use one of the methods that takes a target directory argument. - In .NET Framework 2.0, this overload of the method is equivalent to calling the method overload with for the `portableExecutableKind` parameter and for the `imageFileMachine` parameter. + In .NET Framework 2.0, this overload of the method is equivalent to calling the method overload with for the `portableExecutableKind` parameter and for the `imageFileMachine` parameter. ## Examples The following code sample creates a dynamic assembly and then persists it to a local disk using `Save`. @@ -3193,9 +3193,9 @@ The following code example shows how to define and use a dynamic assembly. The e This method saves all non-transient dynamic modules defined in this dynamic assembly. Transient dynamic modules are not saved. The assembly file name can be the same as the name of one of the module. If so, the assembly manifest is stored within that module. `assemblyFileName` can be different from the names of all of the modules contained within the assembly. If so, the assembly file contains only the assembly manifest. - For each obtained using , this method writes the .resources file and calls to close the stream. + For each obtained using , this method writes the .resources file and calls to close the stream. - The `assemblyFileName` needs to be a simple file name without a drive or directory component. To create an assembly in a specific directory, use one of the methods that takes a target directory argument. + The `assemblyFileName` needs to be a simple file name without a drive or directory component. To create an assembly in a specific directory, use one of the methods that takes a target directory argument. ]]> @@ -3325,7 +3325,7 @@ The following code example shows how to define and use a dynamic assembly. The e ## Remarks > [!NOTE] -> cannot be used to set declarative security attributes. Use one of the overloads of that takes required, optional, and refused permissions. +> cannot be used to set declarative security attributes. Use one of the overloads of that takes required, optional, and refused permissions. ## Examples The following code sample illustrates the use of `SetCustomAttribute` within , using a . @@ -3404,7 +3404,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati `RuntimeConstructorInfo` is a special type generated by the system. It derives from the class, and any object you obtain through reflection is actually an instance of `RuntimeConstructorInfo`. > [!NOTE] -> cannot be used to set declarative security attributes. Use one of the overloads of that takes required, optional, and refused permissions. +> cannot be used to set declarative security attributes. Use one of the overloads of that takes required, optional, and refused permissions. ## Examples The following code sample illustrates the use of `SetCustomAttribute` to attach a custom attribute to a dynamically generated assembly. diff --git a/xml/System.Reflection.Emit/ConstructorBuilder.xml b/xml/System.Reflection.Emit/ConstructorBuilder.xml index b13b034a5dc..6e00514b029 100644 --- a/xml/System.Reflection.Emit/ConstructorBuilder.xml +++ b/xml/System.Reflection.Emit/ConstructorBuilder.xml @@ -80,15 +80,15 @@ is used to fully describe a constructor in Microsoft intermediate language (MSIL), including the name, attributes, signature, and constructor body. It is used in conjunction with the class to create classes at run time. Call to get an instance of . + is used to fully describe a constructor in Microsoft intermediate language (MSIL), including the name, attributes, signature, and constructor body. It is used in conjunction with the class to create classes at run time. Call to get an instance of . If you do not define a constructor for your dynamic type, a parameterless constructor is provided automatically, and it calls the parameterless constructor of the base class. If you use to define a constructor for your dynamic type, a parameterless constructor is not provided. You have the following options for providing a parameterless constructor in addition to the constructor you defined: -- If you want a parameterless constructor that simply calls the parameterless constructor of the base class, you can use the method to create one (and optionally restrict access to it). Do not provide an implementation for this parameterless constructor. If you do, an exception is thrown when you try to use the constructor. No exception is thrown when the method is called. +- If you want a parameterless constructor that simply calls the parameterless constructor of the base class, you can use the method to create one (and optionally restrict access to it). Do not provide an implementation for this parameterless constructor. If you do, an exception is thrown when you try to use the constructor. No exception is thrown when the method is called. -- If you want a parameterless constructor that does something more than simply calling the parameterless constructor of the base class, or that calls another constructor of the base class, or that does something else entirely, you must use the method to create a , and provide your own implementation. +- If you want a parameterless constructor that does something more than simply calling the parameterless constructor of the base class, or that calls another constructor of the base class, or that does something else entirely, you must use the method to create a , and provide your own implementation. @@ -170,7 +170,7 @@ can be called several times, with each call specifying a security action (such as `Demand`, `Assert`, and `Deny`) and a set of permissions that the action applies to. + can be called several times, with each call specifying a security action (such as `Demand`, `Assert`, and `Deny`) and a set of permissions that the action applies to. > [!NOTE] > In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a constructor by using this method are stored in the old XML metadata format. See Emitting Declarative Security Attributes. @@ -512,7 +512,7 @@ ## Remarks The `inherit` parameter is ignored because a class never inherits constructors from base classes. - To get the custom attributes, finish building the type by calling , retrieve the constructor by calling the method on the returned type, and then call the method on the returned . + To get the custom attributes, finish building the type by calling , retrieve the constructor by calling the method on the returned type, and then call the method on the returned . ]]> @@ -569,7 +569,7 @@ ## Remarks The `inherit` parameter is ignored because a class never inherits constructors from base classes. - To get the custom attributes, finish building the type by calling , retrieve the constructor by calling the method on the returned type, and then call the method on the returned . + To get the custom attributes, finish building the type by calling , retrieve the constructor by calling the method on the returned type, and then call the method on the returned . ]]> @@ -874,7 +874,7 @@ method has been called. In the .NET Framework versions 1.0 and 1.1, is thrown. In the .NET Framework version 2.0, is thrown. + This property is not supported until after the method has been called. In the .NET Framework versions 1.0 and 1.1, is thrown. In the .NET Framework version 2.0, is thrown. @@ -1365,7 +1365,7 @@ method. + This property returns the same value as the method. ]]> diff --git a/xml/System.Reflection.Emit/CustomAttributeBuilder.xml b/xml/System.Reflection.Emit/CustomAttributeBuilder.xml index f6ec7329951..50007614512 100644 --- a/xml/System.Reflection.Emit/CustomAttributeBuilder.xml +++ b/xml/System.Reflection.Emit/CustomAttributeBuilder.xml @@ -76,7 +76,7 @@ and its argument. Then call on an `AssemblyBuilder` to establish the association. + Use the `CustomAttributeBuilder` object returned by the constructor to describe the custom attribute. Associate the `CustomAttribute` with a builder instance by calling the `SetCustomAttribute` method on that builder instance. For example, create a `CustomAttributeBuilder` to describe an instance of `AssemblyCultureAttribute` by supplying the constructor of and its argument. Then call on an `AssemblyBuilder` to establish the association. @@ -243,7 +243,7 @@ The elements of the `constructorArgs` and `fieldValues` arrays are restricted to element types. They can be `byte`, `sbyte`, `int`, `uint`, `long`, `ulong`, `float`, `double`, `String`, `char`, `bool`, an enum, a type, any of the previous types that was cast to an object, or a single-dimension, zero-based array of any of the previous types. > [!IMPORTANT] -> Do not include private fields in `namedFields`. Doing so will cause to be thrown when the method is later called on the completed type. +> Do not include private fields in `namedFields`. Doing so will cause to be thrown when the method is later called on the completed type. ]]> @@ -343,7 +343,7 @@ The elements of the `constructorArgs` and `propertyValues` arrays are restricted to element types. They can be `byte`, `sbyte`, `int`, `uint`, `long`, `ulong`, `float`, `double`, `String`, `char`, `bool`, an enum, a type, any of the previous types that was cast to an object, or a single-dimension, zero-based array of any of the previous types. > [!IMPORTANT] -> Do not include private properties in `namedProperties`. Doing so will cause to be thrown when the method is later called on the completed type. +> Do not include private properties in `namedProperties`. Doing so will cause to be thrown when the method is later called on the completed type. ]]> @@ -458,7 +458,7 @@ The elements of the `constructorArgs`, `propertyValues`, or `fieldValues` arrays are restricted to element types. They can be `byte`, `sbyte`, `int`, `uint`, `long`, `ulong`, `float`, `double`, `String`, `char`, `bool`, an enum, a type, any of the previous types that was cast to an object, or a single-dimension, zero-based array of any of the previous types. > [!IMPORTANT] -> Do not include private properties or fields in `namedProperties` or `namedFields`. Doing so will cause to be thrown when the method is later called on the completed type. +> Do not include private properties or fields in `namedProperties` or `namedFields`. Doing so will cause to be thrown when the method is later called on the completed type. ]]> diff --git a/xml/System.Reflection.Emit/DynamicILInfo.xml b/xml/System.Reflection.Emit/DynamicILInfo.xml index d50aa913305..1bfabac7bf7 100644 --- a/xml/System.Reflection.Emit/DynamicILInfo.xml +++ b/xml/System.Reflection.Emit/DynamicILInfo.xml @@ -63,14 +63,14 @@ ## Remarks The class allows developers to write their own MSIL generators instead of using . - To create instances of other types, call methods, and so on, the MSIL you generate must include tokens for those entities. The class provides several overloads of the method, which return tokens valid in the scope of the current . For example, if you need to call an overload of the method, you can obtain a for that overload and pass it to the method to obtain a token to embed in your MSIL. + To create instances of other types, call methods, and so on, the MSIL you generate must include tokens for those entities. The class provides several overloads of the method, which return tokens valid in the scope of the current . For example, if you need to call an overload of the method, you can obtain a for that overload and pass it to the method to obtain a token to embed in your MSIL. - Once you have created arrays for your local variable signature, exceptions, and code body, you can use the , , and methods to insert them into the associated with your object. + Once you have created arrays for your local variable signature, exceptions, and code body, you can use the , , and methods to insert them into the associated with your object. Generating your own metadata and MSIL requires familiarity with the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics" and "Partition III: CIL Instruction Set". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). > [!NOTE] -> Do not use to generate code that creates a delegate to another dynamic method by calling the delegate constructor directly. Instead, use the method to create the delegate. A delegate that is created with the delegate constructor does not have a reference to the target dynamic method. The dynamic method might be reclaimed by garbage collection while the delegate is still in use. +> Do not use to generate code that creates a delegate to another dynamic method by calling the delegate constructor directly. Instead, use the method to create the delegate. A delegate that is created with the delegate constructor does not have a reference to the target dynamic method. The dynamic method might be reclaimed by garbage collection while the delegate is still in use. ]]> @@ -276,7 +276,7 @@ object. Use the method to get a for the field you want to access, then use the property to get the . + You must obtain a token for any field that will be accessed by the dynamic method associated with the current object. Use the method to get a for the field you want to access, then use the property to get the . ]]> @@ -332,10 +332,10 @@ object. Use the method to get a for the method you want to access, and then use the property to get the . + You must obtain a token for any method that will be accessed by the dynamic method associated with the current object. Use the method to get a for the method you want to access, and then use the property to get the . > [!NOTE] -> For a method that belongs to a generic type, use the method overload and specify a for the generic type. +> For a method that belongs to a generic type, use the method overload and specify a for the generic type. ]]> @@ -481,7 +481,7 @@ object. Use the method to get a for the field you want to access, and then use the property to get the . + You must obtain a token for any field that will be accessed by the dynamic method associated with the current object. Use the method to get a for the field you want to access, and then use the property to get the . ]]> @@ -533,7 +533,7 @@ object. Use the method to get a for the method you want to call, and then use the property to get the . + You must obtain a token for any method that will be called by the dynamic method associated with the current object. Use the method to get a for the method you want to call, and then use the property to get the . ]]> @@ -855,7 +855,7 @@ method to get a for the local signature. + The local variable signature describes the layout of a method's local variables. To simplify construction of the local variable signature, use the `static` (`Shared` in Visual Basic) method to get a for the local signature. For information on local variable signatures, see the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -917,7 +917,7 @@ method to get a for the local signature. + The local variable signature describes the layout of a method's local variables. To simplify construction of the local variable signature, use the `static` (`Shared` in Visual Basic) method to get a for the local signature. For information on local variable signatures, see the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). diff --git a/xml/System.Reflection.Emit/DynamicMethod.xml b/xml/System.Reflection.Emit/DynamicMethod.xml index 8d5130c7800..80505153580 100644 --- a/xml/System.Reflection.Emit/DynamicMethod.xml +++ b/xml/System.Reflection.Emit/DynamicMethod.xml @@ -57,7 +57,7 @@ For more information about this API, see Supplemental API remarks for DynamicMethod. method. +The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/Overview/source.vb" id="Snippet1"::: @@ -151,7 +151,7 @@ The following code example creates a dynamic method that takes two parameters. T ## Remarks The dynamic method that is created by this constructor is associated with an anonymous assembly instead of an existing type or module. The anonymous assembly exists only to provide a sandbox environment for dynamic methods, that is, to isolate them from other code. This environment makes it safe for the dynamic method to be emitted and executed by partially trusted code. - This constructor specifies that just-in-time (JIT) visibility checks will be enforced for the Microsoft intermediate language (MSIL) of the dynamic method. That is, the code in the dynamic method has access to public methods of public classes. Exceptions are thrown if the method tries to access types or members that are `private`, `protected`, or `internal` (`Friend` in Visual Basic). To create a dynamic method that has restricted ability to skip JIT visibility checks, use the constructor. + This constructor specifies that just-in-time (JIT) visibility checks will be enforced for the Microsoft intermediate language (MSIL) of the dynamic method. That is, the code in the dynamic method has access to public methods of public classes. Exceptions are thrown if the method tries to access types or members that are `private`, `protected`, or `internal` (`Friend` in Visual Basic). To create a dynamic method that has restricted ability to skip JIT visibility checks, use the constructor. When an anonymously hosted dynamic method is constructed, the call stack of the emitting assembly is included. When the method is invoked, the permissions of the emitting assembly are used instead of the permissions of the actual caller. Thus, the dynamic method cannot execute at a higher level of privilege than that of the assembly that emitted it, even if it is passed to and executed by an assembly that has a higher trust level. @@ -257,7 +257,7 @@ The following code example creates a dynamic method that takes two parameters. T - The call stack that emits the dynamic method is granted with the flag. This is always true when the code is executed with full trust. For partially trusted code, it is true only if the host explicitly grants the permission. > [!IMPORTANT] - > If the permission has not been granted, a security exception is thrown when is called or when the dynamic method is invoked, not when this constructor is called. No special permissions are required to emit the dynamic method. + > If the permission has not been granted, a security exception is thrown when is called or when the dynamic method is invoked, not when this constructor is called. No special permissions are required to emit the dynamic method. For example, a dynamic method that is created with `restrictedSkipVisibility` set to `true` can access a private member of any assembly on the call stack if the call stack has been granted restricted member access. If the dynamic method is created with partially trusted code on the call stack, it cannot access a private member of a type in a .NET Framework assembly, because such assemblies are fully trusted. @@ -363,7 +363,7 @@ The following code example creates a dynamic method that takes two parameters. T > For backward compatibility, this constructor demands with the flag if the following conditions are both true: `m` is a module other than the calling module, and the demand for with the flag has failed. If the demand for succeeds, the operation is allowed. ## Examples - The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. + The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/.ctor/source1.vb" id="Snippet1"::: @@ -477,10 +477,10 @@ The following code example creates a dynamic method that takes two parameters. T > [!NOTE] > In general, changing the internal fields of classes is not good object-oriented coding practice. - The example code creates an instance of `Example` and then creates two delegates. The first is of type `UseLikeStatic`, which has the same parameters as the dynamic method. The second is of type `UseLikeInstance`, which lacks the first parameter (of type `Example`). This delegate is created using the method overload; the second parameter of that method overload is an instance of `Example`, in this case the instance just created, which is bound to the newly created delegate. Whenever that delegate is invoked, the dynamic method acts on the bound instance of `Example`. + The example code creates an instance of `Example` and then creates two delegates. The first is of type `UseLikeStatic`, which has the same parameters as the dynamic method. The second is of type `UseLikeInstance`, which lacks the first parameter (of type `Example`). This delegate is created using the method overload; the second parameter of that method overload is an instance of `Example`, in this case the instance just created, which is bound to the newly created delegate. Whenever that delegate is invoked, the dynamic method acts on the bound instance of `Example`. > [!NOTE] -> This is an example of the relaxed rules for delegate binding introduced in .NET Framework 2.0, along with new overloads of the method. For more information, see the class. +> This is an example of the relaxed rules for delegate binding introduced in .NET Framework 2.0, along with new overloads of the method. For more information, see the class. The `UseLikeStatic` delegate is invoked, passing in the instance of `Example` that is bound to the `UseLikeInstance` delegate. Then the `UseLikeInstance` delegate is invoked, so that both delegates act on the same instance of `Example`. The changes in the values of the internal field are displayed after each call. Finally, a `UseLikeInstance` delegate is bound to an instance of `DerivedFromExample`, and the delegate calls are repeated. @@ -1121,14 +1121,14 @@ The following code example creates a dynamic method that takes two parameters. T method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. + Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. - To create a method body for a dynamic method when you have your own MSIL generator, call the method to obtain a object. If you do not have your own MSIL generator, call the method to obtain an object that can be used to generate the method body. + To create a method body for a dynamic method when you have your own MSIL generator, call the method to obtain a object. If you do not have your own MSIL generator, call the method to obtain an object that can be used to generate the method body. ## Examples - The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. + The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/.ctor/source1.vb" id="Snippet1"::: @@ -1216,9 +1216,9 @@ The following code example creates a dynamic method that takes two parameters. T This method overload requires `target` to be of the same type as the first parameter of the dynamic method, or to be assignable to that type (for example, a derived class). The signature of `delegateType` has all the parameters of the dynamic method except the first. For example, if the dynamic method has the parameters , , and , then `delegateType` has the parameters and ; `target` is of type . - Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. + Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. - To create a method body for a dynamic method when you have your own MSIL generator, call the method to obtain a object. If you do not have your own MSIL generator, call the method to obtain an object that can be used to generate the method body. + To create a method body for a dynamic method when you have your own MSIL generator, call the method to obtain a object. If you do not have your own MSIL generator, call the method to obtain an object that can be used to generate the method body. @@ -1232,10 +1232,10 @@ The following code example creates a dynamic method that takes two parameters. T > [!NOTE] > In general, changing the internal fields of classes is not good object-oriented coding practice. - The example code creates an instance of `Example` and then creates two delegates. The first is of type `UseLikeStatic`, which has the same parameters as the dynamic method. The second is of type `UseLikeInstance`, which lacks the first parameter (of type `Example`). This delegate is created using the method overload; the second parameter of that method overload is an instance of `Example`, in this case the instance just created, which is bound to the newly created delegate. Whenever that delegate is invoked, the dynamic method acts on the bound instance of `Example`. + The example code creates an instance of `Example` and then creates two delegates. The first is of type `UseLikeStatic`, which has the same parameters as the dynamic method. The second is of type `UseLikeInstance`, which lacks the first parameter (of type `Example`). This delegate is created using the method overload; the second parameter of that method overload is an instance of `Example`, in this case the instance just created, which is bound to the newly created delegate. Whenever that delegate is invoked, the dynamic method acts on the bound instance of `Example`. > [!NOTE] -> This is an example of the relaxed rules for delegate binding introduced in .NET Framework 2.0, along with new overloads of the method. For more information, see the class. +> This is an example of the relaxed rules for delegate binding introduced in .NET Framework 2.0, along with new overloads of the method. For more information, see the class. The `UseLikeStatic` delegate is invoked, passing in the instance of `Example` that is bound to the `UseLikeInstance` delegate. Then the `UseLikeInstance` delegate is invoked, so that both delegates act on the same instance of `Example`. The changes in the values of the internal field are displayed after each call. Finally, a `UseLikeInstance` delegate is bound to an instance of `DerivedFromExample`, and the delegate calls are repeated. @@ -1365,9 +1365,9 @@ The following code example creates a dynamic method that takes two parameters. T method refers to the return value. Setting parameter information has no effect on the return value. + If `position` is 0, the method refers to the return value. Setting parameter information has no effect on the return value. - If the dynamic method has already been completed, by calling the or method, the method has no effect. No exception is thrown. + If the dynamic method has already been completed, by calling the or method, the method has no effect. No exception is thrown. @@ -1497,7 +1497,7 @@ The following code example creates a dynamic method that takes two parameters. T For dynamic methods, specifying `true` for `inherit` has no effect, because the method is not declared in a type. > [!NOTE] -> Custom attributes are not currently supported on dynamic methods. The only attribute returned is ; you can get the method implementation flags more easily using the method. +> Custom attributes are not currently supported on dynamic methods. The only attribute returned is ; you can get the method implementation flags more easily using the method. ]]> @@ -1555,7 +1555,7 @@ The following code example creates a dynamic method that takes two parameters. T For dynamic methods, specifying `true` for `inherit` has no effect, because the method is not declared in a type. > [!NOTE] -> Custom attributes are not currently supported on dynamic methods. The only attribute returned is ; you can get the method implementation flags more easily using the method. +> Custom attributes are not currently supported on dynamic methods. The only attribute returned is ; you can get the method implementation flags more easily using the method. ]]> @@ -1671,7 +1671,7 @@ The following code example creates a dynamic method that takes two parameters. T or method, any further attempt to add MSIL is ignored. No exception is thrown. + After a dynamic method has been completed, by calling the or method, any further attempt to add MSIL is ignored. No exception is thrown. > [!NOTE] > There are restrictions on unverifiable code in dynamic methods, even in some full-trust scenarios. See the "Verification" section in Remarks for . @@ -1679,7 +1679,7 @@ The following code example creates a dynamic method that takes two parameters. T ## Examples - The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. + The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/.ctor/source1.vb" id="Snippet1"::: @@ -1741,7 +1741,7 @@ The following code example creates a dynamic method that takes two parameters. T or method, any further attempt to add MSIL is ignored. No exception is thrown. + After a dynamic method has been completed, by calling the or method, any further attempt to add MSIL is ignored. No exception is thrown. > [!NOTE] > There are restrictions on unverifiable code in dynamic methods, even in some full-trust scenarios. See the "Verification" section in Remarks for . @@ -1850,7 +1850,7 @@ The following code example creates a dynamic method that takes two parameters. T objects returned by this method are for information only. Use the method to set or change the characteristics of the parameters. + The objects returned by this method are for information only. Use the method to set or change the characteristics of the parameters. @@ -1984,16 +1984,16 @@ The following code example creates a dynamic method that takes two parameters. T ## Remarks In addition to the listed exceptions, the calling code should be prepared to catch any exceptions thrown by the dynamic method. - Executing a dynamic method with a delegate created by the method is more efficient than executing it with the method. + Executing a dynamic method with a delegate created by the method is more efficient than executing it with the method. - Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. + Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. - All dynamic methods are static, so the `obj` parameter is always ignored. To treat a dynamic method as if it were an instance method, use the overload that takes an object instance. + All dynamic methods are static, so the `obj` parameter is always ignored. To treat a dynamic method as if it were an instance method, use the overload that takes an object instance. If the dynamic method has no parameters, the value of `parameters` should be `null`. Otherwise the number, type, and order of elements in the parameters array should be identical to the number, type, and order of parameters of the dynamic method. > [!NOTE] -> This method overload is called by the method overload inherited from the class, so the preceding remarks apply to both overloads. +> This method overload is called by the method overload inherited from the class, so the preceding remarks apply to both overloads. This method does not demand permissions directly, but invoking the dynamic method can result in security demands, depending on the method. For example, no demands are made for anonymously hosted dynamic methods that are created with the `restrictedSkipVisibility` parameter set to `false`. On the other hand, if you create a method with `restrictedSkipVisibility` set to `true` so it can access a hidden member of a target assembly, the method will cause a demand for the permissions of the target assembly plus with the flag. @@ -2123,7 +2123,7 @@ The following code example creates a dynamic method that takes two parameters. T , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2211,7 +2211,7 @@ The following code example creates a dynamic method that takes two parameters. T , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2299,7 +2299,7 @@ The following code example creates a dynamic method that takes two parameters. T , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2727,7 +2727,7 @@ The following code example creates a dynamic method that takes two parameters. T method is always empty. + Custom attributes are not supported on the return type of a dynamic method, so the array of custom attributes returned by the method is always empty. @@ -2790,7 +2790,7 @@ The following code example creates a dynamic method that takes two parameters. T ## Examples - The following code example displays the method of a dynamic method. This code example is part of a larger example provided for the class. + The following code example displays the method of a dynamic method. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/Overview/source.cs" id="Snippet32"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/Overview/source.vb" id="Snippet32"::: diff --git a/xml/System.Reflection.Emit/EnumBuilder.xml b/xml/System.Reflection.Emit/EnumBuilder.xml index 1f266c8f1b9..214e4d4fe5f 100644 --- a/xml/System.Reflection.Emit/EnumBuilder.xml +++ b/xml/System.Reflection.Emit/EnumBuilder.xml @@ -1026,7 +1026,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the constructor of a finished type, you can retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1089,7 +1089,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr and call on the returned . + As a workaround, to retrieve the custom attributes of a finished type, retrieve the type using and call on the returned . The following code sample illustrates the use of `GetCustomAttribute` in the context of . @@ -1149,7 +1149,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr and call on the returned . + As a workaround, to retrieve the custom attributes of a finished type, retrieve the type using and call on the returned . The following code sample illustrates the use of `GetCustomAttribute` in the context of . @@ -1307,7 +1307,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the event of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1373,7 +1373,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the events of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1432,7 +1432,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type to retrieve the events. + As a workaround, to retrieve the events of a finished type, retrieve the type using or and use reflection on the retrieved type to retrieve the events. ]]> @@ -1500,7 +1500,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the field of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1559,9 +1559,9 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the field of a finished type, retrieve the type using or and use reflection on the retrieved type. - The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. ]]> @@ -1689,7 +1689,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the interface of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1755,7 +1755,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the interface mapping types of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1811,7 +1811,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the interface of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1877,7 +1877,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the member of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1940,7 +1940,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the members of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2091,7 +2091,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the methods of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2163,7 +2163,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the nested type of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2224,7 +2224,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the nested types of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2283,7 +2283,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the properties of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2554,7 +2554,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + You can retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2862,7 +2862,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr and call on the returned . + As a workaround, to check if a custom attribute is defined for a finished type, retrieve the type using and call on the returned . ]]> @@ -4100,7 +4100,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati or and use reflection on the retrieved type. + You can retrieve the type using or and use reflection on the retrieved type. Use this handle to access the underlying metadata handle. diff --git a/xml/System.Reflection.Emit/EventToken.xml b/xml/System.Reflection.Emit/EventToken.xml index 6851727a84a..5af7717eb95 100644 --- a/xml/System.Reflection.Emit/EventToken.xml +++ b/xml/System.Reflection.Emit/EventToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/FieldBuilder.xml b/xml/System.Reflection.Emit/FieldBuilder.xml index ea6292017a6..6cc8870c6e4 100644 --- a/xml/System.Reflection.Emit/FieldBuilder.xml +++ b/xml/System.Reflection.Emit/FieldBuilder.xml @@ -80,10 +80,10 @@ , , or . + Get an instance of `FieldBuilder` by calling , , or . > [!NOTE] -> The method is currently not supported. As a workaround, retrieve the by reflecting on the finished type and call to set the value of the field. +> The method is currently not supported. As a workaround, retrieve the by reflecting on the finished type and call to set the value of the field. @@ -494,7 +494,7 @@ ## Remarks If the field is `static`, the `obj` parameter is ignored. For non-static fields, `obj` should be an instance of a class that inherits or declares the field. - The return type of is . For example, if the field holds a Boolean primitive value, an instance of with the appropriate Boolean value is returned. Before returning the value, checks to see if the user has access permission. + The return type of is . For example, if the field holds a Boolean primitive value, an instance of with the appropriate Boolean value is returned. Before returning the value, checks to see if the user has access permission. Access restrictions are ignored for fully-trusted code. `Private` constructors, methods, fields, and properties can be accessed and invoked using Reflection whenever the code is fully-trusted. @@ -1225,12 +1225,12 @@ For information on how to format `binaryAttribute`, see the metadata specificati ## Remarks This method will assign the `val` parameter to the field reflected by this instance on `obj`. If the field is static, `obj` will be ignored. For non-static fields, `obj` should be an instance of a class that inherits or declares the field. - The new value is passed as an . For example, if the field's type is Boolean, an instance of with the appropriate Boolean value is passed. Before setting the value, checks to see if the user has access permission. + The new value is passed as an . For example, if the field's type is Boolean, an instance of with the appropriate Boolean value is passed. Before setting the value, checks to see if the user has access permission. Access restrictions are ignored for fully-trusted code. `Private` constructors, methods, fields, and properties can be accessed and invoked using Reflection whenever the code is fully-trusted. > [!NOTE] -> This method is currently not supported. As a workaround, retrieve the by reflecting on the finished type and call to set the value of the field. +> This method is currently not supported. As a workaround, retrieve the by reflecting on the finished type and call to set the value of the field. ]]> diff --git a/xml/System.Reflection.Emit/FieldToken.xml b/xml/System.Reflection.Emit/FieldToken.xml index 143ef91dbfb..da3d7a27fcf 100644 --- a/xml/System.Reflection.Emit/FieldToken.xml +++ b/xml/System.Reflection.Emit/FieldToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/GenericTypeParameterBuilder.xml b/xml/System.Reflection.Emit/GenericTypeParameterBuilder.xml index 450df2776e9..ec45666656b 100644 --- a/xml/System.Reflection.Emit/GenericTypeParameterBuilder.xml +++ b/xml/System.Reflection.Emit/GenericTypeParameterBuilder.xml @@ -68,15 +68,15 @@ objects by using the method to add type parameters to a dynamic type, thus making it a generic type, or by using the method to add type parameters to a dynamic method. Use the objects to add constraints to the type parameters. Constraints are of three kinds: + You can get an array of objects by using the method to add type parameters to a dynamic type, thus making it a generic type, or by using the method to add type parameters to a dynamic method. Use the objects to add constraints to the type parameters. Constraints are of three kinds: -- The base type constraint specifies that any type assigned to the generic type parameter must derive from a particular base type. Set this constraint by using the method. +- The base type constraint specifies that any type assigned to the generic type parameter must derive from a particular base type. Set this constraint by using the method. -- An interface constraint specifies that any type assigned to the generic type parameter must implement a particular interface. Set the interface constraints by using the method. +- An interface constraint specifies that any type assigned to the generic type parameter must implement a particular interface. Set the interface constraints by using the method. -- Special constraints specify that any type assigned to the generic type parameter must have a parameterless constructor, must be a reference type, or must be a value type. Set the special constraints for a type parameter by using the method. +- Special constraints specify that any type assigned to the generic type parameter must have a parameterless constructor, must be a reference type, or must be a value type. Set the special constraints for a type parameter by using the method. - Interface constraints and special constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameters, you can use its object to reflect the constraints. Use the method to get the type parameters, and for each type parameter use the method to get the base type constraint and interface constraints, and the property to get the special constraints. + Interface constraints and special constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameters, you can use its object to reflect the constraints. Use the method to get the type parameters, and for each type parameter use the method to get the base type constraint and interface constraints, and the property to get the special constraints. @@ -292,7 +292,7 @@ method. + To set the base type constraint, use the method. ]]> @@ -3327,7 +3327,7 @@ method provides a way to generate array types for parameter lists. + The method provides a way to generate array types for parameter lists. @@ -3395,7 +3395,7 @@ method provides a way to generate array types for parameter lists. + The method provides a way to generate array types for parameter lists. @@ -3456,7 +3456,7 @@ method provides a way to generate `ref` types (`ByRef` in Visual Basic) for parameter lists. + The method provides a way to generate `ref` types (`ByRef` in Visual Basic) for parameter lists. @@ -3578,7 +3578,7 @@ method provides a way to generate pointer types for parameter lists. + The method provides a way to generate pointer types for parameter lists. @@ -3871,7 +3871,7 @@ ## Remarks To retrieve the base type constraint use the property. - Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameter and their constraints. To get the type parameters of a completed generic type, use the method. For each type parameter, get the base type constraint and interface constraints by using the method, and get the special constraints by using the property. + Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameter and their constraints. To get the type parameters of a completed generic type, use the method. For each type parameter, get the base type constraint and interface constraints by using the method, and get the special constraints by using the property. @@ -4125,7 +4125,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati ## Remarks Special constraints can specify that any type assigned to the generic type parameter must have a parameterless constructor, must be a reference type, or must be a value type. - Special constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameters and their constraints. To get the type parameters of a completed generic type, use the method. To get the special constraints for each type parameter, use the property. + Special constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameters and their constraints. To get the type parameters of a completed generic type, use the method. To get the special constraints for each type parameter, use the property. The enumeration values that refer to the variance characteristics of a type parameter are relevant only in languages that support covariance and contravariance, such as Microsoft intermediate language (MSIL). Visual Basic and C# currently do not support covariance and contravariance. @@ -4239,7 +4239,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati class. Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameters and their constraints. To get the type parameters of a completed generic type, use the method. For each type parameter, get the base type constraint and interface constraints by using the method. + Interface constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameters and their constraints. To get the type parameters of a completed generic type, use the method. For each type parameter, get the base type constraint and interface constraints by using the method. diff --git a/xml/System.Reflection.Emit/ILGenerator.xml b/xml/System.Reflection.Emit/ILGenerator.xml index 854f6da9615..88fa607d435 100644 --- a/xml/System.Reflection.Emit/ILGenerator.xml +++ b/xml/System.Reflection.Emit/ILGenerator.xml @@ -80,7 +80,7 @@ is used to generate method bodies for methods and constructors in dynamic assemblies (represented by the and classes) and for standalone dynamic methods (represented by the class). To obtain an , use the , , and methods. + is used to generate method bodies for methods and constructors in dynamic assemblies (represented by the and classes) and for standalone dynamic methods (represented by the class). To obtain an , use the , , and methods. MSIL is used as input to a just-in-time (JIT) compiler. @@ -484,7 +484,7 @@ are scoped until the corresponding is called. + This method is used to emit symbolic information. Local variables declared after are scoped until the corresponding is called. If the current is associated with a object, it does not support symbolic information. @@ -595,7 +595,7 @@ ## Remarks The local variable is created in the current lexical scope; for example, if code is being emitted in a `for` loop (`For` loop in Visual Basic), the scope of the variable is the loop. - A local variable created with this overload is not pinned. To create a pinned variable for use with unmanaged pointers, use the method overload. + A local variable created with this overload is not pinned. To create a pinned variable for use with unmanaged pointers, use the method overload. @@ -729,7 +729,7 @@ . Failure to do so will cause an when is called. + To set the position of the label within the stream, you must call . Failure to do so will cause an when is called. This is just a token and does not yet represent any particular location within the stream. @@ -1243,7 +1243,7 @@ ## Remarks The instruction values are defined in the `OpCodes` enumeration. - Labels are created using , and their location within the stream is fixed by using . If a single-byte instruction is used, the label can represent a jump of at most 127 bytes along the stream. `opcode` must represent a branch instruction. Because branches are relative instructions, `label` will be replaced with the correct offset to branch during the fixup process. + Labels are created using , and their location within the stream is fixed by using . If a single-byte instruction is used, the label can represent a jump of at most 127 bytes along the stream. `opcode` must represent a branch instruction. Because branches are relative instructions, `label` will be replaced with the correct offset to branch during the fixup process. @@ -1313,7 +1313,7 @@ The instruction values are defined in the `OpCodes` enumeration. - Labels are created using and their location within the stream is fixed by using . If a single-byte instruction is used, the label can represent a jump of at most 127 bytes along the stream. `opcode` must represent a branch instruction. Because branches are relative instructions, `label` will be replaced with the correct offset to branch during the fixup process. + Labels are created using and their location within the stream is fixed by using . If a single-byte instruction is used, the label can represent a jump of at most 127 bytes along the stream. `opcode` must represent a branch instruction. Because branches are relative instructions, `label` will be replaced with the correct offset to branch during the fixup process. ## Examples The code sample below illustrates the creation of a dynamic method with a jump table. The jump table is built using an array of . @@ -1897,11 +1897,11 @@ Puts a or instruction onto the Microsoft intermediate language (MSIL) stream to call a method. method is used to emit calls to `varargs` methods because there is no overload of the method that specifies the parameter types of the variable arguments. +The method is used to emit calls to `varargs` methods because there is no overload of the method that specifies the parameter types of the variable arguments. -To emit calls to methods that do not use the calling convention, use the method overload. +To emit calls to methods that do not use the calling convention, use the method overload. -The method does not throw an exception when optional parameter types are specified for a method that is not `varargs`. is thrown when the call is executed. +The method does not throw an exception when optional parameter types are specified for a method that is not `varargs`. is thrown when the call is executed. ]]> @@ -1997,12 +1997,12 @@ The following code example emits two methods, a `varargs` method and a method th to put a instruction onto the stream. Do not use . + Use to put a instruction onto the stream. Do not use . ## Examples - The following code sample demonstrates the contextual usage of the method to call an unmanaged type method external to the dynamic class. + The following code sample demonstrates the contextual usage of the method to call an unmanaged type method external to the dynamic class. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCalli/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/EmitCalli/source.vb" id="Snippet1"::: @@ -2095,7 +2095,7 @@ The following code example emits two methods, a `varargs` method and a method th to put a instruction onto the stream. Do not use . + Use to put a instruction onto the stream. Do not use . If `optionalParameterTypes` specifies optional arguments, `callingConvention` must include the flag. @@ -2167,12 +2167,12 @@ The following code example emits two methods, a `varargs` method and a method th method. + The type of `localBuilder` must match the parameter type of an overload of the method. ## Examples - The code sample below demonstrates the contextual usage of the method to write a string to the console in a dynamic method. + The code sample below demonstrates the contextual usage of the method to write a string to the console in a dynamic method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.vb" id="Snippet1"::: @@ -2240,12 +2240,12 @@ The following code example emits two methods, a `varargs` method and a method th method. + The type of `fld` must match the parameter type of an overload of the method. ## Examples - The following code sample demonstrates the use of the method to write a string to the console in a dynamic method. + The following code sample demonstrates the use of the method to write a string to the console in a dynamic method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.vb" id="Snippet1"::: @@ -2429,7 +2429,7 @@ The following code example emits two methods, a `varargs` method and a method th . + This method is used to emit symbolic information. It is used with . If the current is associated with a object, it does not support symbolic information. diff --git a/xml/System.Reflection.Emit/Label.xml b/xml/System.Reflection.Emit/Label.xml index 7a2447cf8c0..957ed07f107 100644 --- a/xml/System.Reflection.Emit/Label.xml +++ b/xml/System.Reflection.Emit/Label.xml @@ -302,7 +302,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -352,7 +352,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/LocalBuilder.xml b/xml/System.Reflection.Emit/LocalBuilder.xml index a7aa98c9bb0..deef4340db5 100644 --- a/xml/System.Reflection.Emit/LocalBuilder.xml +++ b/xml/System.Reflection.Emit/LocalBuilder.xml @@ -86,7 +86,7 @@ method. + A `LocalBuilder` object can be defined using the method. @@ -320,12 +320,12 @@ method is supported for methods defined in dynamic types. It is not supported for dynamic methods defined using the class. + The method is supported for methods defined in dynamic types. It is not supported for dynamic methods defined using the class. ## Examples - The following code sample illustrates the use of the method. This code is part of a larger example for the class. + The following code sample illustrates the use of the method. This code is part of a larger example for the class. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.vb" id="Snippet2"::: @@ -384,12 +384,12 @@ method is supported for methods defined in dynamic types. It is not supported for dynamic methods defined using the class. + The method is supported for methods defined in dynamic types. It is not supported for dynamic methods defined using the class. ## Examples - The following code sample illustrates the use of the method. This code is part of a larger example for the class. + The following code sample illustrates the use of the method. This code is part of a larger example for the class. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.vb" id="Snippet2"::: diff --git a/xml/System.Reflection.Emit/MethodBuilder.xml b/xml/System.Reflection.Emit/MethodBuilder.xml index e6654ad72d4..5d962a46414 100644 --- a/xml/System.Reflection.Emit/MethodBuilder.xml +++ b/xml/System.Reflection.Emit/MethodBuilder.xml @@ -155,10 +155,10 @@ The following example uses the class can be called several times, with each call specifying a security action (such as `Demand`, `Assert`, and `Deny`) and a set of permissions that the action applies to. + can be called several times, with each call specifying a security action (such as `Demand`, `Assert`, and `Deny`) and a set of permissions that the action applies to. > [!NOTE] -> In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a method by using the method are stored in the old XML metadata format. See Emitting Declarative Security Attributes. +> In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a method by using the method are stored in the old XML metadata format. See Emitting Declarative Security Attributes. @@ -312,7 +312,7 @@ The following example uses the class ## Remarks A always represents a generic method definition, and thus cannot be invoked. - For more information, see and . For information on generic types, see . + For more information, see and . For information on generic types, see . ]]> @@ -496,13 +496,13 @@ The following example uses the class method makes the current method generic. There is no way to undo this change. Calling this method a second time causes an . + Calling the method makes the current method generic. There is no way to undo this change. Calling this method a second time causes an . - The type parameters of the generic method can be retrieved later by using the method. + The type parameters of the generic method can be retrieved later by using the method. By convention, a type parameter name is a single uppercase letter. - For more information, see and . For information on generic types, see . + For more information, see and . For information on generic types, see . @@ -969,9 +969,9 @@ The following example uses the class method that is used to define them. + The type parameters of a generic method also are returned by the method that is used to define them. - For more information, see and . For information on generic types, see . + For more information, see and . For information on generic types, see . ]]> @@ -1025,7 +1025,7 @@ The following example uses the class ## Remarks A cannot be used to emit a constructed generic method directly. The emitted method is a generic method definition. - For more information, see and . For information on generic types, see . + For more information, see and . For information on generic types, see . ]]> @@ -1681,12 +1681,12 @@ The following example uses the class method to add type parameters. This change cannot be reversed. + A method is generic if it has type parameters. You can make a method generic by calling the method to add type parameters. This change cannot be reversed. ## Examples - The following code example displays the status of a method. This code is part of a larger example provided for the method. + The following code example displays the status of a method. This code is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet7"::: @@ -1744,7 +1744,7 @@ The following example uses the class ## Examples - The following code example displays the status of a method. This code is part of a larger example provided for the method. + The following code example displays the status of a method. This code is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet7"::: @@ -1791,7 +1791,7 @@ The following example uses the class , call the method on the completed type, and get the property on the resulting . + To determine whether a method in a dynamic assembly is security-critical, complete the type by calling , call the method on the completed type, and get the property on the resulting . ]]> @@ -1835,7 +1835,7 @@ The following example uses the class , call the method on the completed type, and get the property on the resulting . + To determine whether a method in a dynamic assembly is security-safe-critical, complete the type by calling , call the method on the completed type, and get the property on the resulting . ]]> @@ -1879,7 +1879,7 @@ The following example uses the class , call the method on the completed type, and get the property on the resulting . + To determine whether a method in a dynamic assembly is security-transparent, complete the type by calling , call the method on the completed type, and get the property on the resulting . ]]> @@ -1949,17 +1949,17 @@ The following example uses the class , before the enclosing type has been completed. You can use the method to create a for such a constructed method, and use the in the emitted call. + When you are emitting dynamic code, you might need to emit a call to a method constructed from the generic method definition represented by a , before the enclosing type has been completed. You can use the method to create a for such a constructed method, and use the in the emitted call. ## Examples The following code example creates a constructed method from an incomplete generic method definition in an incomplete type. - The example creates a transient assembly and module with a single type, adds a method `M`, and makes the method generic by adding a type parameter T using the method. The type parameter is used as the type of the method's parameter, and also as its return type. The generic method definition is not given a body, and the enclosing type is not completed. The method is then used to make the constructed method `M` (`M(Of String)` in Visual Basic). The example code has no output, because the subclass of returned by the method does not allow reflection over its parameters. + The example creates a transient assembly and module with a single type, adds a method `M`, and makes the method generic by adding a type parameter T using the method. The type parameter is used as the type of the method's parameter, and also as its return type. The generic method definition is not given a body, and the enclosing type is not completed. The method is then used to make the constructed method `M` (`M(Of String)` in Visual Basic). The example code has no output, because the subclass of returned by the method does not allow reflection over its parameters. > [!NOTE] -> For another code example that uses , see . is also used extensively when emitting code that uses generic types. See [How to: Define a Generic Method with Reflection Emit](/dotnet/framework/reflection-and-codedom/how-to-define-a-generic-method-with-reflection-emit). +> For another code example that uses , see . is also used extensively when emitting code that uses generic types. See [How to: Define a Generic Method with Reflection Emit](/dotnet/framework/reflection-and-codedom/how-to-define-a-generic-method-with-reflection-emit). :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/source.vb" id="Snippet1"::: @@ -2120,7 +2120,7 @@ The following example uses the class ## Remarks This property is provided as a convenience. It is equivalent to using the property to get the type in which the method is being declared, and then calling the property of the resulting object. - This property is also equivalent to calling . + This property is also equivalent to calling . ]]> @@ -2311,7 +2311,7 @@ The following example uses the class ## Remarks > [!NOTE] -> This member is inherited from the base class, . See . +> This member is inherited from the base class, . See . ]]> @@ -2359,7 +2359,7 @@ The following example uses the class after the containing has been created and invoked on the . + This method always returns `null`. Get the after the containing has been created and invoked on the . ]]> @@ -2427,7 +2427,7 @@ The following example uses the class method can interact with the method when the two methods are used in combination. See the Remarks section of the method for details. + The method can interact with the method when the two methods are used in combination. See the Remarks section of the method for details. ]]> @@ -2497,7 +2497,7 @@ The following example uses the class For information on how to format `binaryAttribute`, see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - The method can interact with the method when the two methods are used in combination. See the Remarks section of the method for details. + The method can interact with the method when the two methods are used in combination. See the Remarks section of the method for details. ]]> @@ -2597,11 +2597,11 @@ For information on how to format `binaryAttribute`, see the metadata specificati method in combination with the method, be aware of potential interactions. For example, using the method to add the attribute also sets the flag. If you subsequently call the method, the flag is overwritten. There are two ways to avoid this: + When you use the method in combination with the method, be aware of potential interactions. For example, using the method to add the attribute also sets the flag. If you subsequently call the method, the flag is overwritten. There are two ways to avoid this: -- Call the method before you call the method. The method always respects existing method implementation flags. +- Call the method before you call the method. The method always respects existing method implementation flags. -- When you set implementation flags, call the method to retrieve the existing flags, use bitwise OR to add your flag, and then call the method. +- When you set implementation flags, call the method to retrieve the existing flags, use bitwise OR to add your flag, and then call the method. @@ -2811,18 +2811,18 @@ For information on how to format `binaryAttribute`, see the metadata specificati method that accepts an array of parameter types. However, a generic method can have parameters whose types are specified by one or more of its own generic type parameters, which cannot be defined until after the method has been defined. Use this method to set the parameter types in that case. + If the number and types of the parameters are known when the method is defined, they can be set using any overload of the method that accepts an array of parameter types. However, a generic method can have parameters whose types are specified by one or more of its own generic type parameters, which cannot be defined until after the method has been defined. Use this method to set the parameter types in that case. - If the return type has optional or required custom modifiers, such as , use the method overload. + If the return type has optional or required custom modifiers, such as , use the method overload. - Calling this method replaces any parameter types that were set using the method. + Calling this method replaces any parameter types that were set using the method. ## Examples - The following code example uses the method to make a method generic. The method is used to give the method one parameter, whose type will be specified by the first generic type parameter. The method is used to give the method a return type, specified by the second generic type parameter. + The following code example uses the method to make a method generic. The method is used to give the method one parameter, whose type will be specified by the first generic type parameter. The method is used to give the method a return type, specified by the second generic type parameter. - This code is part of a larger example provided for the method. + This code is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet3"::: @@ -2888,16 +2888,16 @@ For information on how to format `binaryAttribute`, see the metadata specificati , use the method overload. + Use this method to set the return type of a generic method, when the return type is specified by one of the generic type parameters of the method. If the return type has optional or required custom modifiers, such as , use the method overload. - Calling this method replaces a return type established using the method. + Calling this method replaces a return type established using the method. ## Examples - The following code example uses the method to make a method generic. The method is used to give the method one parameter, whose type will be specified by the first generic type parameter. The method is used to give the method a return type, specified by the second generic type parameter. + The following code example uses the method to make a method generic. The method is used to give the method one parameter, whose type will be specified by the first generic type parameter. The method is used to give the method a return type, specified by the second generic type parameter. - This code is part of a larger example provided for the method. + This code is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet3"::: @@ -3008,18 +3008,18 @@ For information on how to format `binaryAttribute`, see the metadata specificati method that accepts an array of parameter types. However, a generic method can have parameters whose types are specified by one or more of its own generic type parameters, which cannot be defined until after the method has been defined. Use this method to set the parameter types in that case. + If the return type and the number and types of the parameters are known when the method is defined, they can be established using any overload of the method that accepts an array of parameter types. However, a generic method can have parameters whose types are specified by one or more of its own generic type parameters, which cannot be defined until after the method has been defined. Use this method to set the parameter types in that case. - If neither the return type nor the parameter types have optional or required custom modifiers, such as , you can use the and methods. + If neither the return type nor the parameter types have optional or required custom modifiers, such as , you can use the and methods. - Calling this method replaces the parameters and return type established using the method. + Calling this method replaces the parameters and return type established using the method. ## Examples The following code example contains source code for a generic class named Sample that has a type parameter `T`. The class has a field named `Field`, of type `T`, and a generic method `GM` with its own type parameter, `U`. Method `GM` creates an instance of Sample, substituting its own type parameter `U` for the type parameter of Sample, and stores its input parameter in `Field`. This source code is compiled but not used; you can view it with the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler), and compare it to the code emitted by class `Example`. - The code in class `Example` demonstrates the use of the method in emitting generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample`, and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added, and turned into a generic method using the method. The type parameter of `GM` is named `U`. Once the type parameter is defined, the signature of `GM` is added, using the method. There is no return type, and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`, which sets the type of the only parameter of the method; this is set to the method's type parameter, `U`. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. A dummy type is defined, to hold the entry point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. The method is used to create a for the static `GM` method of the constructed generic type `Sample`, and the method is then used to create a that can emitted in a method call. + The code in class `Example` demonstrates the use of the method in emitting generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample`, and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added, and turned into a generic method using the method. The type parameter of `GM` is named `U`. Once the type parameter is defined, the signature of `GM` is added, using the method. There is no return type, and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`, which sets the type of the only parameter of the method; this is set to the method's type parameter, `U`. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. A dummy type is defined, to hold the entry point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. The method is used to create a for the static `GM` method of the constructed generic type `Sample`, and the method is then used to create a that can emitted in a method call. When the code example is run, it saves the emitted assembly as TypeBuilderGetFieldExample.exe. You can run TypeBuilderGetFieldExample.exe, and you can use the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) to compare the emitted code with the code for the `Sample` class that is compiled into the code example itself. diff --git a/xml/System.Reflection.Emit/MethodToken.xml b/xml/System.Reflection.Emit/MethodToken.xml index c9ecec68940..a26d2936927 100644 --- a/xml/System.Reflection.Emit/MethodToken.xml +++ b/xml/System.Reflection.Emit/MethodToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/ModuleBuilder.xml b/xml/System.Reflection.Emit/ModuleBuilder.xml index 2bdd829b6a3..d1f31c354c9 100644 --- a/xml/System.Reflection.Emit/ModuleBuilder.xml +++ b/xml/System.Reflection.Emit/ModuleBuilder.xml @@ -80,12 +80,12 @@ , use the method. + To get an instance of , use the method. ## Examples - The following code sample demonstrates the use of `ModuleBuilder` to create a dynamic module. Note that the ModuleBuilder is created by calling in , rather than through a constructor. + The following code sample demonstrates the use of `ModuleBuilder` to create a dynamic module. Note that the ModuleBuilder is created by calling in , rather than through a constructor. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/Overview/modulebuilder.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/Overview/modulebuilder.vb" id="Snippet1"::: @@ -214,7 +214,7 @@ This method should be called when the user is done with defining all the global functions within this dynamic module. After calling this function, no more new global functions or new global data are allowed. ## Examples - The following sample illustrates the use of `CreateGlobalFunctions` to create a static global method from a implemented with . + The following sample illustrates the use of `CreateGlobalFunctions` to create a static global method from a implemented with . :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.vb" id="Snippet2"::: @@ -590,10 +590,10 @@ . + The global method that this method defines is not usable until you call . ## Examples - The following example illustrates the use of `DefineGlobalMethod` to create a type-independent method tied to the current . After building the global method, must be called in order to complete it. + The following example illustrates the use of `DefineGlobalMethod` to create a type-independent method tied to the current . After building the global method, must be called in order to complete it. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.vb" id="Snippet1"::: @@ -685,10 +685,10 @@ . + You cannot use the global method that this method defines until you call . ## Examples - The following code sample illustrates the use of `DefineGlobalMethod` to create a type-independent method tied to the current . After building the global method, must be called in order to complete it. + The following code sample illustrates the use of `DefineGlobalMethod` to create a type-independent method tied to the current . After building the global method, must be called in order to complete it. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.vb" id="Snippet1"::: @@ -813,7 +813,7 @@ ## Remarks This overload is provided for designers of managed compilers. - You cannot use the global method that this method defines until you call . ]]> + You cannot use the global method that this method defines until you call . ]]> The method is not static. That is, does not include . @@ -973,10 +973,10 @@ ## Remarks is automatically included in `attributes`. - The data defined by this method is not created until the method is called. + The data defined by this method is not created until the method is called. ## Examples - The following example uses the method to define an initialized data field in the `.sdata` section of the portable executable (PE) file. + The following example uses the method to define an initialized data field in the `.sdata` section of the portable executable (PE) file. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/modulebuilder_defineinitializeddata.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/modulebuilder_defineinitializeddata.vb" id="Snippet1"::: @@ -1069,18 +1069,18 @@ - This method allows you to embed a manifest resource BLOB into a dynamic assembly. -- To embed a managed resource into the manifest module of a dynamic assembly or into a satellite module, use the method to get a resource writer, and use the method to add the resource. +- To embed a managed resource into the manifest module of a dynamic assembly or into a satellite module, use the method to get a resource writer, and use the method to add the resource. -- To link a managed resource into a dynamic assembly, use the method to get a resource writer, and use the method to add the linked resource. +- To link a managed resource into a dynamic assembly, use the method to get a resource writer, and use the method to add the linked resource. -- To link a manifest resource BLOB into a dynamic assembly, use the method to add the linked resource. +- To link a manifest resource BLOB into a dynamic assembly, use the method to add the linked resource. - In addition, a single Win32 resource can be attached to an assembly by using the method or the method. This resource does not appear in the assembly manifest. + In addition, a single Win32 resource can be attached to an assembly by using the method or the method. This resource does not appear in the assembly manifest. ## Examples - The following example generates and saves a dynamic assembly named `EmittedManifestResourceAssembly.exe`, which contains an embedded unmanaged resource. The example creates the assembly, which consists of one module, and opens a memory stream to contain the unmanaged resource. The code then calls the method to define the resource. + The following example generates and saves a dynamic assembly named `EmittedManifestResourceAssembly.exe`, which contains an embedded unmanaged resource. The example creates the assembly, which consists of one module, and opens a memory stream to contain the unmanaged resource. The code then calls the method to define the resource. > [!NOTE] > You can use any kind of stream for your resource; for example, you can read the unmanaged binary data from a file. @@ -1211,7 +1211,7 @@ The following example illustrates the use of the `DefinePInvokeMethod` method to create a for an external unmanaged method, `MessageBoxA`, in the Windows API. The example displays a message box with **Retry** and **Cancel** buttons, and displays the return value from the message box. > [!IMPORTANT] -> To get a non-zero return value, you must add to the method implementation flags after you create the , by using the and methods. +> To get a non-zero return value, you must add to the method implementation flags after you create the , by using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.vb" id="Snippet1"::: @@ -1324,9 +1324,9 @@ The following example illustrates the use of the `DefinePInvokeMethod` method to create a for an external unmanaged method, `MessageBoxA`, in the Windows API. The example displays a message box with **Retry** and **Cancel** buttons, and displays the return value from the message box. > [!IMPORTANT] -> To get a non-zero return value, you must add to the method implementation flags after you create the , by using the and methods. +> To get a non-zero return value, you must add to the method implementation flags after you create the , by using the and methods. - This example uses a different overload of the method, but the technique is the same. + This example uses a different overload of the method, but the technique is the same. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.vb" id="Snippet1"::: @@ -1454,7 +1454,7 @@ ## Remarks The caller must not call the `ResourceWriter.Generate()` and `ResourceWriter.Close()` methods, because these methods are called by `ModuleBuilder.Save` when the dynamic assembly is written to disk. - Use this method to embed a managed resource. To embed a manifest resource blob, use the method. For a summary of embedding and linking managed resources and manifest resource blobs, see the method. + Use this method to embed a managed resource. To embed a manifest resource blob, use the method. For a summary of embedding and linking managed resources and manifest resource blobs, see the method. ## Examples The following example illustrates the use of `DefineResource` to add an external resource to the current . @@ -1515,7 +1515,7 @@ ## Remarks The caller must not call the `ResourceWriter.Generate()` and `ResourceWriter.Close()` methods, because these methods are called by `ModuleBuilder.Save` when the dynamic assembly is written to disk. - Use this method to embed a managed resource. To embed a manifest resource blob, use the method. For a summary of embedding and linking managed resources and manifest resource blobs, see the method. + Use this method to embed a managed resource. To embed a manifest resource blob, use the method. For a summary of embedding and linking managed resources and manifest resource blobs, see the method. ## Examples The following example illustrates the use of DefineResource to add an external resource to the current . @@ -2271,7 +2271,7 @@ ## Remarks is automatically included in `attributes`. - The data defined by this method is not created until the method is called. ]]> + The data defined by this method is not created until the method is called. ]]> The length of is zero. @@ -2614,7 +2614,7 @@ ## Examples - The following example demonstrates how to use to obtain the corresponding to a method that returns an array value. + The following example demonstrates how to use to obtain the corresponding to a method that returns an array value. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.vb" id="Snippet1"::: @@ -2729,12 +2729,12 @@ , except that it returns the token of the array method instead of the method itself. + This method is similar to , except that it returns the token of the array method instead of the method itself. ## Examples - The following example demonstrates how to use to obtain the corresponding to a method that returns an array value. + The following example demonstrates how to use to obtain the corresponding to a method that returns an array value. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.vb" id="Snippet2"::: @@ -2985,7 +2985,7 @@ and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods like and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. ]]> @@ -3048,10 +3048,10 @@ or methods. + When you emit dynamic assemblies, fields in the .sdata region of the portable executable (PE) file are defined by using the or methods. > [!IMPORTANT] -> Module-level fields cannot be retrieved until after the method has been called for the module. +> Module-level fields cannot be retrieved until after the method has been called for the module. ]]> @@ -3137,10 +3137,10 @@ or methods. + When you emit dynamic assemblies, fields in the .sdata region of the portable executable (PE) file are defined by using the or methods. > [!IMPORTANT] -> Module-level fields cannot be retrieved until after the method has been called for the module. +> Module-level fields cannot be retrieved until after the method has been called for the module. ]]> @@ -3299,10 +3299,10 @@ method. Use the inherited method to get methods that have been declared at the module level. Module-level methods are defined in emitted code by using the method. + This method provides the implementation for all overloads of the inherited method. Use the inherited method to get methods that have been declared at the module level. Module-level methods are defined in emitted code by using the method. > [!IMPORTANT] -> Module-level methods cannot be retrieved until after the method has been called for the module. +> Module-level methods cannot be retrieved until after the method has been called for the module. ]]> @@ -3423,10 +3423,10 @@ method. + Module-level methods are defined in emitted code by using the method. > [!IMPORTANT] -> Module-level methods cannot be retrieved until after the method has been called for the module. +> Module-level methods cannot be retrieved until after the method has been called for the module. ]]> @@ -3933,7 +3933,7 @@ , , and methods instead. ]]> + Do not use this method to generate array types, pointer types, or byref types. Use the , , and methods instead. ]]> Length of is zero or is greater than 1023. @@ -4010,7 +4010,7 @@ , , and methods instead. ]]> + Do not use this method to generate array types, pointer types, or byref types. Use the , , and methods instead. ]]> Length of is zero or is greater than 1023. @@ -4091,7 +4091,7 @@ ## Remarks The `throwOnError` parameter only affects what happens when the type is not found. It does not affect any other exceptions that might be thrown. In particular, if the type is found but cannot be loaded, can be thrown even if `throwOnError` is `false`. - Do not use this method to generate array types, pointer types, or byref types. Use the , , and methods instead. ]]> + Do not use this method to generate array types, pointer types, or byref types. Use the , , and methods instead. ]]> Length of is zero or is greater than 1023. @@ -4683,12 +4683,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -4769,12 +4769,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -4859,12 +4859,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericMethodArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericMethodArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -5065,12 +5065,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> diff --git a/xml/System.Reflection.Emit/OpCode.xml b/xml/System.Reflection.Emit/OpCode.xml index ca675b4b04f..8fbdffd1e08 100644 --- a/xml/System.Reflection.Emit/OpCode.xml +++ b/xml/System.Reflection.Emit/OpCode.xml @@ -412,7 +412,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -463,7 +463,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/OpCodes.xml b/xml/System.Reflection.Emit/OpCodes.xml index 9c5a1be5158..bad01e1e99a 100644 --- a/xml/System.Reflection.Emit/OpCodes.xml +++ b/xml/System.Reflection.Emit/OpCodes.xml @@ -153,9 +153,9 @@ |add|`*`|`int32`|`*`| |add|`*`|`native int`|`*`| - The following method overload can use the `add` opcode: + The following method overload can use the `add` opcode: -- +- ]]> @@ -243,9 +243,9 @@ |add|`*`|`int32`|`*`| |add|`*`|`native int`|`*`| - The following method overload can use the `add.ovf` opcode: + The following method overload can use the `add.ovf` opcode: -- +- ]]> @@ -333,9 +333,9 @@ |add|`*`|`int32`|`*`| |add|`*`|`native int`|`*`| - The following method overload can use the `add.ovf.un` opcode: + The following method overload can use the `add.ovf.un` opcode: -- +- ]]> @@ -404,9 +404,9 @@ `And` is an integer-specific operation. - The following method overload can use the `and` opcode: + The following method overload can use the `and` opcode: -- +- ]]> @@ -465,9 +465,9 @@ The `arglist` instruction returns an opaque handle (an unmanaged pointer, of type `native int`) that represents the argument list of the current method. This handle is valid only during the lifetime of the current method. You can, however, pass the handle to other methods as long as the current method is on the thread of control. You can only execute the `arglist` instruction within a method that takes a variable number of arguments. - The following method overload can use the `arglist` opcode: + The following method overload can use the `arglist` opcode: -- +- ]]> @@ -538,9 +538,9 @@ Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction (such transfers are severely restricted and must use the instruction instead). - The following method overload can use the `beq` opcode: + The following method overload can use the `beq` opcode: -- +- ]]> @@ -611,9 +611,9 @@ Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction (such transfers are severely restricted and must use the instruction instead). - The following method overload can use the `beq.s` opcode: + The following method overload can use the `beq.s` opcode: -- +- ]]> @@ -680,9 +680,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bge` opcode: + The following method overload can use the `bge` opcode: -- +- ]]> @@ -749,9 +749,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bge.s` opcode: + The following method overload can use the `bge.s` opcode: -- +- ]]> @@ -818,9 +818,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bge.un` opcode: + The following method overload can use the `bge.un` opcode: -- +- ]]> @@ -887,9 +887,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bge.un.s` opcode: + The following method overload can use the `bge.un.s` opcode: -- +- ]]> @@ -956,9 +956,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bgt` opcode: + The following method overload can use the `bgt` opcode: -- +- ]]> @@ -1025,9 +1025,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bgt.s` opcode: + The following method overload can use the `bgt.s` opcode: -- +- ]]> @@ -1094,9 +1094,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bgt.un` opcode: + The following method overload can use the `bgt.un` opcode: -- +- ]]> @@ -1163,9 +1163,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bgt.un.s` opcode: + The following method overload can use the `bgt.un.s` opcode: -- +- ]]> @@ -1232,9 +1232,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `ble` opcode: + The following method overload can use the `ble` opcode: -- +- ]]> @@ -1301,9 +1301,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `ble.s` opcode: + The following method overload can use the `ble.s` opcode: -- +- ]]> @@ -1370,9 +1370,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `ble.un` opcode: + The following method overload can use the `ble.un` opcode: -- +- ]]> @@ -1439,9 +1439,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `ble.un.s` opcode: + The following method overload can use the `ble.un.s` opcode: -- +- ]]> @@ -1508,9 +1508,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `blt` opcode: + The following method overload can use the `blt` opcode: -- +- ]]> @@ -1577,9 +1577,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `blt.s` opcode: + The following method overload can use the `blt.s` opcode: -- +- ]]> @@ -1646,9 +1646,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `blt.un` opcode: + The following method overload can use the `blt.un` opcode: -- +- ]]> @@ -1715,9 +1715,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `blt.un.s` opcode: + The following method overload can use the `blt.un.s` opcode: -- +- ]]> @@ -1784,9 +1784,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bne.un` opcode: + The following method overload can use the `bne.un` opcode: -- +- ]]> @@ -1853,9 +1853,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bne.un.s` opcode: + The following method overload can use the `bne.un.s` opcode: -- +- ]]> @@ -1930,9 +1930,9 @@ is thrown if the class cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) is converted to native code, rather than at runtime. - The following method overload can use the `box` opcode: + The following method overload can use the `box` opcode: -- +- ]]> @@ -1993,9 +1993,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `br` opcode: + The following method overload can use the `br` opcode: -- +- ]]> @@ -2056,9 +2056,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `br.s` opcode: + The following method overload can use the `br.s` opcode: -- +- ]]> @@ -2121,9 +2121,9 @@ The `break` instruction can trap to a debugger, do nothing, or raise a security exception. The exact behavior is implementation-defined. - The following method overload can use the `break` opcode: + The following method overload can use the `break` opcode: -- +- ]]> @@ -2190,9 +2190,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `brfalse` opcode: + The following method overload can use the `brfalse` opcode: -- +- ]]> @@ -2259,9 +2259,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `brfalse.s` opcode: + The following method overload can use the `brfalse.s` opcode: -- +- ]]> @@ -2330,9 +2330,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `brtrue` opcode: + The following method overload can use the `brtrue` opcode: -- +- ]]> @@ -2401,9 +2401,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `brtrue.s` opcode: + The following method overload can use the `brtrue.s` opcode: -- +- ]]> @@ -2481,16 +2481,16 @@ > [!NOTE] > When calling methods of System.Object on value types, consider using the `constrained` prefix with the `callvirt` instruction instead of emitting a `call` instruction. This removes the need to emit different IL depending on whether or not the value type overrides the method, avoiding a potential versioning problem. Consider using the `constrained` prefix when invoking interface methods on value types, since the value type method implementing the interface method can be changed using a `MethodImpl`. These issues are described in more detail in the opcode. - The following method overloads can use the `call` opcode: + The following method overloads can use the `call` opcode: -- +- -- +- -- +- > [!NOTE] -> The method is provided for `varargs` calls. Use the method for normal calls. +> The method is provided for `varargs` calls. Use the method for normal calls. ]]> @@ -2565,11 +2565,11 @@ may be thrown if the system security does not grant the caller access to the called method. The security check can occur when the Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at runtime. - The following methods can be used to perform a `calli` instruction on the stack. Note that `calli` should be called through the below methods rather than using the class to place the instruction directly on the stack. + The following methods can be used to perform a `calli` instruction on the stack. Note that `calli` should be called through the below methods rather than using the class to place the instruction directly on the stack. -- for calls using a managed calling convention. +- for calls using a managed calling convention. -- for calls using an unmanaged calling convention. +- for calls using an unmanaged calling convention. ]]> @@ -2653,11 +2653,11 @@ > [!NOTE] > When calling methods of System.Object on value types, consider using the `constrained` prefix with the `callvirt` instruction. This removes the need to emit different IL depending on whether or not the value type overrides the method, avoiding a potential versioning problem. Consider using the `constrained` prefix when invoking interface methods on value types, since the value type method implementing the interface method can be changed using a `MethodImpl`. These issues are described in more detail in the opcode. - The following method overload can use the `callvirt` opcode: + The following method overload can use the `callvirt` opcode: -- +- -- +- ]]> @@ -2732,9 +2732,9 @@ is thrown if class cannot be found. This is typically detected when a Microsoft Intermediate Language (MSIL) instruction is converted to native code rather than at runtime. - The following method overload can use the `castclass` opcode: + The following method overload can use the `castclass` opcode: -- +- ]]> @@ -2803,9 +2803,9 @@ For floating-point number, `ceq` will return 0 if the numbers are unordered (either or both are NaN). The infinite values are equal to themselves. - The following method overload can use the `ceq` opcode: + The following method overload can use the `ceq` opcode: -- +- ]]> @@ -2874,9 +2874,9 @@ - For floating-point numbers, `cgt` returns 0 if the numbers are unordered (that is, if one or both of the arguments are NaN). - The following method overload can use the `cgt` opcode: + The following method overload can use the `cgt` opcode: -- +- ]]> @@ -2949,9 +2949,9 @@ Otherwise an `int32` value of 0 is pushed on the stack. - The following method overload can use the `cgt.un` opcode: + The following method overload can use the `cgt.un` opcode: -- +- ]]> @@ -3020,9 +3020,9 @@ Note that a special exception or a derived class of may be more appropriate, passing the incorrect value to the exception handler. - The following method overload can use the `ckfinite` opcode: + The following method overload can use the `ckfinite` opcode: -- +- ]]> @@ -3091,9 +3091,9 @@ - For floating-point numbers, `clt` returns 0 if the numbers are unordered (that is, if one or both of the arguments are NaN). - The following method overload can use the `clt` opcode: + The following method overload can use the `clt` opcode: -- +- ]]> @@ -3168,9 +3168,9 @@ Otherwise, an `int32` value of 0 is pushed on the stack. - The following method overload can use the `clt.un` opcode: + The following method overload can use the `clt.un` opcode: -- +- ]]> @@ -3252,9 +3252,9 @@ The `constrained` prefix can also be used for invocation of interface methods on value types, because the value type method implementing the interface method can be changed using a `MethodImpl`. If the `constrained` prefix is not used, the compiler is forced to choose which of the value type's methods to bind to at compile time. Using the `constrained` prefix allows the MSIL to bind to the method that implements the interface method at run time, rather than at compile time. - The following method overload can use the `constrained` opcode: + The following method overload can use the `constrained` opcode: -- +- ]]> @@ -3325,9 +3325,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i` opcode: + The following method overload can use the `conv.i` opcode: -- +- ]]> @@ -3398,9 +3398,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i1` opcode: + The following method overload can use the `conv.i1` opcode: -- +- ]]> @@ -3471,9 +3471,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i2` opcode: + The following method overload can use the `conv.i2` opcode: -- +- ]]> @@ -3544,9 +3544,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i4` opcode: + The following method overload can use the `conv.i4` opcode: -- +- ]]> @@ -3617,9 +3617,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i8` opcode: + The following method overload can use the `conv.i8` opcode: -- +- ]]> @@ -3688,9 +3688,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i` opcode: + The following method overload can use the `conv.ovf.i` opcode: -- +- ]]> @@ -3759,9 +3759,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i.un` opcode: + The following method overload can use the `conv.ovf.i.un` opcode: -- +- ]]> @@ -3830,9 +3830,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i1` opcode: + The following method overload can use the `conv.ovf.i1` opcode: -- +- ]]> @@ -3901,9 +3901,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i1.un` opcode: + The following method overload can use the `conv.ovf.i1.un` opcode: -- +- ]]> @@ -3972,9 +3972,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i2` opcode: + The following method overload can use the `conv.ovf.i2` opcode: -- +- ]]> @@ -4043,9 +4043,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i2.un` opcode: + The following method overload can use the `conv.ovf.i2.un` opcode: -- +- ]]> @@ -4114,9 +4114,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i4` opcode: + The following method overload can use the `conv.ovf.i4` opcode: -- +- ]]> @@ -4185,9 +4185,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i4.un` opcode: + The following method overload can use the `conv.ovf.i4.un` opcode: -- +- ]]> @@ -4256,9 +4256,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i8` opcode: + The following method overload can use the `conv.ovf.i8` opcode: -- +- ]]> @@ -4327,9 +4327,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i8.un` opcode: + The following method overload can use the `conv.ovf.i8.un` opcode: -- +- ]]> @@ -4398,9 +4398,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u` opcode: + The following method overload can use the `conv.ovf.u` opcode: -- +- ]]> @@ -4469,9 +4469,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.uvf.u.un` opcode: + The following method overload can use the `conv.uvf.u.un` opcode: -- +- ]]> @@ -4540,9 +4540,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u1` opcode: + The following method overload can use the `conv.ovf.u1` opcode: -- +- ]]> @@ -4611,9 +4611,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u1.un` opcode: + The following method overload can use the `conv.ovf.u1.un` opcode: -- +- ]]> @@ -4682,9 +4682,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u2` opcode: + The following method overload can use the `conv.ovf.u2` opcode: -- +- ]]> @@ -4753,9 +4753,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u2.un` opcode: + The following method overload can use the `conv.ovf.u2.un` opcode: -- +- ]]> @@ -4824,9 +4824,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u4` opcode: + The following method overload can use the `conv.ovf.u4` opcode: -- +- ]]> @@ -4895,9 +4895,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u4.un` opcode: + The following method overload can use the `conv.ovf.u4.un` opcode: -- +- ]]> @@ -4966,9 +4966,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u8` opcode: + The following method overload can use the `conv.ovf.u8` opcode: -- +- ]]> @@ -5037,9 +5037,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u8.un` opcode: + The following method overload can use the `conv.ovf.u8.un` opcode: -- +- ]]> @@ -5110,9 +5110,9 @@ No exceptions are ever thrown when using this field. - The following method overload can use the `conv.r.un` opcode: + The following method overload can use the `conv.r.un` opcode: -- +- ]]> @@ -5183,9 +5183,9 @@ No exceptions are ever thrown when using this field. - The following method overload can use the `conv.r4` opcode: + The following method overload can use the `conv.r4` opcode: -- +- ]]> @@ -5256,9 +5256,9 @@ No exceptions are ever thrown when using this field. - The following method overload can use the `conv.r8` opcode: + The following method overload can use the `conv.r8` opcode: -- +- ]]> @@ -5329,9 +5329,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u` opcode: + The following method overload can use the `conv.u` opcode: -- +- ]]> @@ -5402,9 +5402,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u1` opcode: + The following method overload can use the `conv.u1` opcode: -- +- ]]> @@ -5475,9 +5475,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u2` opcode: + The following method overload can use the `conv.u2` opcode: -- +- ]]> @@ -5548,9 +5548,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u4` opcode: + The following method overload can use the `conv.u4` opcode: -- +- ]]> @@ -5621,9 +5621,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u8` opcode: + The following method overload can use the `conv.u8` opcode: -- +- ]]> @@ -5696,9 +5696,9 @@ may be thrown if an invalid address is detected. - The following method overload can use the `cpblk` opcode: + The following method overload can use the `cpblk` opcode: -- +- ]]> @@ -5765,9 +5765,9 @@ may be thrown if an invalid address is detected. - The following method overload can use the `cpobj` opcode: + The following method overload can use the `cpobj` opcode: -- +- ]]> @@ -5852,9 +5852,9 @@ Note that on Intel-based platforms an is thrown when computing (minint div -1). Floating-point operations never throw an exception (they produce NaNs or infinities instead). - The following method overload can use the `div` opcode: + The following method overload can use the `div` opcode: -- +- ]]> @@ -5921,9 +5921,9 @@ The `div.un` instruction computes `value1` divided by `value2`, both taken as unsigned integers, and pushes the `result` on the stack. - The following method overload can use the `div.un` opcode: + The following method overload can use the `div.un` opcode: -- +- ]]> @@ -5990,9 +5990,9 @@ The `dup` instruction duplicates the top element of the stack, and leaves two identical values atop it. - The following method overload can use the `dup` opcode: + The following method overload can use the `dup` opcode: -- +- ]]> @@ -6065,9 +6065,9 @@ Control cannot be transferred into a filter block except through the exception mechanism. Control cannot be transferred out of a filter block except through the use of a `throw` instruction or by executing the final `endfilter` instruction. You cannot embed a `try` block within a `filter` block. If an exception is thrown inside the `filter` block, it is intercepted and a value of 0 (`exception_continue_search`) is returned. - The following method overload can use the `endfilter` opcode: + The following method overload can use the `endfilter` opcode: -- +- ]]> @@ -6132,9 +6132,9 @@ Note that the `endfault` and `endfinally` instructions are aliases - they correspond to the same opcode. - The following method overload can use the `endfinally` (`endfault`) opcode, as well as the `ILGenerator` method . + The following method overload can use the `endfinally` (`endfault`) opcode, as well as the `ILGenerator` method . -- +- - @@ -6207,9 +6207,9 @@ may be thrown if an invalid address is detected. - The following method overload can use the `initblk` opcode: + The following method overload can use the `initblk` opcode: -- +- ]]> @@ -6274,9 +6274,9 @@ Unlike , `initobj` does not call the constructor method. `Initobj` is intended for initializing value types, while `newobj` is used to allocate and initialize objects. - The following method overload can use the `initobj` opcode: + The following method overload can use the `initobj` opcode: -- +- ]]> @@ -6343,9 +6343,9 @@ is thrown if class cannot be found. This is typically detected when the Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at runtime. - The following method overload can use the `isinst` opcode: + The following method overload can use the `isinst` opcode: -- +- ]]> @@ -6408,9 +6408,9 @@ The `jmp` instruction cannot be used to transferred control out of a `try`, `filter`, `catch`, or `finally` block. - The following method overload can use the `jmp` opcode: + The following method overload can use the `jmp` opcode: -- +- ]]> @@ -6475,9 +6475,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg` opcode: + The following method overload can use the `ldarg` opcode: -- +- ]]> @@ -6542,9 +6542,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.0` opcode: + The following method overload can use the `ldarg.0` opcode: -- +- ]]> @@ -6609,9 +6609,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.1` opcode: + The following method overload can use the `ldarg.1` opcode: -- +- ]]> @@ -6676,9 +6676,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.2` opcode: + The following method overload can use the `ldarg.2` opcode: -- +- ]]> @@ -6743,9 +6743,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.3` opcode: + The following method overload can use the `ldarg.3` opcode: -- +- ]]> @@ -6812,9 +6812,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.s` opcode: + The following method overload can use the `ldarg.s` opcode: -- +- ]]> @@ -6879,9 +6879,9 @@ `ldarga` is used for by-ref parameter passing. For other cases, and should be used. - The following method overload can use the `ldarga` opcode: + The following method overload can use the `ldarga` opcode: -- +- ]]> @@ -6948,9 +6948,9 @@ `ldarga.s` is used for by-ref parameter passing. For other cases, and should be used. - The following method overload can use the `ldarga.s` opcode: + The following method overload can use the `ldarga.s` opcode: -- +- ]]> @@ -7017,9 +7017,9 @@ 3. Use a short form instruction followed by a for constants that can be expressed in 8 or fewer bits. - The following method overload can use the `ldc.i4` opcode: + The following method overload can use the `ldc.i4` opcode: -- +- ]]> @@ -7080,9 +7080,9 @@ This is a special short encoding for the push of the integer value 0. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.0` opcode: + The following method overload can use the `ldc.i4.0` opcode: -- +- ]]> @@ -7143,9 +7143,9 @@ This is a special short encoding for the push of the integer value 1. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.1` opcode: + The following method overload can use the `ldc.i4.1` opcode: -- +- ]]> @@ -7206,9 +7206,9 @@ This is a special short encoding for the push of the integer value 2. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.2` opcode: + The following method overload can use the `ldc.i4.2` opcode: -- +- ]]> @@ -7269,9 +7269,9 @@ This is a special short encoding for the push of the integer value 3. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.3` opcode: + The following method overload can use the `ldc.i4.3` opcode: -- +- ]]> @@ -7332,9 +7332,9 @@ This is a special short encoding for the push of the integer value 4. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.4` opcode: + The following method overload can use the `ldc.i4.4` opcode: -- +- ]]> @@ -7395,9 +7395,9 @@ This is a special short encoding for the push of the integer value 5. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.5` opcode: + The following method overload can use the `ldc.i4.5` opcode: -- +- ]]> @@ -7458,9 +7458,9 @@ This is a special short encoding for the push of the integer value 6. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.6` opcode: + The following method overload can use the `ldc.i4.6` opcode: -- +- ]]> @@ -7521,9 +7521,9 @@ This is a special short encoding for the push of the integer value 7. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.7` opcode: + The following method overload can use the `ldc.i4.7` opcode: -- +- ]]> @@ -7584,9 +7584,9 @@ This is a special short encoding for the push of the integer value 8. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.8` opcode: + The following method overload can use the `ldc.i4.8` opcode: -- +- ]]> @@ -7647,9 +7647,9 @@ This is a special short encoding for the push of the integer value -1. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.m1` opcode: + The following method overload can use the `ldc.i4.m1` opcode: -- +- ]]> @@ -7710,7 +7710,7 @@ `ldc.i4.s` is a more efficient encoding for pushing the integers from -128 to 127 onto the evaluation stack. -The following method overloads can use the `ldc.i4.s` opcode: +The following method overloads can use the `ldc.i4.s` opcode: - - @@ -7774,9 +7774,9 @@ The following method overloads c This encoding pushes an `int64` value onto the stack. - The following method overload can use the `ldc.i8` opcode: + The following method overload can use the `ldc.i8` opcode: -- +- ]]> @@ -7837,9 +7837,9 @@ The following method overloads c This encoding pushes a `float32` value onto the stack. - The following method overload can use the `ldc.r4` opcode: + The following method overload can use the `ldc.r4` opcode: -- +- ]]> @@ -7900,9 +7900,9 @@ The following method overloads c This encoding pushes a `float64` value onto the stack. - The following method overload can use the `ldc.r8` opcode: + The following method overload can use the `ldc.r8` opcode: -- +- ]]> @@ -7974,9 +7974,9 @@ The following method overloads c is thrown if `index` is negative, or larger than the upper bound of `array`. - The following method overload can use the `ldelem` opcode: + The following method overload can use the `ldelem` opcode: -- +- ]]> @@ -8053,9 +8053,9 @@ The following method overloads c is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i` opcode: + The following method overload can use the `ldelem.i` opcode: -- +- ]]> @@ -8132,9 +8132,9 @@ The following method overloads c is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i1` opcode: + The following method overload can use the `ldelem.i1` opcode: -- +- ]]> @@ -8211,9 +8211,9 @@ The following method overloads c is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i2` opcode: + The following method overload can use the `ldelem.i2` opcode: -- +- ]]> @@ -8290,9 +8290,9 @@ The following method overloads c is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i4` opcode: + The following method overload can use the `ldelem.i4` opcode: -- +- ]]> @@ -8369,9 +8369,9 @@ The following method overloads c is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i8` opcode: + The following method overload can use the `ldelem.i8` opcode: -- +- ]]> @@ -8448,9 +8448,9 @@ The following method overloads c is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.r4` opcode: + The following method overload can use the `ldelem.r4` opcode: -- +- ]]> @@ -8527,9 +8527,9 @@ The following method overloads c is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.r8` opcode: + The following method overload can use the `ldelem.r8` opcode: -- +- ]]> @@ -8604,9 +8604,9 @@ The following method overloads c is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.ref` opcode: + The following method overload can use the `ldelem.ref` opcode: -- +- ]]> @@ -8683,9 +8683,9 @@ The following method overloads c is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.u1` opcode: + The following method overload can use the `ldelem.u1` opcode: -- +- ]]> @@ -8762,9 +8762,9 @@ The following method overloads c is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.u2` opcode: + The following method overload can use the `ldelem.u2` opcode: -- +- ]]> @@ -8841,9 +8841,9 @@ The following method overloads c is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.u4` opcode: + The following method overload can use the `ldelem.u4` opcode: -- +- ]]> @@ -8920,9 +8920,9 @@ The following method overloads c is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelema` opcode: + The following method overload can use the `ldelema` opcode: -- +- ]]> @@ -8993,9 +8993,9 @@ The following method overloads c is thrown if the specified field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at run time. - The following method overload can use the `ldfld` opcode: + The following method overload can use the `ldfld` opcode: -- +- ]]> @@ -9070,9 +9070,9 @@ The following method overloads c is thrown if the specified field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at run time. - The following method overload can use the `ldflda` opcode: + The following method overload can use the `ldflda` opcode: -- +- ]]> @@ -9135,9 +9135,9 @@ The following method overloads c The value returned points to native code using the CLR calling convention. This method pointer should not be passed to unmanaged native code as a callback routine. - The following method overload can use the `ldftn` opcode: + The following method overload can use the `ldftn` opcode: -- +- ]]> @@ -9212,9 +9212,9 @@ The following method overloads c can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i` opcode: + The following method overload can use the `ldind.i` opcode: -- +- ]]> @@ -9289,9 +9289,9 @@ The following method overloads c can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i1` opcode: + The following method overload can use the `ldind.i1` opcode: -- +- ]]> @@ -9366,9 +9366,9 @@ The following method overloads c can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i2` opcode: + The following method overload can use the `ldind.i2` opcode: -- +- ]]> @@ -9443,9 +9443,9 @@ The following method overloads c can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i4` opcode: + The following method overload can use the `ldind.i4` opcode: -- +- ]]> @@ -9520,9 +9520,9 @@ The following method overloads c can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i8` opcode: + The following method overload can use the `ldind.i8` opcode: -- +- ]]> @@ -9597,9 +9597,9 @@ The following method overloads c can be thrown if an invalid address is detected. - The following method overload can use the `ldind.r4` opcode: + The following method overload can use the `ldind.r4` opcode: -- +- ]]> @@ -9674,9 +9674,9 @@ The following method overloads c can be thrown if an invalid address is detected. - The following method overload can use the `ldind.r8` opcode: + The following method overload can use the `ldind.r8` opcode: -- +- ]]> @@ -9751,9 +9751,9 @@ The following method overloads c can be thrown if an invalid address is detected. - The following method overload can use the `ldind.ref` opcode: + The following method overload can use the `ldind.ref` opcode: -- +- ]]> @@ -9828,9 +9828,9 @@ The following method overloads c can be thrown if an invalid address is detected. - The following method overload can use the `ldind.u1` opcode: + The following method overload can use the `ldind.u1` opcode: -- +- ]]> @@ -9905,9 +9905,9 @@ The following method overloads c can be thrown if an invalid address is detected. - The following method overload can use the `ldind.u2` opcode: + The following method overload can use the `ldind.u2` opcode: -- +- ]]> @@ -9982,9 +9982,9 @@ The following method overloads c can be thrown if an invalid address is detected. - The following method overload can use the `ldind.u4` opcode: + The following method overload can use the `ldind.u4` opcode: -- +- ]]> @@ -10051,9 +10051,9 @@ The following method overloads c is thrown if the array reference is a null reference. - The following method overload can use the `ldlen` opcode: + The following method overload can use the `ldlen` opcode: -- +- ]]> @@ -10118,11 +10118,11 @@ The following method overloads c The type of the value is the same as the type of the local variable, which is specified in the method header. See Partition I. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overloads can use the `ldloc` opcode: + The following method overloads can use the `ldloc` opcode: -- +- -- +- ]]> @@ -10185,9 +10185,9 @@ The following method overloads c The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldloc.0` opcode: + The following method overload can use the `ldloc.0` opcode: -- +- ]]> @@ -10250,9 +10250,9 @@ The following method overloads c The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldloc.1` opcode: + The following method overload can use the `ldloc.1` opcode: -- +- ]]> @@ -10315,9 +10315,9 @@ The following method overloads c The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldloc.2` opcode: + The following method overload can use the `ldloc.2` opcode: -- +- ]]> @@ -10380,9 +10380,9 @@ The following method overloads c The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldloc.3` opcode: + The following method overload can use the `ldloc.3` opcode: -- +- ]]> @@ -10445,11 +10445,11 @@ The following method overloads c The type of the value is the same as the type of the local variable, which is specified in the method header. See Partition I. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overloads can use the `ldloc.s` opcode: + The following method overloads can use the `ldloc.s` opcode: -- +- -- +- ]]> @@ -10510,9 +10510,9 @@ The following method overloads c The `ldloca` instruction pushes the address of the local variable number at the passed index onto the stack, where local variables are numbered 0 onwards. The value pushed on the stack is already aligned correctly for use with instructions like and . The result is a managed pointer (type `&`). The local variable is stored in unmanaged memory, so the return value can be converted to an unmanaged pointer without pinning. - The following method overload can use the `ldloca` opcode: + The following method overload can use the `ldloca` opcode: -- +- ]]> @@ -10575,9 +10575,9 @@ The following method overloads c The `ldloca.s` instruction provides an efficient encoding for use with the local variables 0 through 255. - The following method overload can use the `ldloca.s` opcode: + The following method overload can use the `ldloca.s` opcode: -- +- ]]> @@ -10640,9 +10640,9 @@ The following method overloads c `ldnull` provides a null reference that is size-independent. - The following method overload can use the `ldnull` opcode: + The following method overload can use the `ldnull` opcode: -- +- ]]> @@ -10713,9 +10713,9 @@ The following method overloads c is thrown if class cannot be found. This is typically detected when the Microsoft Intermediate Language (MSIL) instruction is converted to native code rather than at runtime. - The following method overload can use the `ldobj` opcode: + The following method overload can use the `ldobj` opcode: -- +- ]]> @@ -10778,9 +10778,9 @@ The following method overloads c The `ldsfld` instruction can have a prefix. - The following method overload can use the `ldsfld` opcode: + The following method overload can use the `ldsfld` opcode: -- +- ]]> @@ -10845,9 +10845,9 @@ The following method overloads c is thrown if field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at runtime. - The following method overload can use the `ldsflda` opcode: + The following method overload can use the `ldsflda` opcode: -- +- ]]> @@ -10910,9 +10910,9 @@ The following method overloads c The Common Language Infrastructure (CLI) guarantees that the result of two `ldstr` instructions referring to two metadata tokens that have the same sequence of characters return precisely the same string object (a process known as "string interning"). - The following method overload can use the `ldstr` opcode: + The following method overload can use the `ldstr` opcode: -- +- ]]> @@ -10977,13 +10977,13 @@ The following method overloads c For information on runtime handles, see the following classes: , , and . - The following method overloads can use the `ldtoken` opcode: + The following method overloads can use the `ldtoken` opcode: -- +- -- +- -- +- ]]> @@ -11050,9 +11050,9 @@ The following method overloads c The unmanaged pointer points to native code using the CLR calling convention. This method pointer should not be passed to unmanaged native code as a callback routine. - The following method overload can use the `ldvirtftn` opcode: + The following method overload can use the `ldvirtftn` opcode: -- +- ]]> @@ -11117,9 +11117,9 @@ The following method overloads c If an instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. - The following method overloads can use the `leave` opcode: + The following method overloads can use the `leave` opcode: -- +- ]]> @@ -11184,9 +11184,9 @@ The following method overloads c If an instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. - The following method overload can use the `leave.s` opcode: + The following method overload can use the `leave.s` opcode: -- +- ]]> @@ -11257,9 +11257,9 @@ The following method overloads c is thrown if there is insufficient memory to service the request. - The following method overload can use the `localloc` opcode: + The following method overload can use the `localloc` opcode: -- +- ]]> @@ -11328,9 +11328,9 @@ The following method overloads c is thrown if `class` cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at runtime. - The following method overload can use the `mkrefany` opcode: + The following method overload can use the `mkrefany` opcode: -- +- ]]> @@ -11401,9 +11401,9 @@ The following method overloads c For floating-point types, 0 * infinity = NaN. - The following method overload can use the `mul` opcode: + The following method overload can use the `mul` opcode: -- +- ]]> @@ -11472,9 +11472,9 @@ The following method overloads c is thrown if the result can not be represented in the result type. - The following method overload can use the `mul.ovf` opcode: + The following method overload can use the `mul.ovf` opcode: -- +- ]]> @@ -11543,9 +11543,9 @@ The following method overloads c is thrown if the result can not be represented in the result type. - The following method overload can use the `mul.ovf.un` opcode: + The following method overload can use the `mul.ovf.un` opcode: -- +- ]]> @@ -11614,9 +11614,9 @@ The following method overloads c Negating a floating-point number cannot overflow, and negating NaN returns NaN. - The following method overload can use the `neg` opcode: + The following method overload can use the `neg` opcode: -- +- ]]> @@ -11691,9 +11691,9 @@ The following method overloads c is thrown if `numElems` is less than 0. - The following method overload can use the `newarr` opcode: + The following method overload can use the `newarr` opcode: -- +- ]]> @@ -11770,9 +11770,9 @@ The following method overloads c is thrown if a constructor method `ctor` with the indicated name, class and signature could not be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code, rather than at runtime. - The following method overload can use the `newobj` opcode: + The following method overload can use the `newobj` opcode: -- +- ]]> @@ -11831,9 +11831,9 @@ The following method overloads c The `nop` operation does nothing. It is intended to fill in space if opcodes are patched. - The following method overload can use the `nop` opcode: + The following method overload can use the `nop` opcode: -- +- ]]> @@ -11898,9 +11898,9 @@ The following method overloads c The `not` instruction computes the bitwise complement of an integer value and pushes the result onto the stack. The return type is the same as the operand type. - The following method overload can use the `not` opcode: + The following method overload can use the `not` opcode: -- +- ]]> @@ -11969,9 +11969,9 @@ The following method overloads c `Or` is an integer-specific operation. - The following method overload can use the `or` opcode: + The following method overload can use the `or` opcode: -- +- ]]> @@ -12032,9 +12032,9 @@ The following method overloads c The `pop` instruction removes the top element from the stack. - The following method overload can use the `pop` opcode: + The following method overload can use the `pop` opcode: -- +- ]]> @@ -12460,9 +12460,9 @@ callvirt m In general it would be unsafe to skip the run-time check if the array held elements of a reference type. To be safe, it is necessary to ensure that no modifications to the array are made through this pointer. The verifier rules ensure this. The restricted managed pointer can be passed as the object of instance method calls, so it is not strictly speaking read-only for value types, but there is no type safety problem for value types. - The following method overload can use the `readonly` opcode: + The following method overload can use the `readonly` opcode: -- +- ]]> @@ -12529,9 +12529,9 @@ callvirt m The `refanytype` instruction retrieves the type token embedded in the typed reference. See the instruction for information on creating typed references. - The following method overload can use the `refanytype` opcode: + The following method overload can use the `refanytype` opcode: -- +- ]]> @@ -12602,9 +12602,9 @@ callvirt m is thrown if `type` cannot be found. - The following method overload can use the `refanyval` opcode: + The following method overload can use the `refanyval` opcode: -- +- ]]> @@ -12682,9 +12682,9 @@ callvirt m Note that on the Intel-based platforms an is thrown when computing (minint `rem` -1). - The following method overload can use the `rem` opcode: + The following method overload can use the `rem` opcode: -- +- ]]> @@ -12761,9 +12761,9 @@ callvirt m Integral operations throw if `value2` is zero. - The following method overload can use the `rem.un` opcode: + The following method overload can use the `rem.un` opcode: -- +- ]]> @@ -12830,9 +12830,9 @@ callvirt m The `ret` instruction cannot be used to transfer control out of a`try`, `filter`, `catch`, or `finally` block. From within a `try` or `catch`, use the instruction with a destination of a `ret` instruction that is outside all enclosing exception blocks. Because the `filter` and `finally` blocks are logically part of exception handling and not the method in which their code is embedded, correctly generated Microsoft Intermediate Language (MSIL) instructions do not perform a method return from within a `filter` or `finally`. - The following method overload can use the `ret` opcode: + The following method overload can use the `ret` opcode: -- +- ]]> @@ -12891,9 +12891,9 @@ callvirt m The `rethrow` instruction is only permitted within the body of a `catch` handler. It throws the same exception that was caught by this handler. - The following method overload can use the `rethrow` opcode: + The following method overload can use the `rethrow` opcode: -- +- ]]> @@ -12962,9 +12962,9 @@ callvirt m `Shl` inserts a zero bit in the lowest position on each shift. - The following method overload can use the `shl` opcode: + The following method overload can use the `shl` opcode: -- +- ]]> @@ -13033,9 +13033,9 @@ callvirt m `Shr` replicates the high order bit on each shift, preserving the sign of the original value in the `result`. - The following method overload can use the `shr` opcode: + The following method overload can use the `shr` opcode: -- +- ]]> @@ -13104,9 +13104,9 @@ callvirt m `Shr.un` inserts a zero bit in the highest position on each shift. - The following method overload can use the `shr.un` opcode: + The following method overload can use the `shr.un` opcode: -- +- ]]> @@ -13169,9 +13169,9 @@ callvirt m For a reference type, the size returned is the size of a reference value of the corresponding type (4 bytes on 32-bit systems), not the size of the data stored in objects referred to by the reference value. A generic type parameter can be used only in the body of the type or method that defines it. When that type or method is instantiated, the generic type parameter is replaced by a value type or reference type. - The following method overload can use the `sizeof` opcode: + The following method overload can use the `sizeof` opcode: -- +- ]]> @@ -13237,9 +13237,9 @@ callvirt m Performing a store into arguments that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the argument. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `starg` opcode: + The following method overload can use the `starg` opcode: -- +- ]]> @@ -13306,9 +13306,9 @@ callvirt m Performing a store into arguments that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the argument. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `starg.s` opcode: + The following method overload can use the `starg.s` opcode: -- +- ]]> @@ -13382,9 +13382,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem` opcode: + The following method overload can use the `stelem` opcode: -- +- ]]> @@ -13459,9 +13459,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i` opcode: + The following method overload can use the `stelem.i` opcode: -- +- ]]> @@ -13536,9 +13536,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i1` opcode: + The following method overload can use the `stelem.i1` opcode: -- +- ]]> @@ -13613,9 +13613,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i2` opcode: + The following method overload can use the `stelem.i2` opcode: -- +- ]]> @@ -13690,9 +13690,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i4` opcode: + The following method overload can use the `stelem.i4` opcode: -- +- ]]> @@ -13767,9 +13767,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i8` opcode: + The following method overload can use the `stelem.i8` opcode: -- +- ]]> @@ -13844,9 +13844,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.r4` opcode: + The following method overload can use the `stelem.r4` opcode: -- +- ]]> @@ -13921,9 +13921,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.r8` opcode: + The following method overload can use the `stelem.r8` opcode: -- +- ]]> @@ -13992,7 +13992,7 @@ callvirt m Arrays are objects and hence represented by a value of type `O`. The index is type `native int`. - Note that `stelem.ref` implicitly casts the supplied value to the element type of `array` before assigning the value to the array element. This cast can fail, even for verified code. Thus the `stelem.ref` instruction can throw . For one-dimensional arrays that aren't zero-based and for multidimensional arrays, the class provides a method. + Note that `stelem.ref` implicitly casts the supplied value to the element type of `array` before assigning the value to the array element. This cast can fail, even for verified code. Thus the `stelem.ref` instruction can throw . For one-dimensional arrays that aren't zero-based and for multidimensional arrays, the class provides a method. is thrown if `array` is a null reference. @@ -14000,9 +14000,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.ref` opcode: + The following method overload can use the `stelem.ref` opcode: -- +- ]]> @@ -14071,9 +14071,9 @@ callvirt m is thrown if `field` is not found in the metadata. This is typically checked when the Microsoft Intermediate Language (MSIL) instruction is converted to native code, not at runtime. - The following method overload can use the `stfld` opcode: + The following method overload can use the `stfld` opcode: -- +- ]]> @@ -14142,9 +14142,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i` opcode: + The following method overload can use the `stind.i` opcode: -- +- ]]> @@ -14213,9 +14213,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i1` opcode: + The following method overload can use the `stind.i1` opcode: -- +- ]]> @@ -14284,9 +14284,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i2` opcode: + The following method overload can use the `stind.i2` opcode: -- +- ]]> @@ -14355,9 +14355,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i4` opcode: + The following method overload can use the `stind.i4` opcode: -- +- ]]> @@ -14426,9 +14426,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i8` opcode: + The following method overload can use the `stind.i8` opcode: -- +- ]]> @@ -14497,9 +14497,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.r4` opcode: + The following method overload can use the `stind.r4` opcode: -- +- ]]> @@ -14568,9 +14568,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.r8` opcode: + The following method overload can use the `stind.r8` opcode: -- +- ]]> @@ -14639,9 +14639,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.ref` opcode: + The following method overload can use the `stind.ref` opcode: -- +- ]]> @@ -14706,11 +14706,11 @@ callvirt m Correct Microsoft Intermediate Language (MSIL) instructions require that `index` be a valid local index. For the `stloc` instruction, `index` must lie in the range 0 to 65534 inclusive (specifically, 65535 is not valid). The reason for excluding 65535 is pragmatic: likely implementations will use a 2-byte integer to track both a local's index, as well as the total number of locals for a given method. If an index of 65535 had been made valid, it would require a wider integer to track the number of locals in such a method. - The following method overloads can use the `stloc` opcode: + The following method overloads can use the `stloc` opcode: -- +- -- +- ]]> @@ -14775,9 +14775,9 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `stloc.0` opcode: + The following method overload can use the `stloc.0` opcode: -- +- ]]> @@ -14842,9 +14842,9 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `stloc.1` opcode: + The following method overload can use the `stloc.1` opcode: -- +- ]]> @@ -14909,9 +14909,9 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `stloc.2` opcode: + The following method overload can use the `stloc.2` opcode: -- +- ]]> @@ -14976,9 +14976,9 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `stloc.3` opcode: + The following method overload can use the `stloc.3` opcode: -- +- ]]> @@ -15043,11 +15043,11 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overloads can use the `stloc.s` opcode: + The following method overloads can use the `stloc.s` opcode: -- +- -- +- ]]> @@ -15116,9 +15116,9 @@ callvirt m is thrown if class cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at run time. - The following method overload can use the `stobj` opcode: + The following method overload can use the `stobj` opcode: -- +- ]]> @@ -15185,9 +15185,9 @@ callvirt m is thrown if field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at run time. - The following method overload can use the `stsfld` opcode: + The following method overload can use the `stsfld` opcode: -- +- ]]> @@ -15258,9 +15258,9 @@ callvirt m Floating-point overflow returns `+inf` (`PositiveInfinity`) or `-inf` (`NegativeInfinity`). - The following method overload can use the `sub` opcode: + The following method overload can use the `sub` opcode: -- +- ]]> @@ -15329,9 +15329,9 @@ callvirt m This operation is performed on signed integers; for floating-point values, use . - The following method overload can use the `sub.ovf` opcode: + The following method overload can use the `sub.ovf` opcode: -- +- ]]> @@ -15400,9 +15400,9 @@ callvirt m This operation is performed on signed integers; for floating-point values, use . - The following method overload can use the `sub.ovf.un` opcode: + The following method overload can use the `sub.ovf.un` opcode: -- +- ]]> @@ -15471,9 +15471,9 @@ callvirt m Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. (Such transfers are severely restricted and must use the leave instruction instead). - The following method overload can use the `switch` opcode. The `Label[]` argument is an array of Labels representing 32-bit offsets. + The following method overload can use the `switch` opcode. The `Label[]` argument is an array of Labels representing 32-bit offsets. -- +- @@ -15544,9 +15544,9 @@ callvirt m The current frame cannot be discarded when control is transferred from untrusted code to trusted code, since this would jeopardize code identity security. The .NET Framework security checks can therefore cause the `tail` to be ignored, leaving a standard instruction. Similarly, in order to allow the exit of a synchronized region to occur after the call returns, the `tail` prefix is ignored when used to exit a method that is marked synchronized. - The following method overload can use the `tail` opcode: + The following method overload can use the `tail` opcode: -- +- ]]> @@ -15681,9 +15681,9 @@ callvirt m is thrown if the object reference is a null reference. - The following method overload can use the `throw` opcode: + The following method overload can use the `throw` opcode: -- +- ]]> @@ -15750,11 +15750,11 @@ callvirt m The `unaligned` and `volatile` prefixes can be combined in either order. They must immediately precede a `ldind`, `stind`, `ldfld`, `stfld`, `ldobj`, `stobj`, `initblk`, or `cpblk` instruction. Only the prefix is allowed for the and instructions. - The following method overloads can use the `unaligned` opcode: + The following method overloads can use the `unaligned` opcode: -- +- -- +- ]]> @@ -15833,9 +15833,9 @@ callvirt m is thrown if the value type `valType` cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code, rather than at runtime. - The following method overload can use the `unbox` opcode: + The following method overload can use the `unbox` opcode: -- +- ]]> @@ -15907,9 +15907,9 @@ callvirt m is thrown if `obj` is a null reference. - The following method overload can use the `unbox.any` opcode: + The following method overload can use the `unbox.any` opcode: -- +- ]]> @@ -15972,9 +15972,9 @@ callvirt m The and `volatile` prefixes can be combined in either order. They must immediately precede a `ldind`, `stind`, `ldfld`, `stfld`, `ldobj`, `stobj`, `initblk`, or `cpblk` instruction. Only the `volatile` prefix is allowed for the and instructions. - The following method overload can use the `volatile` opcode: + The following method overload can use the `volatile` opcode: -- +- ]]> @@ -16043,9 +16043,9 @@ callvirt m `Xor` is an integer-specific operation. - The following method overload can use the `xor` opcode: + The following method overload can use the `xor` opcode: -- +- ]]> diff --git a/xml/System.Reflection.Emit/ParameterBuilder.xml b/xml/System.Reflection.Emit/ParameterBuilder.xml index b81707f57e0..7d2f9d80a3c 100644 --- a/xml/System.Reflection.Emit/ParameterBuilder.xml +++ b/xml/System.Reflection.Emit/ParameterBuilder.xml @@ -82,7 +82,7 @@ ## Remarks Parameter attributes need to consistent with the method signature. If you specify `Out` attributes for a parameter, you should ensure that the type of that method parameter is a `ByRef` type. - Some attributes require that you call with viable parameters in order for the Microsoft intermediate language (MSIL) to work correctly at runtime. For example, if you define a with ParameterAttributes.Out for parameter 1 of a `MethodBuilder`, then parameter 1 of must be a reference such as Type.GetType("System.String&"), rather than Type.GetType("System.String"). + Some attributes require that you call with viable parameters in order for the Microsoft intermediate language (MSIL) to work correctly at runtime. For example, if you define a with ParameterAttributes.Out for parameter 1 of a `MethodBuilder`, then parameter 1 of must be a reference such as Type.GetType("System.String&"), rather than Type.GetType("System.String"). diff --git a/xml/System.Reflection.Emit/ParameterToken.xml b/xml/System.Reflection.Emit/ParameterToken.xml index 56929f30de9..2b093dbb083 100644 --- a/xml/System.Reflection.Emit/ParameterToken.xml +++ b/xml/System.Reflection.Emit/ParameterToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/PropertyBuilder.xml b/xml/System.Reflection.Emit/PropertyBuilder.xml index ce44322dd50..c5b6548520f 100644 --- a/xml/System.Reflection.Emit/PropertyBuilder.xml +++ b/xml/System.Reflection.Emit/PropertyBuilder.xml @@ -85,7 +85,7 @@ ## Examples - The following code sample demonstrates how to implement properties in a dynamic type using a `PropertyBuilder` obtained via to create the property framework and an associated to implement the IL logic within the property. + The following code sample demonstrates how to implement properties in a dynamic type using a `PropertyBuilder` obtained via to create the property framework and an associated to implement the IL logic within the property. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/PropertyBuilder/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/PropertyBuilder/Overview/source.vb" id="Snippet1"::: @@ -1673,7 +1673,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati or , retrieve the object from the type, and call . + To set the value of a property, reflect on the property's parent type using or , retrieve the object from the type, and call . ]]> @@ -1736,7 +1736,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati or , retrieve the object from the type, and call . + To set the value of a property, reflect on the property's parent type using or , retrieve the object from the type, and call . ]]> diff --git a/xml/System.Reflection.Emit/PropertyToken.xml b/xml/System.Reflection.Emit/PropertyToken.xml index 1b875c4acd6..9bccef5812d 100644 --- a/xml/System.Reflection.Emit/PropertyToken.xml +++ b/xml/System.Reflection.Emit/PropertyToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/SignatureHelper.xml b/xml/System.Reflection.Emit/SignatureHelper.xml index 11701c82d1c..e246d5f3225 100644 --- a/xml/System.Reflection.Emit/SignatureHelper.xml +++ b/xml/System.Reflection.Emit/SignatureHelper.xml @@ -76,7 +76,7 @@ class to create a signature blob that can be passed to the method of the class. A object can also be passed to the method overload to insert an instruction and a signature token into a Microsoft intermediate language (MSIL) stream. For information on signature blobs and signature metadata, see the ECMA Partition II Metadata documentation. + Use the class to create a signature blob that can be passed to the method of the class. A object can also be passed to the method overload to insert an instruction and a signature token into a Microsoft intermediate language (MSIL) stream. For information on signature blobs and signature metadata, see the ECMA Partition II Metadata documentation. For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -140,7 +140,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: method overload. + To add an argument with optional or required custom modifiers, use the method overload. ]]> @@ -203,7 +203,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: method overload. + To add an argument with optional or required custom modifiers, use the method overload. ]]> @@ -993,7 +993,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: ## Remarks This overload creates a signature with a standard calling convention. - To create a method signature with custom modifiers, use the method overload and then use the or method overloads to add arguments with custom modifiers. + To create a method signature with custom modifiers, use the method overload and then use the or method overloads to add arguments with custom modifiers. ]]> @@ -1082,7 +1082,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: method overload. + To create a signature helper for a property with optional or required custom modifiers, use the method overload. ]]> @@ -1204,7 +1204,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: ## Remarks See the namespace for classes that represent custom modifiers. - If a property has no custom modifiers, use the method overload. + If a property has no custom modifiers, use the method overload. ]]> @@ -1347,7 +1347,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: ## Remarks See the namespace for classes that represent custom modifiers. - If a property has no custom modifiers, use the method overload. + If a property has no custom modifiers, use the method overload. > [!NOTE] > This method overload is introduced in the .NET Framework 3.5 or later. diff --git a/xml/System.Reflection.Emit/SignatureToken.xml b/xml/System.Reflection.Emit/SignatureToken.xml index 1dd30038951..c30f25b2e49 100644 --- a/xml/System.Reflection.Emit/SignatureToken.xml +++ b/xml/System.Reflection.Emit/SignatureToken.xml @@ -195,7 +195,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -230,7 +230,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/StringToken.xml b/xml/System.Reflection.Emit/StringToken.xml index fa5dc4d17ed..b56d7d155e6 100644 --- a/xml/System.Reflection.Emit/StringToken.xml +++ b/xml/System.Reflection.Emit/StringToken.xml @@ -168,7 +168,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -203,7 +203,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/TypeBuilder.xml b/xml/System.Reflection.Emit/TypeBuilder.xml index dfe7aa54dc9..551fb287014 100644 --- a/xml/System.Reflection.Emit/TypeBuilder.xml +++ b/xml/System.Reflection.Emit/TypeBuilder.xml @@ -399,7 +399,7 @@ The following code sample demonstrates how to build a type dynamically by using Read-only. The full name of this type qualified by the display name of the assembly. ) and the display name of the assembly (), separated by a comma and a space. +The format of the returned string is the concatenation of the full name of the type () and the display name of the assembly (), separated by a comma and a space. See for a description of the format of the display name of an assembly. ]]> @@ -567,18 +567,18 @@ See for a description of the format of the method must be called on the enclosing type before it is called on the nested type. + If this type is a nested type, the method must be called on the enclosing type before it is called on the nested type. - If the current type derives from an incomplete type or implements incomplete interfaces, call the method on the parent type and the interface types before calling it on the current type. + If the current type derives from an incomplete type or implements incomplete interfaces, call the method on the parent type and the interface types before calling it on the current type. - If the enclosing type contains a field that is a value type defined as a nested type (for example, a field that is an enumeration defined as a nested type), calling the method on the enclosing type will generate a event. This is because the loader cannot determine the size of the enclosing type until the nested type has been completed. The caller should define a handler for the event to complete the definition of the nested type by calling on the object that represents the nested type. The code example for this topic shows how to define such an event handler. + If the enclosing type contains a field that is a value type defined as a nested type (for example, a field that is an enumeration defined as a nested type), calling the method on the enclosing type will generate a event. This is because the loader cannot determine the size of the enclosing type until the nested type has been completed. The caller should define a handler for the event to complete the definition of the nested type by calling on the object that represents the nested type. The code example for this topic shows how to define such an event handler. - A type is created only once, no matter how many times the method is called. All calls return the same object. + A type is created only once, no matter how many times the method is called. All calls return the same object. ## Examples - The following code example shows how to define an event handler for the event, in order to call the method on a nested type during a call on the enclosing type. + The following code example shows how to define an event handler for the event, in order to call the method on a nested type during a call on the enclosing type. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/TypeBuilder/CreateType/nestedenum.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/TypeBuilder/CreateType/nestedenum.vb" id="Snippet1"::: @@ -876,9 +876,9 @@ See for a description of the format of the If you define a constructor for your dynamic type, a parameterless constructor is not provided. You have the following options for providing a parameterless constructor in addition to the constructor you defined: -- If you want a parameterless constructor that simply calls the parameterless constructor of the base class, you can use the method to create one (and optionally restrict access to it). Do not provide an implementation for this parameterless constructor. If you do, an exception is thrown when you try to use the constructor. No exception is thrown when the method is called. +- If you want a parameterless constructor that simply calls the parameterless constructor of the base class, you can use the method to create one (and optionally restrict access to it). Do not provide an implementation for this parameterless constructor. If you do, an exception is thrown when you try to use the constructor. No exception is thrown when the method is called. -- If you want a parameterless constructor that does something more than simply calling the parameterless constructor of the base class, or that calls another constructor of the base class, or that does something else entirely, you must use the method to create one, and provide your own implementation. +- If you want a parameterless constructor that does something more than simply calling the parameterless constructor of the base class, or that calls another constructor of the base class, or that does something else entirely, you must use the method to create one, and provide your own implementation. @@ -1765,16 +1765,16 @@ See for a description of the format of the method. + Use this method overload when you do not know the method signature at the time you define the method. For example, the parameter types and return type of a generic method might be specified by the method's generic type parameters, which must be defined after the method has been added to the type. The parameters and return type of the method can be set later using the method. - This method overload defines a method with . If you need to define a method without a signature, with a different calling convention, use the method overload. + This method overload defines a method with . If you need to define a method without a signature, with a different calling convention, use the method overload. ## Examples - The following code example defines a generic method named `DemoMethod` whose parameter type and return type are specified by its generic type parameters. The method is defined without a signature, using the standard calling convention. The method is used to make `DemoMethod` a generic method, and the newly defined type parameters are then used for the signature and return type. + The following code example defines a generic method named `DemoMethod` whose parameter type and return type are specified by its generic type parameters. The method is defined without a signature, using the standard calling convention. The method is used to make `DemoMethod` a generic method, and the newly defined type parameters are then used for the signature and return type. - This code example is part of a larger example provided for the method. + This code example is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet4"::: @@ -1850,7 +1850,7 @@ See for a description of the format of the method. + Use this method overload when you do not know the method signature at the time you define the method. For example, the parameter types and return type of a generic method might be specified by the method's generic type parameters, which must be defined after the method has been added to the type. The parameters and return type of the method can be set later using the method. ]]> @@ -2160,7 +2160,7 @@ See for a description of the format of the or method overloads to define the method and then use the method to define the parameter and return types with custom modifiers. + Use this overload if you need to specify custom modifiers. If you need to specify custom modifiers after the method has been created, as you would, for example, with a generic method whose parameter types are specified by its generic type parameters, you can use the or method overloads to define the method and then use the method to define the parameter and return types with custom modifiers. > [!NOTE] > For more information on custom modifiers, see [ECMA C# and Common Language Infrastructure Standards](/dotnet/standard/components#applicable-standards) and [Standard ECMA-335 - Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -2330,7 +2330,7 @@ See for a description of the format of the ## Remarks Do not use this method to emit method overrides or interface implementations. To override a method of a base class or to implement a method of an interface, simply emit a method with the same name and signature as the method to be overridden or implemented, as demonstrated in the code example. - The method is used when a method body and a method declaration have different names. For example, a class might override a base class method and also provide a separate implementation for an interface member with the same name, as demonstrated in the code example. + The method is used when a method body and a method declaration have different names. For example, a class might override a base class method and also provide a separate implementation for an interface member with the same name, as demonstrated in the code example. `DefineMethodOverride` defines a `methodimpl`, which consists of a pair of metadata tokens. One token points to an implementation, and the other token points to a declaration that the body implements. The body must be defined on the type the method impl is defined on, and the body must be virtual (`Overridable` in Visual Basic). The declaration can be made to a method defined on an interface implemented by the type, a method on a derived class, or a method defined in the type. If the declaration is on an interface only, the slot defined for the interface is altered. If the declaration is made to a method on a base type, the slot for the method is overridden and any duplicates for the overridden method are also replaced. The overridden method cannot be the actual method that is declared. If the method is on the same type, the slot is replaced and any duplicates for the replaced methods are overridden. @@ -2338,12 +2338,12 @@ See for a description of the format of the > For more information about method impls, see `MethodImpl` in the ECMA Partition II Metadata documentation at [ECMA C# and Common Language Infrastructure Standards](/dotnet/standard/components#applicable-standards) and [Standard ECMA-335 - Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). > [!IMPORTANT] -> After the method is called, some features of `methodInfoBody` cannot be changed. For example, you cannot apply an attribute to a generic type parameter of `methodInfoBody` by using the method. If you must use the method, do so after all characteristics of `methodInfoBody` have been defined. +> After the method is called, some features of `methodInfoBody` cannot be changed. For example, you cannot apply an attribute to a generic type parameter of `methodInfoBody` by using the method. If you must use the method, do so after all characteristics of `methodInfoBody` have been defined. ## Examples The following code example contains an interface `I` with a method `M()`, a base class `A` that implements the interface, and a derived class `C` that overrides the base class implementation of `M()` and also provides a separate explicit implementation of `I.M()`. - The `main()` method of the code example shows how to emit the derived class `C`. The override of `A.M()` is accomplished simply by emitting a method `M()` with the same signature. However, to provide a separate implementation of `I.M()`, you must define a method body and then use the method to associate that method body with a representing `I.M()`. The name of the method body does not matter. + The `main()` method of the code example shows how to emit the derived class `C`. The override of `A.M()` is accomplished simply by emitting a method `M()` with the same signature. However, to provide a separate implementation of `I.M()`, you must define a method body and then use the method to associate that method body with a representing `I.M()`. The name of the method body does not matter. The code example creates an instance of the emitted class. It obtains a object for `I.M()`, and uses it to invoke the emitted class's explicit interface implementation. It then obtains a object for `A.M()`, and uses it to invoke the emitted class's override of that method. @@ -2458,11 +2458,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2532,11 +2532,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2636,11 +2636,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2742,11 +2742,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2848,11 +2848,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2965,11 +2965,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -3232,7 +3232,7 @@ See for a description of the format of the ## Examples - The following example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. + The following example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. > [!IMPORTANT] > To get a non-zero return value, you must add the flag. @@ -3359,7 +3359,7 @@ See for a description of the format of the ## Examples - The following code example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. + The following code example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. > [!IMPORTANT] > To get a non-zero return value, you must add the flag. @@ -3522,7 +3522,7 @@ See for a description of the format of the > For more information on custom modifiers, see [ECMA C# and Common Language Infrastructure Standards](/dotnet/standard/components#applicable-standards) and [Standard ECMA-335 - Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ## Examples - The following code example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. + The following code example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. The example creates a dynamic assembly with one dynamic module and a single type, `MyType`, that contains the `PInvoke` method. The `PInvoke` method represents the Win32 `GetTickCount` function. @@ -4712,16 +4712,16 @@ See for a description of the format of the method provides a way to get a object that represents a constructor of a constructed generic type whose generic type definition is represented by a object. + The method provides a way to get a object that represents a constructor of a constructed generic type whose generic type definition is represented by a object. - For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a constructor of `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G`. In order to emit the code to create an instance of the constructed type, you need a object that represents the constructor of this constructed type - in other words, that creates an instance of `G`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents the constructor of `G` as parameter `constructor`. The return value is the object you need to emit the function call. The code example demonstrates this scenario. + For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a constructor of `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G`. In order to emit the code to create an instance of the constructed type, you need a object that represents the constructor of this constructed type - in other words, that creates an instance of `G`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents the constructor of `G` as parameter `constructor`. The return value is the object you need to emit the function call. The code example demonstrates this scenario. ## Examples The following code example contains source code for a generic class named `Sample` that has a type parameter named `T`. The class has a field named `Field`, of type `T`, and a generic method named `GM` with its own type parameter, named `U`. Method `GM` creates an instance of `Sample`, substituting its own type parameter `U` for the type parameter of `Sample`, and stores its input parameter in `Field`. This source code is compiled but not used; you can view it with the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) and compare it to the code emitted by class `Example`. - The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample` and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. The method is used to create a that represents the parameterless constructor of the constructed generic type `Sample` in the instruction that creates the instance. + The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample` and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. The method is used to create a that represents the parameterless constructor of the constructed generic type `Sample` in the instruction that creates the instance. A dummy type is defined to hold the entry-point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. @@ -4884,7 +4884,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5054,7 +5054,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5122,7 +5122,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5188,7 +5188,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5247,7 +5247,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5325,7 +5325,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5380,16 +5380,16 @@ See for a description of the format of the method provides a way to get a object that represents a field of a constructed generic type whose generic type definition is represented by a object. + The method provides a way to get a object that represents a field of a constructed generic type whose generic type definition is represented by a object. - For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a field `public T F` in C# syntax (`Public F As T` in Visual Basic) that's defined by `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G` and calls field `F` on that instance. In order to emit the function call, you need a object that represents `F` on the constructed type - in other words, that is of type `U` rather than type `T`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents `F` as parameter `field`. The return value is the object you need to emit the function call. The code example demonstrates this scenario. + For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a field `public T F` in C# syntax (`Public F As T` in Visual Basic) that's defined by `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G` and calls field `F` on that instance. In order to emit the function call, you need a object that represents `F` on the constructed type - in other words, that is of type `U` rather than type `T`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents `F` as parameter `field`. The return value is the object you need to emit the function call. The code example demonstrates this scenario. ## Examples The following code example contains source code for a generic class named Sample that has a type parameter named `T`. The class has a field named `Field`, of type `T`, and a generic method named `GM` with its own type parameter, named `U`. Method `GM` creates an instance of `Sample`, substituting its own type parameter `U` for the type parameter of `Sample`, and stores its input parameter in `Field`. This source code is compiled but not used; you can view it with the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) and compare it to the code emitted by class `Example`. - The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample`, and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. The method is used to create a that represents the field of the constructed generic type `Sample` in the and instructions. + The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample`, and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. The method is used to create a that represents the field of the constructed generic type `Sample` in the and instructions. A dummy type is defined to hold the entry-point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. @@ -5468,9 +5468,9 @@ See for a description of the format of the method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. - Retrieve the type using or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5521,7 +5521,7 @@ See for a description of the format of the ## Remarks The elements of the returned array are in the order in which they appear in the list of type parameters for the generic type definition. - A object represents a generic type definition if the method has been used to give it generic type parameters. This method retrieves the objects that represent the generic type parameters. + A object represents a generic type definition if the method has been used to give it generic type parameters. This method retrieves the objects that represent the generic type parameters. For more information on generic types in reflection and a list of the invariant conditions for terms used in generic reflection, see the property. @@ -5605,9 +5605,9 @@ See for a description of the format of the method on a object for which the property returns `true`, the property returns the current instance. A that represents a generic type is always a generic type definition. + If you call the method on a object for which the property returns `true`, the property returns the current instance. A that represents a generic type is always a generic type definition. - If you used the method to construct a generic type from a object that represents a generic type definition, using the method on the constructed type gets back the object that represents the generic type definition. + If you used the method to construct a generic type from a object that represents a generic type definition, using the method on the constructed type gets back the object that represents the generic type definition. ]]> @@ -5682,7 +5682,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5748,7 +5748,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5863,7 +5863,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5926,7 +5926,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5981,16 +5981,16 @@ See for a description of the format of the method provides a way to get a object that represents a method of a constructed generic type whose generic type definition is represented by a object. + The method provides a way to get a object that represents a method of a constructed generic type whose generic type definition is represented by a object. - For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a method `T M()` in C# syntax (`Function M() As T` in Visual Basic) that is defined by `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G` and calls method `M` on that instance. In order to emit the function call, you need a object that represents `M` on the constructed type - in other words, that returns type `U` rather than type `T`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents `T M()` as parameter `method`. The return value is the object you need to emit the function call. The code example demonstrates a scenario similar to this. + For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a method `T M()` in C# syntax (`Function M() As T` in Visual Basic) that is defined by `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G` and calls method `M` on that instance. In order to emit the function call, you need a object that represents `M` on the constructed type - in other words, that returns type `U` rather than type `T`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents `T M()` as parameter `method`. The return value is the object you need to emit the function call. The code example demonstrates a scenario similar to this. ## Examples The following code example contains source code for a generic class named `Sample` that has a type parameter named `T`. The class has a field named `Field`, of type `T`, and a generic method named `GM` with its own type parameter, named `U`. Method `GM` creates an instance of `Sample`, substituting its own type parameter `U` for the type parameter of `Sample`, and stores its input parameter in `Field`. This source code is compiled but not used; you can view it with the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) and compare it to the code emitted by class `Example`. - The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample` and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. A dummy type is defined to hold the entry-point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. The method is used to create a for the static `GM` method of the constructed generic type `Sample`, and the method is then used to create a that can emitted in a method call. + The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample` and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. A dummy type is defined to hold the entry-point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. The method is used to create a for the static `GM` method of the constructed generic type `Sample`, and the method is then used to create a that can emitted in a method call. When the code example is run, it saves the emitted assembly as TypeBuilderGetFieldExample.exe. You can run TypeBuilderGetFieldExample.exe, and you can use the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) to compare the emitted code with the code for the `Sample` class that is compiled into the code example itself. @@ -6163,7 +6163,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -6235,7 +6235,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. If this type is complete, for example, if `CreateType` has been called on this type, but there are nested types that are not complete, then `GetNestedTypes` will only return those nested types for which `CreateType` has been called. @@ -6298,7 +6298,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. If this type is complete, for example, if `CreateType` has been called on this type, but there are nested types that are not complete, then `GetNestedTypes` will only return those nested types for which `CreateType` has been called. @@ -6359,7 +6359,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -6499,7 +6499,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -6641,7 +6641,7 @@ See for a description of the format of the > [!NOTE] > Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked using Reflection whenever the code is fully trusted. - This method is not currently supported. You can retrieve the type using or and use reflection on the retrieved type. + This method is not currently supported. You can retrieve the type using or and use reflection on the retrieved type. ]]> @@ -7006,7 +7006,7 @@ See for a description of the format of the method has been called, the type represented by the object is complete. Exceptions are thrown on any further attempts to add members or change other characteristics of the type. + After the method has been called, the type represented by the object is complete. Exceptions are thrown on any further attempts to add members or change other characteristics of the type. ]]> @@ -7096,7 +7096,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + This method is not supported for incomplete generic type parameters. Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -7228,7 +7228,7 @@ See for a description of the format of the object represents a generic type definition if the method has been used to give it generic type parameters. An instance of the class that is generic is always a generic type definition. + A object represents a generic type definition if the method has been used to give it generic type parameters. An instance of the class that is generic is always a generic type definition. For more information on generic types in reflection and a list of the invariant conditions for terms used in generic reflection, see the property. @@ -7282,9 +7282,9 @@ See for a description of the format of the object represents a generic type definition if the method has been used to give it generic type parameters. An instance of the class that is generic is always a generic type definition. + A object represents a generic type definition if the method has been used to give it generic type parameters. An instance of the class that is generic is always a generic type definition. - A can be used to build generic type definitions, but not constructed generic types. To get a constructed generic type, call the method on a that represents a generic type definition. + A can be used to build generic type definitions, but not constructed generic types. To get a constructed generic type, call the method on a that represents a generic type definition. For more information on generic types in reflection and a list of the invariant conditions for terms used in generic reflection, see the property. @@ -7423,7 +7423,7 @@ See for a description of the format of the , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -7435,7 +7435,7 @@ See for a description of the format of the The runtime begins evaluating transparency levels at the assembly. For example, if the dynamic assembly is security-critical, annotations on types are ignored, and all types are security-critical. - By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. + By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. > [!NOTE] > Default inheritance is limited to the runtime's evaluation of transparency. No attributes are applied to the dynamic assembly. If you want to add security attributes, you must apply them yourself. @@ -7494,7 +7494,7 @@ See for a description of the format of the , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -7506,7 +7506,7 @@ See for a description of the format of the The runtime begins evaluating transparency levels at the assembly. For example, if the dynamic assembly is security-critical, annotations on types are ignored, and all types are security-critical. - By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. + By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. > [!NOTE] > Default inheritance is limited to the runtime's evaluation of transparency. No attributes are applied to the dynamic assembly. If you want to add security attributes, you must apply them yourself. @@ -7565,7 +7565,7 @@ See for a description of the format of the , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -7577,7 +7577,7 @@ See for a description of the format of the The runtime begins evaluating transparency levels at the assembly. For example, if the dynamic assembly is security-critical, annotations on types are ignored, and all types are security-critical. - By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. + By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. > [!NOTE] > Default inheritance is limited to the runtime's evaluation of transparency. No attributes are applied to the dynamic assembly. If you want to add security attributes, you must apply them yourself. @@ -7829,7 +7829,7 @@ See for a description of the format of the method provides a way to generate an array type with any possible element type, including generic types. + The method provides a way to generate an array type with any possible element type, including generic types. @@ -7897,7 +7897,7 @@ See for a description of the format of the method provides a way to generate an array type with any possible element type, including generic types. + The method provides a way to generate an array type with any possible element type, including generic types. @@ -7958,7 +7958,7 @@ See for a description of the format of the method provides a way to generate `ref` types (`ByRef` in Visual Basic) for parameter lists. + The method provides a way to generate `ref` types (`ByRef` in Visual Basic) for parameter lists. > [!NOTE] > Using Microsoft intermediate language (MSIL) syntax, if the current represents `MyType`, then the type returned by this method would be `MyType&`. @@ -8044,11 +8044,11 @@ See for a description of the format of the method before calling the method on a that represents a generic type definition. If the current does not represent the definition of a generic type, an is thrown. + Use this method when your emitted code requires a type constructed from the current generic type definition. It is not necessary to call the method before calling the method on a that represents a generic type definition. If the current does not represent the definition of a generic type, an is thrown. The object returned by this method functions as a placeholder for a constructed generic type in your emitted code. It is an instance of a class derived from that has limited capabilities. In particular: -- To get methods, fields, and constructors for these constructed generic types, use the , , and method overloads. +- To get methods, fields, and constructors for these constructed generic types, use the , , and method overloads. - Two instances that represent the same constructed type do not compare as equal. For example, in the following code `t1.Equals(t2)` returns `false`: @@ -8114,7 +8114,7 @@ See for a description of the format of the method provides a way to generate pointer types for parameter lists. + The method provides a way to generate pointer types for parameter lists. > [!NOTE] > Using Microsoft intermediate language (MSIL) syntax, if the current represents `MyType`, then the type returned by this method would be `MyType*`. @@ -8655,9 +8655,9 @@ For more information on how to format `binaryAttribute`, see [ECMA C# and Common ## Remarks If `parent` is `null`, is used as the base type. - In the .NET Framework versions 1.0 and 1.1, no exception is thrown if `parent` is an interface type, but a is thrown when the method is called. + In the .NET Framework versions 1.0 and 1.1, no exception is thrown if `parent` is an interface type, but a is thrown when the method is called. - The method does not check for most invalid parent types. For example, it does not reject a parent type that has no parameterless constructor when the current type has a parameterless constructor, it does not reject sealed types, and it does not reject the type. In all these cases, exceptions are thrown by the method. + The method does not check for most invalid parent types. For example, it does not reject a parent type that has no parameterless constructor when the current type has a parameterless constructor, it does not reject sealed types, and it does not reject the type. In all these cases, exceptions are thrown by the method. ]]> @@ -9063,7 +9063,7 @@ For more information on how to format `binaryAttribute`, see [ECMA C# and Common or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> diff --git a/xml/System.Reflection.Emit/TypeToken.xml b/xml/System.Reflection.Emit/TypeToken.xml index f8fc7f57184..7b9ac9e4556 100644 --- a/xml/System.Reflection.Emit/TypeToken.xml +++ b/xml/System.Reflection.Emit/TypeToken.xml @@ -201,7 +201,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -236,7 +236,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Metadata/MethodBodyBlock.xml b/xml/System.Reflection.Metadata/MethodBodyBlock.xml index 9d79e3ec94a..63e220fa4d0 100644 --- a/xml/System.Reflection.Metadata/MethodBodyBlock.xml +++ b/xml/System.Reflection.Metadata/MethodBodyBlock.xml @@ -33,7 +33,7 @@ method to get a `MethodBodyBlock` instance for the specified method. +The method body contains Common Intermediate Language (CIL) instructions that make up a method and information about its local variables and exception regions. You can use the method to get a `MethodBodyBlock` instance for the specified method. The format of CIL instructions and metadata is defined by the ECMA-335 specification. For more information, see [Standard ECMA-335 - Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/) on the Ecma International Web site. diff --git a/xml/System.Reflection.Metadata/MethodDebugInformation.xml b/xml/System.Reflection.Metadata/MethodDebugInformation.xml index cb8c418d76b..d6b6f761656 100644 --- a/xml/System.Reflection.Metadata/MethodDebugInformation.xml +++ b/xml/System.Reflection.Metadata/MethodDebugInformation.xml @@ -213,9 +213,9 @@ See [MethodDebugInformation Table: 0x31](https://github.com/dotnet/runtime/blob/ A blob encoding sequence points, or a handle whose property is if the method doesn't have sequence points. - method to decode the blob. + Use the method to decode the blob. ]]> diff --git a/xml/System.Reflection.PortableExecutable/CodeViewDebugDirectoryData.xml b/xml/System.Reflection.PortableExecutable/CodeViewDebugDirectoryData.xml index dfc11c99e78..ab76e7ca68e 100644 --- a/xml/System.Reflection.PortableExecutable/CodeViewDebugDirectoryData.xml +++ b/xml/System.Reflection.PortableExecutable/CodeViewDebugDirectoryData.xml @@ -45,7 +45,7 @@ ## Remarks -This structure is returned by a call to the method. +This structure is returned by a call to the method. ]]> diff --git a/xml/System.Reflection/AmbiguousMatchException.xml b/xml/System.Reflection/AmbiguousMatchException.xml index 1cad21a3f02..b3f12b3a222 100644 --- a/xml/System.Reflection/AmbiguousMatchException.xml +++ b/xml/System.Reflection/AmbiguousMatchException.xml @@ -89,7 +89,7 @@ ## Remarks `AmbiguousMatchException` uses the HRESULT COR_E_AMBIGUOUSMATCH, which has the value 0x8000211D. - An `AmbiguousMatchException` is thrown when a member is invoked late-bound and multiple overloads satisfy the binding criteria, or when more than one member matches the binding criteria passed to a reflection method that can return only a single result (for example, or ). + An `AmbiguousMatchException` is thrown when a member is invoked late-bound and multiple overloads satisfy the binding criteria, or when more than one member matches the binding criteria passed to a reflection method that can return only a single result (for example, or ). ]]> @@ -158,8 +158,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("").| +||`null`| +||The empty string ("").| ]]> @@ -221,8 +221,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The `message` string.| +||`null`| +||The `message` string.| ]]> @@ -286,8 +286,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| diff --git a/xml/System.Reflection/Assembly.xml b/xml/System.Reflection/Assembly.xml index b72cc15f9ce..70bf710c1d8 100644 --- a/xml/System.Reflection/Assembly.xml +++ b/xml/System.Reflection/Assembly.xml @@ -122,29 +122,29 @@ ## Remarks Use the class to load assemblies, to explore the metadata and constituent parts of assemblies, to discover the types contained in assemblies, and to create instances of those types. - To get an array of objects representing the assemblies currently loaded into an application domain (for example, the default application domain of a simple project), use the method. + To get an array of objects representing the assemblies currently loaded into an application domain (for example, the default application domain of a simple project), use the method. To load assemblies dynamically, the class provides the following static methods (`Shared` methods in Visual Basic). Assemblies are loaded into the application domain where the load operation occurs. -- The recommended way to load assemblies is to use the method, which identifies the assembly to be loaded by its display name (for example, "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"). The search for the assembly follows the rules described in [How the Runtime Locates Assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies). +- The recommended way to load assemblies is to use the method, which identifies the assembly to be loaded by its display name (for example, "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"). The search for the assembly follows the rules described in [How the Runtime Locates Assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies). -- The and methods enable you to load an assembly for reflection, but not for execution. For example, an assembly that targets a 64-bit platform can be examined by code that is running on a 32-bit platform. +- The and methods enable you to load an assembly for reflection, but not for execution. For example, an assembly that targets a 64-bit platform can be examined by code that is running on a 32-bit platform. -- The and methods are provided for rare scenarios in which an assembly must be identified by path. +- The and methods are provided for rare scenarios in which an assembly must be identified by path. - To get an object for the currently executing assembly, use the method. + To get an object for the currently executing assembly, use the method. Many members of the class provide information about an assembly. For example: -- The method returns an object that provides access to the parts of the assembly display name. +- The method returns an object that provides access to the parts of the assembly display name. -- The method lists the attributes applied to the assembly. +- The method lists the attributes applied to the assembly. -- The method provides access to the files in the assembly manifest. +- The method provides access to the files in the assembly manifest. -- The method provides the names of the resources in the assembly manifest. +- The method provides the names of the resources in the assembly manifest. - The method lists all the types in the assembly. The method lists the types that are visible to callers outside the assembly. The method can be used to search for a particular type in the assembly. The method can be used to search for and create instances of types in the assembly. + The method lists all the types in the assembly. The method lists the types that are visible to callers outside the assembly. The method can be used to search for a particular type in the assembly. The method can be used to search for and create instances of types in the assembly. For more information on assemblies, see the "Application Domains and Assemblies" section in the [Application Domains](/dotnet/framework/app-domains/application-domains) topic. @@ -153,7 +153,7 @@ ## Examples The following code example shows how to obtain the currently executing assembly, create an instance of a type contained in that assembly, and invoke one of the type's methods with late binding. For this purpose, the code example defines a class named `Example`, with a method named `SampleMethod`. The constructor of the class accepts an integer, which is used to compute the return value of the method. - The code example also demonstrates the use of the method to obtain an object that can be used to parse the full name of the assembly. The example displays the version number of the assembly, the property, and the property. + The code example also demonstrates the use of the method to obtain an object that can be used to parse the full name of the assembly. The example displays the version number of the assembly, the property, and the property. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/Overview/source.vb" id="Snippet1"::: @@ -283,7 +283,7 @@ ## Remarks To get the absolute path to the loaded manifest-containing file, use the property instead. - If the assembly was loaded as a byte array, using an overload of the method that takes an array of bytes, this property returns the location of the caller of the method, not the location of the loaded assembly. + If the assembly was loaded as a byte array, using an overload of the method that takes an array of bytes, this property returns the location of the caller of the method, not the location of the loaded assembly. In .NET 5 and later versions, for bundled assemblies, this property throws an exception. @@ -381,14 +381,14 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex - You haven't specified the fully qualified name of the type. -- You've specified the fully qualified type name, but its case doesn't match the case of the type's property. For a case-insensitive comparison of `typeName` with the type's full name, call the overload and specify `true` for the `ignoreCase` argument. +- You've specified the fully qualified type name, but its case doesn't match the case of the type's property. For a case-insensitive comparison of `typeName` with the type's full name, call the overload and specify `true` for the `ignoreCase` argument. - The type doesn't exist in the current instance. ## Examples - The following example defines a `Person` class and calls the method to instantiate it. + The following example defines a `Person` class and calls the method to instantiate it. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/CreateInstance/createinstance1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/CreateInstance/createinstance1.vb" id="Snippet1"::: @@ -499,7 +499,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex ## Examples - The following example defines a `Person` class. It then calls the method to instantiate it, but because the casing of the `typeName` argument doesn't match that of the type's property, the method returns `null`. When the example passes the same string to the overload and specifies that the comparison should be case-insensitive, the `Person` class is found, and a `Person` object is successfully instantiated. + The following example defines a `Person` class. It then calls the method to instantiate it, but because the casing of the `typeName` argument doesn't match that of the type's property, the method returns `null`. When the example passes the same string to the overload and specifies that the comparison should be case-insensitive, the `Person` class is found, and a `Person` object is successfully instantiated. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/CreateInstance/createinstance2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/CreateInstance/createinstance2.vb" id="Snippet2"::: @@ -710,7 +710,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex See for a description of the format of the display name of an assembly. - To accommodate changes in versions of the common language runtime, use this method rather than constructing the qualified name yourself. For information about qualified assembly names, see . + To accommodate changes in versions of the common language runtime, use this method rather than constructing the qualified name yourself. For information about qualified assembly names, see . ]]> @@ -818,7 +818,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex property is comparable to the method, except that the property returns a collection of objects, and the method returns an array of objects. + The property is comparable to the method, except that the property returns a collection of objects, and the method returns an array of objects. The returned array includes nested types. @@ -940,7 +940,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex method performs a test for reference equality to determine whether the current instance and `o` are equal. + The method performs a test for reference equality to determine whether the current instance and `o` are equal. ]]> @@ -1170,9 +1170,9 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex See for a description of the format of the display name of an assembly. > [!NOTE] -> Writing your own code to parse display names is not recommended. Instead, pass the display name to the constructor, which parses it and populates the appropriate fields of the new . +> Writing your own code to parse display names is not recommended. Instead, pass the display name to the constructor, which parses it and populates the appropriate fields of the new . - In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. However, it is not included in the string returned by the property, for compatibility reasons. See . + In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. However, it is not included in the string returned by the property, for compatibility reasons. See . @@ -1315,17 +1315,17 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex method is expanded inline by the just-in-time (JIT) compiler, or if its caller is expanded inline, the assembly that is returned by may differ unexpectedly. For example, consider the following methods and assemblies: + If the method that calls the method is expanded inline by the just-in-time (JIT) compiler, or if its caller is expanded inline, the assembly that is returned by may differ unexpectedly. For example, consider the following methods and assemblies: -- Method `M1` in assembly `A1` calls . +- Method `M1` in assembly `A1` calls . - Method `M2` in assembly `A2` calls `M1`. - Method `M3` in assembly `A3` calls `M2`. - When `M1` is not inlined, returns `A2`. When `M1` is inlined, returns `A3`. Similarly, when `M2` is not inlined, returns `A2`. When `M2` is inlined, returns `A3`. + When `M1` is not inlined, returns `A2`. When `M1` is inlined, returns `A3`. Similarly, when `M2` is not inlined, returns `A2`. When `M2` is inlined, returns `A3`. - This effect also occurs when `M1` executes as a tail call from `M2`, or when `M2` executes as a tail call from `M3`. You can prevent the JIT compiler from inlining the method that calls , by applying the attribute with the flag, but there is no similar mechanism for preventing tail calls. + This effect also occurs when `M1` executes as a tail call from `M2`, or when `M2` executes as a tail call from `M3`. You can prevent the JIT compiler from inlining the method that calls , by applying the attribute with the flag, but there is no similar mechanism for preventing tail calls. @@ -1560,7 +1560,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods like and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. ]]> @@ -1622,9 +1622,9 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex ## Remarks - **.NET Framework only:** In the default application domain, this method returns the process executable. In other application domains, this method returns the first executable that was executed by . + **.NET Framework only:** In the default application domain, this method returns the process executable. In other application domains, this method returns the first executable that was executed by . - The method can return `null` when a managed assembly has been loaded from an unmanaged application. For example, if an unmanaged application creates an instance of a COM component written in C#, a call to the method from the C# component returns null, because the entry point for the process was unmanaged code rather than a managed assembly. + The method can return `null` when a managed assembly has been loaded from an unmanaged application. For example, if an unmanaged application creates an instance of a COM component written in C#, a call to the method from the C# component returns null, because the entry point for the process was unmanaged code rather than a managed assembly. ]]> @@ -1688,12 +1688,12 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetExecutingAssembly/assembly1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetExecutingAssembly/assembly1.vb" id="Snippet1"::: - To get the assembly that contains the method that called the currently executing code, use . + To get the assembly that contains the method that called the currently executing code, use . ## Examples - The following example uses the property to get the currently executing assembly based on a type contained in that assembly. It also calls the method to show that it returns an object that represents the same assembly. + The following example uses the property to get the currently executing assembly based on a type contained in that assembly. It also calls the method to show that it returns an object that represents the same assembly. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetExecutingAssembly/getexecutingassembly1.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetExecutingAssembly/getexecutingassembly1.vb" id="Snippet5"::: @@ -1758,10 +1758,10 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex method. + The only types visible outside an assembly are public types and public types nested within other public types. To retrieve all types within an assembly, including those that are non-public, use the method. ## Examples - The following code sample defines a number of classes with various access levels, and calls to display the ones that are visible from outside the assembly. + The following code sample defines a number of classes with various access levels, and calls to display the ones that are visible from outside the assembly. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetExportedTypes/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetExportedTypes/source.vb" id="Snippet1"::: @@ -1923,7 +1923,7 @@ In .NET 5 and later versions, for bundled assemblies, this method throws an exce ## Remarks This method works on public and private resource files. - This overload is equivalent to calling the overload and specifying `false`. + This overload is equivalent to calling the overload and specifying `false`. ]]> @@ -2337,13 +2337,13 @@ In .NET 5 and later versions, for bundled assemblies, this method throws an exce ## Remarks You can use each resource name in the array returned by this method as follows: -- You can pass the resource name to the method to get additional information about the resource. +- You can pass the resource name to the method to get additional information about the resource. -- If the name identifies a binary .resources file, you can remove its .resources file extension and pass it to the constructor to instantiate the resource manager. +- If the name identifies a binary .resources file, you can remove its .resources file extension and pass it to the constructor to instantiate the resource manager. -- You can pass the resource name to the method to retrieve a object that you can then pass to the constructor. +- You can pass the resource name to the method to retrieve a object that you can then pass to the constructor. -- You can pass the resource name to the method to retrieve a object that you can then pass to the constructor. +- You can pass the resource name to the method to retrieve a object that you can then pass to the constructor. Resource information is returned only if the resource is visible to the caller, or the caller has . @@ -2427,7 +2427,7 @@ In .NET 5 and later versions, for bundled assemblies, this method throws an exce > [!NOTE] > This method returns `null` if a private resource in another assembly is accessed and the caller does not have with the flag. - If the assembly manifest lists a resource file, returns a object even if the resource file cannot be found on disk at the time. If the resource file is not found, passing the resulting object to the constructor causes an . + If the assembly manifest lists a resource file, returns a object even if the resource file cannot be found on disk at the time. If the resource file is not found, passing the resulting object to the constructor causes an . ]]> @@ -2517,7 +2517,7 @@ Note: In .NET for Win > [!NOTE] > This method returns `null` if a private resource in another assembly is accessed and the caller does not have with the flag. - If the assembly manifest lists a resource file, returns a object even if the resource file cannot be found on disk at the time. If the resource file is not found, passing the resulting object to the constructor causes an . + If the assembly manifest lists a resource file, returns a object even if the resource file cannot be found on disk at the time. If the resource file is not found, passing the resulting object to the constructor causes an . ]]> @@ -2599,7 +2599,7 @@ Note: In .NET for Win Classes in the `Reflection.Emit` namespace emit the scope name for a dynamic module. The scope name can be determined by the property. Pass the kind of module you want to `Assembly.GetModule`. For example, if you want the module that contains the assembly manifest, pass the scope name of the module to `GetModule`. Otherwise, pass the file name of the module. Assemblies loaded by one of the `Load` methods that have a byte[] parameter have only one module, and that is the manifest module. Always seek these modules using the scope name. - A type can be retrieved from a specific module using . Calling `Module.GetType` on the module containing the manifest will not initiate a search of the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . + A type can be retrieved from a specific module using . Calling `Module.GetType` on the module containing the manifest will not initiate a search of the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . ]]> @@ -3004,7 +3004,7 @@ Note: In .NET for Win ## Examples - The following code example demonstrates calling the method. This code example is part of a larger example provided for the class. + The following code example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetReferencedAssemblies/Reflection.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetReferencedAssemblies/Reflection.vb" id="Snippet1"::: @@ -3158,7 +3158,7 @@ Note: In .NET for Win ## Remarks Satellite assemblies contain localized resources, as distinct from main application assemblies, which contain non-localizable executable code and resources for a single culture that serve as the default or neutral culture. - Call the overload to use your current assembly version. + Call the overload to use your current assembly version. If `version` is `null`, the current assembly version is used if both the resource and main assemblies are signed. @@ -3283,15 +3283,15 @@ Note: In .NET for Win method overload, which can optionally include an assembly display name as part of the type name. + This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the method overload, which can optionally include an assembly display name as part of the type name. - In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. + In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). ## Examples - The following example defines an abstract `MeansOfTransportation` class in the `Transportation` namespace. It calls the method to retrieve its object, calls the method to get an array of objects that represent the type's properties, and then displays information on the type's abstract properties. Note that the call to the method uses the type's fully qualified name (that is, its namespace along with its type name). + The following example defines an abstract `MeansOfTransportation` class in the `Transportation` namespace. It calls the method to retrieve its object, calls the method to get an array of objects that represent the type's properties, and then displays information on the type's abstract properties. Note that the call to the method uses the type's fully qualified name (that is, its namespace along with its type name). :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetType/gettype1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetType/gettype1.vb" id="Snippet1"::: @@ -3390,9 +3390,9 @@ Note: In .NET for Win method overload, which can optionally include an assembly display name as part of the type name. + This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the method overload, which can optionally include an assembly display name as part of the type name. - In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. + In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). @@ -3498,9 +3498,9 @@ Note: In .NET for Win method overload, which can optionally include an assembly display name as part of the type name. + This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the method overload, which can optionally include an assembly display name as part of the type name. - In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. + In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). @@ -3588,9 +3588,9 @@ Note: In .NET for Win method. + The returned array includes nested and non-public types. To retrieve only public types, use the method. - If the method is called on an assembly and a type in that assembly is dependent on a type in an assembly that has not been loaded (for example, if it derives from a type in the second assembly), a is thrown. For example, this can happen if the first assembly was loaded with the or methods, and the second assembly was not loaded. It can also happen with assemblies loaded using the and methods if the second assembly cannot be located when the method is called. + If the method is called on an assembly and a type in that assembly is dependent on a type in an assembly that has not been loaded (for example, if it derives from a type in the second assembly), a is thrown. For example, this can happen if the first assembly was loaded with the or methods, and the second assembly was not loaded. It can also happen with assemblies loaded using the and methods if the second assembly cannot be located when the method is called. > [!NOTE] > If a type has been forwarded to another assembly, it is not included in the returned array. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). @@ -3784,7 +3784,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim ## Remarks For example, the value for the .NET Framework version 1.1 would be v1.1.4322. The binary files for that version would be located in the path %windir%\Microsoft.NET\Framework\v1.1.4322. - By default, is set to the version of the CLR used to build the assembly. However, it might have been set to another value at compile time. + By default, is set to the version of the CLR used to build the assembly. However, it might have been set to another value at compile time. ]]> @@ -3893,7 +3893,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim attribute to an assembly and then uses to indicate whether it was applied. It also tests an attribute that was not applied. + The following code example applies the attribute to an assembly and then uses to indicate whether it was applied. It also tests an attribute that was not applied. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/IsDefined/isdefined.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/IsDefined/isdefined.vb" id="Snippet1"::: @@ -4088,7 +4088,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim This method overload always creates a new object in its own isolated load context. - **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. + **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. ]]> @@ -4159,16 +4159,16 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim ## Remarks - In .NET Core/.NET 5+, the target assembly will be loaded into the current or into the context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm). + In .NET Core/.NET 5+, the target assembly will be loaded into the current or into the context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm). > [!NOTE] > **.NET Framework only:** For information about loading assemblies from remote locations, see [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element). > [!NOTE] -> **.NET Framework only:** Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). +> **.NET Framework only:** Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). > [!NOTE] -> **.NET Framework only:** If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. +> **.NET Framework only:** If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. ## Examples The following example instantiates an object and uses it to load the `sysglobal.dll` assembly. The example then displays the full name of the assembly's public types. @@ -4254,7 +4254,7 @@ Note: In .NET for Win ## Remarks - In .NET Core/.NET 5+, the target assembly will be loaded into the current or into the context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm). + In .NET Core/.NET 5+, the target assembly will be loaded into the current or into the context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm). To load the correct assembly, it's recommended to call the `Load` method by passing the long form of the assembly name. The long form of an assembly name consists of its simple name (such as "System" for the System.dll assembly) along with its version, culture, public key token, and optionally its processor architecture. It corresponds to the assembly's property. The following example illustrates the use of a long name to load the System.dll assembly for .NET Framework 4: @@ -4263,7 +4263,7 @@ To load the correct assembly, it's recommended to call the `Load` method by pass is thrown if `assemblyString` specifies the full assembly name, and the first assembly that matches the simple name has a different version, culture, or public key token. The loader does not continue probing for other assemblies that match the simple name. - In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . + In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . @@ -4365,7 +4365,7 @@ In .NET Core/5+, the target assembly is loaded into the current object in its own isolated load context. - **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. + **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. ]]> @@ -4430,22 +4430,22 @@ In .NET Core/5+, the target assembly is loaded into the current `](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. > [!NOTE] -> Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). +> Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. -- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. +- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. > [!NOTE] -> If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. +> If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. - If you call the method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. + If you call the method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. ]]> @@ -4518,17 +4518,17 @@ In .NET Core/5+, the target assembly is loaded into the current method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. -- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. +- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. If you call this method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. - In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . + In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . ]]> @@ -4606,15 +4606,15 @@ The assembly is loaded using the supplied evidence. The raw bytes representing t Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. -- When you use a method overload with a `Byte[]` parameter to load a COFF image, evidence is inherited from the calling assembly. +- When you use a method overload with a `Byte[]` parameter to load a COFF image, evidence is inherited from the calling assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image are ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image are ignored. - If you call the method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. + If you call the method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. ]]> @@ -4760,7 +4760,7 @@ The assembly is loaded using the supplied evidence. The raw bytes representing t The assembly is loaded into a new AssemblyLoadContext created for this purpose. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm"). - Use the method to load and examine assemblies that have the same identity, but are located in different paths. does not load files into the load-from context, and does not resolve dependencies using the load path, as the method does. is useful in this limited scenario because cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly. + Use the method to load and examine assemblies that have the same identity, but are located in different paths. does not load files into the load-from context, and does not resolve dependencies using the load path, as the method does. is useful in this limited scenario because cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly. **.NET Framework only:** See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. @@ -4828,7 +4828,7 @@ The assembly is loaded into a new AssemblyLoadContext created for this purpose. method to load and examine assemblies that have the same identity, but are located in different paths. does not load files into the context, and does not resolve dependencies using the load path, as the method does. is useful in this limited scenario because cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly. + Use the method to load and examine assemblies that have the same identity, but are located in different paths. does not load files into the context, and does not resolve dependencies using the load path, as the method does. is useful in this limited scenario because cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. @@ -4942,29 +4942,29 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio **.NET Framework only:** Assemblies can be loaded into one of three contexts, or can be loaded without context: -- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. +- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. -- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. It also allows dependencies on that path to be found and loaded because the path information is maintained by the context. , , and are examples of methods that load by path. +- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. It also allows dependencies on that path to be found and loaded because the path information is maintained by the context. , , and are examples of methods that load by path. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. -- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. +- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. -- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. +- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. - The method has the following disadvantages. Consider using instead. + The method has the following disadvantages. Consider using instead. -- If an assembly with the same identity is already loaded in the load-from context, returns the loaded assembly even if a different path was specified. +- If an assembly with the same identity is already loaded in the load-from context, returns the loaded assembly even if a different path was specified. - An assembly can be loaded in the load-from context even though an assembly with the same identity exists in the load context. Interoperability between the two assemblies will not work, leading to errors such as , , or other unexpected behavior. -- Calling with a location that's in the probing path will load the assembly in the load context and not in the load-from context. +- Calling with a location that's in the probing path will load the assembly in the load context and not in the load-from context. -- If an assembly file whose identity is goverened by a binding redirect policy is passed to , the policy will be applied and the assembly will be loaded from the probing path in the load context. +- If an assembly file whose identity is goverened by a binding redirect policy is passed to , the policy will be applied and the assembly will be loaded from the probing path in the load context. - If an assembly is loaded in the load-from context, and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. -- demands and , or , on the specified path. +- demands and , or , on the specified path. - If a native image exists for `assemblyFile`, it is not used. The assembly cannot be loaded as domain neutral. @@ -5053,41 +5053,41 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio Assemblies can be loaded into one of three contexts, or can be loaded without context: -- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. +- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. -- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. , , and are examples of methods that load by path. +- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. , , and are examples of methods that load by path. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. -- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. +- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. -- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. +- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. The load-from context allows an assembly to be loaded from a path not included in probing, and yet allows dependencies on that path to be found and loaded because the path information is maintained by the context. - The method has the following disadvantages. Consider using instead. + The method has the following disadvantages. Consider using instead. -- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. +- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. -- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. +- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. -- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. +- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. -- demands and , or , on the specified path. +- demands and , or , on the specified path. - If a native image exists for `assemblyFile`, it is not used. The assembly cannot be loaded as domain neutral. Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. - If you call this method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. -- When you use a method with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. +- When you use a method with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. ]]> @@ -5188,7 +5188,7 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio ## Remarks - This API is not supported in .NET Core/.NET 5+. This method throws when called. Use instead. + This API is not supported in .NET Core/.NET 5+. This method throws when called. Use instead. The `assemblyFile` parameter must refer to a URI without escape characters. This method supplies escape characters for all invalid characters in the URI. @@ -5199,27 +5199,27 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio Assemblies can be loaded into one of three contexts, or can be loaded without context: -- The load context contains assemblies found by probing: in the global assembly cache, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. +- The load context contains assemblies found by probing: in the global assembly cache, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. -- The load-from context contains assemblies for which the user provided a path that is not included in probing. , , and are examples of methods that load by path. +- The load-from context contains assemblies for which the user provided a path that is not included in probing. , , and are examples of methods that load by path. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. -- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. +- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. -- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. +- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. The load-from context allows an assembly to be loaded from a path that is not included in probing, and yet allows dependencies on that path to be found and loaded because the path information is maintained by the context. - The method has the following disadvantages. Consider using instead. + The method has the following disadvantages. Consider using instead. -- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. +- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. -- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. +- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. -- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. +- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. -- demands and , or , on the specified path. +- demands and , or , on the specified path. - If a native image exists for `assemblyFile`, it is not used. The assembly cannot be loaded as domain-neutral. @@ -5307,41 +5307,41 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio Assemblies can be loaded into one of three contexts, or can be loaded without context: -- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. +- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. -- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. , , and are examples of methods that load by path. +- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. , , and are examples of methods that load by path. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. -- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. +- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. -- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. +- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. The load-from context allows an assembly to be loaded from a path not included in probing, and yet allows dependencies on that path to be found and loaded because the path information is maintained by the context. - The method has the following disadvantages. Consider using instead. + The method has the following disadvantages. Consider using instead. -- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. +- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. -- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. +- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. -- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. +- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. -- demands and , or , on the specified path. +- demands and , or , on the specified path. - If a native image exists for `assemblyFile`, it is not used. The assembly cannot be loaded as domain neutral. Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. - If you call this method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. -- When you use a method with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. +- When you use a method with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. ]]> @@ -5554,7 +5554,7 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio ## Remarks > [!IMPORTANT] -> The overloads of the method are obsolete and have been retained for backward compatibility. The non-obsolete alternative is . +> The overloads of the method are obsolete and have been retained for backward compatibility. The non-obsolete alternative is . ]]> @@ -5637,13 +5637,13 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio ## Remarks > [!IMPORTANT] -> The method is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . +> The method is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . - Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the method overload or the method overload. + Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the method overload or the method overload. - In .NET Core/5+, the target assembly is loaded into the current or the if it's set. + In .NET Core/5+, the target assembly is loaded into the current or the if it's set. - This method first calls . If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number. + This method first calls . If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number. ]]> @@ -5706,13 +5706,13 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio ## Remarks > [!IMPORTANT] -> The method is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . +> The method is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . Evidence is the set of information that constitutes input to security policy decisions, such as what permissions can be granted to code. - Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the method or the method. + Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the method or the method. - This method first calls . If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number. + This method first calls . If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number. ]]> @@ -6165,7 +6165,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e method, you cannot execute code in the assembly. To execute code, the assembly must be loaded into the execution context. + If an assembly has been loaded into the reflection-only context, using the method, you cannot execute code in the assembly. To execute code, the assembly must be loaded into the execution context. ]]> @@ -6244,7 +6244,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e method. + You cannot execute code from an assembly loaded into the reflection-only context. To execute code, the assembly must be loaded into the execution context as well, using the method. The reflection-only context is no different from other contexts. Assemblies that are loaded into the context can be unloaded only by unloading the application domain. @@ -6325,7 +6325,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e ## Remarks Dependencies are not automatically loaded into the reflection-only context. - You cannot execute code from an assembly loaded into the reflection-only context. To execute code, the assembly must be loaded into the execution context as well, using the method. + You cannot execute code from an assembly loaded into the reflection-only context. To execute code, the assembly must be loaded into the execution context as well, using the method. The reflection-only context is no different from other contexts. Assemblies that are loaded into the context can be unloaded only by unloading the application domain. @@ -6410,7 +6410,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e ## Remarks Dependencies are not automatically loaded into the reflection-only context. To automatically load dependencies, handle the event and load the dependency in the event handler. - You cannot execute code from an assembly that has been loaded into the reflection-only context. To execute the code, load the assembly with the method. + You cannot execute code from an assembly that has been loaded into the reflection-only context. To execute the code, load the assembly with the method. The `assemblyFile` parameter must refer to a URI without escape characters. This method supplies escape characters for all invalid characters in the URI. @@ -6794,7 +6794,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e > [!CAUTION] > If you use either of these solutions, you must be certain that it is safe to load `assemblyFile` with full trust. - For a discussion of load contexts, including the load-from context, see the method overload. + For a discussion of load contexts, including the load-from context, see the method overload. ]]> diff --git a/xml/System.Reflection/AssemblyFlagsAttribute.xml b/xml/System.Reflection/AssemblyFlagsAttribute.xml index 094aa13f392..47e8ffbf52e 100644 --- a/xml/System.Reflection/AssemblyFlagsAttribute.xml +++ b/xml/System.Reflection/AssemblyFlagsAttribute.xml @@ -72,7 +72,7 @@ To access the flags that have been specified for an assembly, use the property to obtain an object, then use the property to obtain an value. - To specify flags for a dynamic assembly, set the property of the object that you pass to the method. + To specify flags for a dynamic assembly, set the property of the object that you pass to the method. diff --git a/xml/System.Reflection/AssemblyName.xml b/xml/System.Reflection/AssemblyName.xml index a7ff993db10..bced6a8e924 100644 --- a/xml/System.Reflection/AssemblyName.xml +++ b/xml/System.Reflection/AssemblyName.xml @@ -135,31 +135,31 @@ A "++" becomes "\\+\\+", and a "\\" becomes "\\\\". - This qualified name can be persisted and later used to load the . To search for and load a , use either with the type name only or with the assembly qualified type name. with the type name only will look for the in the caller's assembly and then in the System assembly. with the assembly qualified type name will look for the in any assembly. + This qualified name can be persisted and later used to load the . To search for and load a , use either with the type name only or with the assembly qualified type name. with the type name only will look for the in the caller's assembly and then in the System assembly. with the assembly qualified type name will look for the in any assembly. A fully specified must have the name, culture, public key or public key token, major version, minor version, build number, and revision number parameters. The last four are packaged in the type. - To create a simple name, create an object using the parameterless constructor and set the . The other properties are optional. + To create a simple name, create an object using the parameterless constructor and set the . The other properties are optional. - To create a full strong name, create an object using the parameterless constructor and set the and . The other properties are optional. Use and to set the public key and the strong name. The strong name signing always uses the hash algorithm. + To create a full strong name, create an object using the parameterless constructor and set the and . The other properties are optional. Use and to set the public key and the strong name. The strong name signing always uses the hash algorithm. To ensure that the names are constructed correctly, use the following properties: -- -- -- +- +- +- You can also get the name by using the `/l` option with the [Gacutil.exe (Global Assembly Cache Tool)](/dotnet/framework/tools/gacutil-exe-gac-tool). For a partially specified strong name, create an object using the parameterless constructor and set the name and public key. An assembly created using such an can be signed later using the Assembly Linker (Al.exe). - It is possible to specify a public key and a with inconsistent values. This can be useful in developer scenarios. In this case, the public key retrieved with specifies the correct public key, while the specifies the public and private keys used during development. When the runtime detects a mismatch between the and the public key, it looks up in the registry the correct key that matches the public key. + It is possible to specify a public key and a with inconsistent values. This can be useful in developer scenarios. In this case, the public key retrieved with specifies the correct public key, while the specifies the public and private keys used during development. When the runtime detects a mismatch between the and the public key, it looks up in the registry the correct key that matches the public key. The format of the display name of an is a comma-delimited Unicode string that begins with the name, as follows: `Name <,Culture = CultureInfo> <,Version = Major.Minor.Build.Revision> <, StrongName> <,PublicKeyToken> '\0'` - `Name` is the textual name of the assembly. `CultureInfo` is the RFC1766-format-defined culture. `Major`, `Minor`, `Build`, and `Revision` are the major version, minor version, build number, and revision number of the assembly. `StrongName` is the hexadecimal-encoded low-order 64 bits of the hash value of the public key generated using the SHA-1 hashing algorithm and the public key specified by . `PublicKeyToken` is the hexadecimal-encoded public key specified by . + `Name` is the textual name of the assembly. `CultureInfo` is the RFC1766-format-defined culture. `Major`, `Minor`, `Build`, and `Revision` are the major version, minor version, build number, and revision number of the assembly. `StrongName` is the hexadecimal-encoded low-order 64 bits of the hash value of the public key generated using the SHA-1 hashing algorithm and the public key specified by . `PublicKeyToken` is the hexadecimal-encoded public key specified by . Hexadecimal encoding is defined as the conversion of each byte of a binary object to two hexadecimal characters, progressing from least to most significant byte. Additional display values will be added as deemed necessary. @@ -456,10 +456,10 @@ Note: In .NET for Win ## Remarks When an assembly is loaded, this value can also be obtained using the property. - If the assembly was loaded as a byte array, this property returns the location of the caller of the method overload, not the location of the loaded assembly. + If the assembly was loaded as a byte array, this property returns the location of the caller of the method overload, not the location of the loaded assembly. > [!NOTE] -> Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). +> Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). @@ -815,14 +815,14 @@ Note: In .NET for Win mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 ``` - Writing your own code to parse display names is not recommended. Instead, pass the display name to the constructor, which parses it and populates the appropriate fields of the new . + Writing your own code to parse display names is not recommended. Instead, pass the display name to the constructor, which parses it and populates the appropriate fields of the new . When an assembly is loaded, this value can also be obtained using the property. ## Examples - The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the code example sets the , , , and properties, which together comprise an assembly's full name, or display name. The property is then used to retrieve the display name. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the code example sets the , , , and properties, which together comprise an assembly's full name, or display name. The property is then used to retrieve the display name. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/CodeBase/assemblyname_codebase.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/CodeBase/assemblyname_codebase.vb" id="Snippet4"::: @@ -1032,7 +1032,7 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 method is used to give the assembly a public key. The method is then used to retrieve the public key, which is displayed to the console. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to give the assembly a public key. The method is then used to retrieve the public key, which is displayed to the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/Flags/assemblyname_keypair.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/Flags/assemblyname_keypair.vb" id="Snippet2"::: @@ -1099,7 +1099,7 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 method is used to set the assembly's public key token. The method is then used to retrieve the public key token, which is displayed to the console. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to set the assembly's public key token. The method is then used to retrieve the public key token, which is displayed to the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/Flags/assemblyname_keypair.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/Flags/assemblyname_keypair.vb" id="Snippet3"::: @@ -1162,7 +1162,7 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 ## Remarks > [!IMPORTANT] -> Starting with the .NET Framework 4, the property of an object that is returned by the method is if there is no hash algorithm for the referenced assembly, or if the hash algorithm of the referenced assembly is not identified by the enumeration. In previous versions of the .NET Framework, the property returned in this situation. +> Starting with the .NET Framework 4, the property of an object that is returned by the method is if there is no hash algorithm for the referenced assembly, or if the hash algorithm of the referenced assembly is not identified by the enumeration. In previous versions of the .NET Framework, the property returned in this situation. @@ -1541,12 +1541,12 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 method to provide a public key token. Otherwise, a is thrown when the method is called. + You must also use the method to provide a public key token. Otherwise, a is thrown when the method is called. ## Examples - The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to give the assembly a public key. The method is then used to retrieve the public key, which is displayed to the console. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to give the assembly a public key. The method is then used to retrieve the public key, which is displayed to the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.vb" id="Snippet1"::: @@ -1608,12 +1608,12 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 method, you must also use the method to provide a public key token. Otherwise, a is thrown when the method is called. + When you set the public key by calling the method, you must also use the method to provide a public key token. Otherwise, a is thrown when the method is called. ## Examples - The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to set the assembly's public key token. The method is then used to retrieve the public key token, which is displayed to the console. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to set the assembly's public key token. The method is then used to retrieve the public key token, which is displayed to the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.vb" id="Snippet2"::: @@ -1887,7 +1887,7 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 ## Examples - The following example gets an object for a hypothetical `MyAssembly.exe` assembly, and then uses the method to retrieve the full assembly name, or display name. + The following example gets an object for a hypothetical `MyAssembly.exe` assembly, and then uses the method to retrieve the full assembly name, or display name. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/GetAssemblyName/assemblyname_getassemblyname.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/GetAssemblyName/assemblyname_getassemblyname.vb" id="Snippet2"::: @@ -2023,9 +2023,9 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 information indicates, for example, that the assembly cannot execute side-by-side with other versions due to conflicts over a device driver. + information indicates, for example, that the assembly cannot execute side-by-side with other versions due to conflicts over a device driver. - Currently, always returns , and is not used by the loader. This property is reserved for a future feature. + Currently, always returns , and is not used by the loader. This property is reserved for a future feature. ]]> diff --git a/xml/System.Reflection/AssemblyVersionAttribute.xml b/xml/System.Reflection/AssemblyVersionAttribute.xml index b95cc9663f1..5f7df368e7b 100644 --- a/xml/System.Reflection/AssemblyVersionAttribute.xml +++ b/xml/System.Reflection/AssemblyVersionAttribute.xml @@ -111,14 +111,14 @@ You can mitigate some of these issues by limiting the use of time-based versions The assembly major and minor versions are used as the type library version number when the assembly is exported. Some COM hosts do not accept type libraries with the version number 0.0. Therefore, if you want to expose an assembly to COM clients, set the assembly version explicitly to 1.0 in the `AssemblyVersionAttribute` page for projects created outside Visual Studio 2005 and with no `AssemblyVersionAttribute` specified. Do this even when the assembly version is 0.0. All projects created in Visual Studio 2005 have a default assembly version of 1.0.*. - To get the name of an assembly you have loaded, call on the assembly to get an , and then get the property. To get the name of an assembly you have not loaded, call from your client application to check the assembly version that your application uses. + To get the name of an assembly you have loaded, call on the assembly to get an , and then get the property. To get the name of an assembly you have not loaded, call from your client application to check the assembly version that your application uses. The attribute can only be applied once. Some Visual Studio project templates already include the attribute. In those projects, adding the attribute in code causes a compiler error. ## Examples - The following example uses the attribute to assign a version number to an assembly. At compile time, this version information is stored with the assembly's metadata. At run time, the example retrieves the value of the property on a type found in the assembly to get a reference to the executing assembly, and it retrieves the assembly's version information from the property of the object returned by the method. + The following example uses the attribute to assign a version number to an assembly. At compile time, this version information is stored with the assembly's metadata. At run time, the example retrieves the value of the property on a type found in the assembly to get a reference to the executing assembly, and it retrieves the assembly's version information from the property of the object returned by the method. :::code language="csharp" source="~/snippets/csharp/System/Version/Overview/example1.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Version/Overview/example1.vb" id="Snippet6"::: diff --git a/xml/System.Reflection/Binder.xml b/xml/System.Reflection/Binder.xml index a9caf7c3932..07d19d8a756 100644 --- a/xml/System.Reflection/Binder.xml +++ b/xml/System.Reflection/Binder.xml @@ -68,7 +68,7 @@ class are used by methods such as , which selects from a set of possible members to execute, based on a set of parameter types and argument values; , which selects a method based on parameter types; and so on. + Implementations of the class are used by methods such as , which selects from a set of possible members to execute, based on a set of parameter types and argument values; , which selects a method based on parameter types; and so on. A default implementation of the class is provided by the property. @@ -193,9 +193,9 @@ , the default binder implementation provided by simply returns the first element of `match`. No selection is done. + If `bindingAttr` does not include , the default binder implementation provided by simply returns the first element of `match`. No selection is done. - This method controls the binding provided by . + This method controls the binding provided by . If a binder implementation allows coercion of string values to numeric types, the `culture` parameter is necessary to convert a string that represents 1000 to a value, because 1000 is represented differently by different cultures. The default binder does not do such string coercions. @@ -300,9 +300,9 @@ ## Remarks The default binder takes into account both parameters that have values and `params` arrays (`ParamArray` arrays in Visual Basic). Thus, it is possible to find a match in cases where `args` and `match` do not contain the same number of elements. - The binder enables a client to map the array of arguments back to its original form if the argument array has been manipulated by . Use this remap capability to get back by-reference arguments when such arguments are present. When you pass arguments by name, the binder reorders the argument array. The `state` parameter keeps track of argument reordering, thus enabling the binder's method to reorder the argument array to its original form. + The binder enables a client to map the array of arguments back to its original form if the argument array has been manipulated by . Use this remap capability to get back by-reference arguments when such arguments are present. When you pass arguments by name, the binder reorders the argument array. The `state` parameter keeps track of argument reordering, thus enabling the binder's method to reorder the argument array to its original form. - The method is used by the method. + The method is used by the method. If a binder implementation allows coercion of string values to numeric types, the `culture` parameter is necessary to convert a string that represents 1000 to a value, because 1000 is represented differently by different cultures. The default binder does not do such string coercions. diff --git a/xml/System.Reflection/BindingFlags.xml b/xml/System.Reflection/BindingFlags.xml index dbb26b4d540..b2347942dbe 100644 --- a/xml/System.Reflection/BindingFlags.xml +++ b/xml/System.Reflection/BindingFlags.xml @@ -92,39 +92,39 @@ ## Remarks These `BindingFlags` control binding for a great many classes in the `System`, `System.Reflection`, and `System.Runtime` namespaces that invoke, create, get, set, and find members and types. - `BindingFlags` are used in the following methods and other places such as : + `BindingFlags` are used in the following methods and other places such as : -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- `InvokeMember` and `GetMethod` are especially important. @@ -137,7 +137,7 @@ > [!NOTE] > You must specify `Instance` or `Static` along with `Public` or `NonPublic` or no members will be returned. - The following table lists the coercions performed by the default . This table applies especially to the `BindingFlags.ExactBinding` binding flag. The general principle is that should perform only widening coercions, which never lose data. An example of a widening coercion is coercing a value that is a 32-bit signed integer to a value that is a 64-bit signed integer. This is distinguished from a narrowing coercion, which may lose data. An example of a narrowing coercion is coercing a 64-bit signed integer to a 32-bit signed integer. + The following table lists the coercions performed by the default . This table applies especially to the `BindingFlags.ExactBinding` binding flag. The general principle is that should perform only widening coercions, which never lose data. An example of a widening coercion is coercing a value that is a 32-bit signed integer to a value that is a 64-bit signed integer. This is distinguished from a narrowing coercion, which may lose data. An example of a narrowing coercion is coercing a 64-bit signed integer to a 32-bit signed integer. |Source Type|Target Type| |-----------------|-----------------| diff --git a/xml/System.Reflection/ConstructorInfo.xml b/xml/System.Reflection/ConstructorInfo.xml index ffd8f4368bf..2734ebef483 100644 --- a/xml/System.Reflection/ConstructorInfo.xml +++ b/xml/System.Reflection/ConstructorInfo.xml @@ -97,15 +97,15 @@ on a `ConstructorInfo` returned by either the or method of a object. + `ConstructorInfo` is used to discover the attributes of a constructor as well as to invoke a constructor. Objects are created by calling on a `ConstructorInfo` returned by either the or method of a object. > [!NOTE] -> inherits from several members, such as , that can be used to examine generic methods. In the .NET Framework version 2.0 constructors cannot be generic, so these members return `false` or `null`. +> inherits from several members, such as , that can be used to examine generic methods. In the .NET Framework version 2.0 constructors cannot be generic, so these members return `false` or `null`. ## Examples - The following example uses `ConstructorInfo` with and to find the constructors that match the specified search criteria. + The following example uses `ConstructorInfo` with and to find the constructors that match the specified search criteria. :::code language="csharp" source="~/snippets/csharp/System/Type/GetConstructor/type_getconstructor3.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetConstructor/type_getconstructor3.vb" id="Snippet1"::: @@ -442,7 +442,7 @@ Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked using reflection whenever the code is fully trusted. > [!NOTE] -> To create an instance of a value type that has no instance constructors, use the method. +> To create an instance of a value type that has no instance constructors, use the method. This method is a convenience method for the following overloaded version, using default values. This method cannot be overridden. @@ -537,7 +537,7 @@ Note: In .NET for Win Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked using reflection whenever the code is fully trusted. > [!NOTE] -> To create an instance of a value type that has no instance constructors, use the method. +> To create an instance of a value type that has no instance constructors, use the method. > [!NOTE] > This method can be used to access non-public members if the caller has been granted with the flag and if the grant set of the non-public members is restricted to the caller's grant set, or a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later. @@ -615,7 +615,7 @@ Note: In .NET for Win . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a constructor. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a constructor. diff --git a/xml/System.Reflection/CustomAttributeData.xml b/xml/System.Reflection/CustomAttributeData.xml index 4fc65e692a3..518ad51de86 100644 --- a/xml/System.Reflection/CustomAttributeData.xml +++ b/xml/System.Reflection/CustomAttributeData.xml @@ -84,7 +84,7 @@ , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. + Code that is being examined in the reflection-only context cannot be executed, so it is not always possible to examine custom attributes by creating instances of them and then examining their properties, using methods like , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. The class allows examination of custom attributes in the reflection-only context by providing an abstraction for attributes. The members of this class can be used to obtain the positional arguments and named arguments of the attribute. Use the property to get a list of structures that represent the positional arguments, and use the property to get a list of structures that represent the named arguments. @@ -94,15 +94,15 @@ When you have a structure for an argument, whether named or positional, use the property to get the type and the property to get the value. > [!NOTE] -> For an array argument, the property returns a generic of objects. Each object in the collection represents the corresponding element of the array. +> For an array argument, the property returns a generic of objects. Each object in the collection represents the corresponding element of the array. - can be used in the execution context as well as in the reflection-only context. For example, you might want to avoid loading the assembly that contains the code for a custom attribute. Using the class is different from using methods like : + can be used in the execution context as well as in the reflection-only context. For example, you might want to avoid loading the assembly that contains the code for a custom attribute. Using the class is different from using methods like : - The properties and methods of only provide you with the values that were specified for the attribute instance, not the semantics of the constructor. For example, a string argument of an attribute might be converted internally to some other representation, and returned in a canonical form; or a property might have side effects when the actual attribute code is executed. - The properties and methods of do not allow you to retrieve the custom attributes inherited from base classes. - To create instances of the class, use the `static` (`Shared` in Visual Basic) factory methods. + To create instances of the class, use the `static` (`Shared` in Visual Basic) factory methods. @@ -362,7 +362,7 @@ ## Remarks This method gets the positional arguments that were specified for the custom attribute instance without executing any of the custom attribute code. Thus, it can be used in the reflection-only context. - Use the method to get the named arguments specified for the attribute instance. + Use the method to get the named arguments specified for the attribute instance. @@ -500,7 +500,7 @@ method that can always be used in the Reflection-only context. + This method provides an alternative to the method that can always be used in the Reflection-only context. @@ -511,7 +511,7 @@ The attribute that is applied to the type demonstrates array properties, with both positional and named arguments. - The method is used in `Main()` to get the custom attributes applied to the assembly. The return value of the method is passed to the `ShowAttributeData` method. + The method is used in `Main()` to get the custom attributes applied to the assembly. The return value of the method is passed to the `ShowAttributeData` method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: @@ -591,7 +591,7 @@ The attribute that is applied to the type demonstrates array properties, with both positional and named arguments. - The method is used in `Main()` to get the custom attributes that were applied to a type and to a test method ( derives from ). The return value of is passed to the `ShowAttributeData` method. + The method is used in `Main()` to get the custom attributes that were applied to a type and to a test method ( derives from ). The return value of is passed to the `ShowAttributeData` method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: @@ -718,7 +718,7 @@ method that can always be used in the Reflection-only context. + This method provides an alternative to the method that can always be used in the Reflection-only context. @@ -729,7 +729,7 @@ The attribute that is applied to the type demonstrates array properties, with both positional and named arguments. - The method is used in `Main()` to retrieve the custom attributes applied to a parameter of a test method. The return value of is passed to the `ShowAttributeData` method. + The method is used in `Main()` to retrieve the custom attributes applied to a parameter of a test method. The return value of is passed to the `ShowAttributeData` method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: @@ -843,7 +843,7 @@ The list that is returned contains only the named arguments that were specified for the attribute instance. - Use the method to get the positional arguments that were specified for the attribute instance. + Use the method to get the positional arguments that were specified for the attribute instance. @@ -923,7 +923,7 @@ The attribute that is applied to the type demonstrates array properties, with both positional and named arguments. - In this example, the method is used in the `ShowAttributeData` method, to identify the attribute whose data is being displayed. + In this example, the method is used in the `ShowAttributeData` method, to identify the attribute whose data is being displayed. :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: diff --git a/xml/System.Reflection/CustomAttributeExtensions.xml b/xml/System.Reflection/CustomAttributeExtensions.xml index e9ac77523d4..b7e61f363f6 100644 --- a/xml/System.Reflection/CustomAttributeExtensions.xml +++ b/xml/System.Reflection/CustomAttributeExtensions.xml @@ -125,11 +125,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified assembly. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -188,11 +188,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified member. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -254,11 +254,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified module. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -317,11 +317,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified parameter. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -384,11 +384,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -453,11 +453,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified parameter, and optionally inspects the ancestors of that parameter. A custom attribute matching , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -529,11 +529,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified assembly. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -602,11 +602,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified member. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -678,11 +678,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified module. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -751,11 +751,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified parameter. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -830,11 +830,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -909,11 +909,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified parameter, and optionally inspects the ancestors of that parameter. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> diff --git a/xml/System.Reflection/CustomAttributeFormatException.xml b/xml/System.Reflection/CustomAttributeFormatException.xml index 247a95b158c..f5abb016e49 100644 --- a/xml/System.Reflection/CustomAttributeFormatException.xml +++ b/xml/System.Reflection/CustomAttributeFormatException.xml @@ -130,8 +130,8 @@ |Property|Value| |--------------|-----------| -||null| -||The empty string ("").| +||null| +||The empty string ("").| ]]> @@ -185,7 +185,7 @@ |Property|Value| |--------------|-----------| -||`null`| +||`null`| ]]> @@ -303,8 +303,8 @@ |Property|Value| |--------------|-----------| -||The `inner` exception.| -||The error message string.| +||The `inner` exception.| +||The error message string.| ]]> diff --git a/xml/System.Reflection/CustomAttributeNamedArgument.xml b/xml/System.Reflection/CustomAttributeNamedArgument.xml index 7d3111e85ca..78e316b1ad6 100644 --- a/xml/System.Reflection/CustomAttributeNamedArgument.xml +++ b/xml/System.Reflection/CustomAttributeNamedArgument.xml @@ -93,14 +93,14 @@ , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. + Code that is being examined in the reflection-only context cannot be executed, so it is not always possible to examine custom attributes by creating instances of them and then examining their properties, using methods like , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. The structure is used by the class to provide access to a named argument specified for a custom attribute instance, without executing the code of the corresponding property of the custom attribute type. The property returns a structure that contains the type and value of the named argument. > [!IMPORTANT] > Whether an argument is named or positional, you must access its type and value by using the structure. - To create instances of the class, use the `static` factory method. + To create instances of the class, use the `static` factory method. @@ -589,7 +589,7 @@ if the two structures are equal; otherwise, . - .]]> + .]]> @@ -643,7 +643,7 @@ if the two structures are different; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection/CustomAttributeTypedArgument.xml b/xml/System.Reflection/CustomAttributeTypedArgument.xml index 3f502dfec79..8467c8a06e4 100644 --- a/xml/System.Reflection/CustomAttributeTypedArgument.xml +++ b/xml/System.Reflection/CustomAttributeTypedArgument.xml @@ -93,15 +93,15 @@ , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. + Code that is being examined in the reflection-only context cannot be executed, so it is not always possible to examine custom attributes by creating instances of them and then examining their properties, using methods like , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. The structure is used by the class to provide access to the type and value of a positional argument specified for a custom attribute instance, without executing the attribute constructor. It also provides access to the type and value of a named argument without executing the code of the corresponding property of the custom attribute type. The types and values of all the positional and named arguments of an attribute instance are provided by structures. The positional attributes returned by the property are directly represented by structures, but the named arguments returned by the property are represented by structures; to get the structure for a named argument, use the property. - If an argument is an array of values, the property of the that represents the argument returns a generic of objects. Each object in the collection represents the corresponding element of the array. + If an argument is an array of values, the property of the that represents the argument returns a generic of objects. Each object in the collection represents the corresponding element of the array. - To create instances of the class, use the `static` factory method. + To create instances of the class, use the `static` factory method. @@ -176,7 +176,7 @@ constructor. + The `value` parameter cannot be `null` for this constructor, because the argument type is inferred from the type of `value`. To specify a `null` value, use the constructor. This constructor is for use by inheritors of the class. It is not intended for use in application code. @@ -522,7 +522,7 @@ if the two structures are equal; otherwise, . - .]]> + .]]> @@ -576,7 +576,7 @@ if the two structures are different; otherwise, . - .]]> + .]]> @@ -683,7 +683,7 @@ ## Remarks If the represents an array argument, this property returns a `ReadOnlyCollection` (`ReadOnlyCollection(Of CustomAttributeTypedArgument)` in Visual Basic). Each element of the collection represents the corresponding element of the array argument. - The type of the value can be obtained by using the property. gets the actual type of the value returned by the property for simple arguments or for elements of array arguments. It returns the array type for array arguments. + The type of the value can be obtained by using the property. gets the actual type of the value returned by the property for simple arguments or for elements of array arguments. It returns the array type for array arguments. @@ -699,7 +699,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: - | + | ]]> diff --git a/xml/System.Reflection/EventInfo.xml b/xml/System.Reflection/EventInfo.xml index c95dba567d4..083085ec963 100644 --- a/xml/System.Reflection/EventInfo.xml +++ b/xml/System.Reflection/EventInfo.xml @@ -98,7 +98,7 @@ class to inspect events and to hook up event handlers, as shown in the example code for the method. + Use the class to inspect events and to hook up event handlers, as shown in the example code for the method. > [!NOTE] > is not intended to be used to raise events. An object raises events as dictated by its internal state. @@ -109,7 +109,7 @@ The event model works equally well for single-cast and multicast delegates. When the delegate's invoke method is called, only a single object will have a method called on it. A multicast modifier can be applied to a delegate declaration, which allows multiple methods to be called when the invoke method of the delegate is called. - Calling on `EventInfo` when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. + Calling on `EventInfo` when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. @@ -243,11 +243,11 @@ You might use the `AddEventHandler` method when you load a type after the progra ## Examples The following example creates an instance of the class, creates an event handler using a dynamic assembly, and hooks up the dynamic event handler. All actions are performed using late binding. - The instance is stored in a variable of type , and all code that accesses the does so late-bound. The example uses the method to get the event, and the property to get the delegate type for the event. + The instance is stored in a variable of type , and all code that accesses the does so late-bound. The example uses the method to get the event, and the property to get the delegate type for the event. The example gets a for the `Invoke` method of the delegate type and obtains the signature of the delegate from the instance. The example then creates a dynamic assembly with one module containing a single type named `Handler` and gives the type a `static` method (`Shared` method in Visual Basic) named `DynamicHandler` that handles the event. - After the dynamic type is created, the example gets a for the finished method and uses it to create a delegate instance. This instance is passed to the method to hook up the event. The program then pauses to allow the event to be raised. + After the dynamic type is created, the example gets a for the finished method and uses it to create a delegate instance. This instance is passed to the method to hook up the event. The program then pauses to allow the event to be raised. :::code language="csharp" source="~/snippets/csharp/System.Reflection/EventInfo/AddEventHandler/source.cs"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/EventInfo/AddEventHandler/source.vb"::: @@ -321,7 +321,7 @@ Note: In with a value of `true`. + This property is the equivalent of calling the with a value of `true`. ]]> @@ -773,13 +773,13 @@ add_( handler) ## Remarks The metadata for an event can associate four kinds of methods with the event: -- The `.addon` directive specifies the method used to add event handlers. Use the method to retrieve an for that method. +- The `.addon` directive specifies the method used to add event handlers. Use the method to retrieve an for that method. -- The `.removeon` directive specifies the method used to detach event handlers. Use the method to retrieve an for that method. +- The `.removeon` directive specifies the method used to detach event handlers. Use the method to retrieve an for that method. -- The `.fire` directive specifies the method used to raise the event. Use the method to retrieve an for that method. +- The `.fire` directive specifies the method used to raise the event. Use the method to retrieve an for that method. -- The `.other` directive specifies any other methods associated with the event. Use the method to retrieve an array of objects for those methods. +- The `.other` directive specifies any other methods associated with the event. Use the method to retrieve an array of objects for those methods. The methods associated with an event using the `.other` directive have no special significance to the runtime. The C# and Visual Basic compilers do not use the `.other` directive. @@ -839,13 +839,13 @@ add_( handler) ## Remarks The metadata for an event can associate four kinds of methods with the event: -- The `.addon` directive specifies the method used to add event handlers. Use the method to retrieve an for that method. +- The `.addon` directive specifies the method used to add event handlers. Use the method to retrieve an for that method. -- The `.removeon` directive specifies the method used to detach event handlers. Use the method to retrieve an for this method. +- The `.removeon` directive specifies the method used to detach event handlers. Use the method to retrieve an for this method. -- The `.fire` directive specifies the method used to raise the event. Use the method to retrieve an for this method. +- The `.fire` directive specifies the method used to raise the event. Use the method to retrieve an for this method. -- The `.other` directive specifies any other methods associated with the event. Use the method to retrieve an array of objects for those methods. +- The `.other` directive specifies any other methods associated with the event. Use the method to retrieve an array of objects for those methods. The methods associated with an event using the `.other` directive have no special significance to the runtime. The C# and Visual Basic compilers do not use the `.other` directive. @@ -1335,7 +1335,7 @@ remove_( handler) . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is an event. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is an event. ]]> @@ -1492,7 +1492,7 @@ remove_( handler) with a value of `true`. + This property is the equivalent of calling the with a value of `true`. ]]> @@ -1637,7 +1637,7 @@ Note: In with a value of `true`. + This property is the equivalent of calling the with a value of `true`. ]]> diff --git a/xml/System.Reflection/ExceptionHandlingClause.xml b/xml/System.Reflection/ExceptionHandlingClause.xml index 90746e1b9b0..b8934305a71 100644 --- a/xml/System.Reflection/ExceptionHandlingClause.xml +++ b/xml/System.Reflection/ExceptionHandlingClause.xml @@ -62,13 +62,13 @@ class provides information about the clauses in a `try`…`catch`…`finally` block (`Try`…`Catch`…`Finally` in Visual Basic). To get a list of exception-handling clauses in a method, obtain a that represents the method. Use the method to obtain a object, and then use the property to get the list of clauses. + The class provides information about the clauses in a `try`…`catch`…`finally` block (`Try`…`Catch`…`Finally` in Visual Basic). To get a list of exception-handling clauses in a method, obtain a that represents the method. Use the method to obtain a object, and then use the property to get the list of clauses. > [!NOTE] > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. You can use Ildasm.exe to examine the MSIL for the compiled code example, to see how the offsets and lengths are calculated. @@ -185,7 +185,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -309,7 +309,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -378,7 +378,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -446,7 +446,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -557,7 +557,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -625,7 +625,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. diff --git a/xml/System.Reflection/ExceptionHandlingClauseOptions.xml b/xml/System.Reflection/ExceptionHandlingClauseOptions.xml index 703085068b0..0380ee90a81 100644 --- a/xml/System.Reflection/ExceptionHandlingClauseOptions.xml +++ b/xml/System.Reflection/ExceptionHandlingClauseOptions.xml @@ -57,13 +57,13 @@ object and call the method to obtain the method body. Use the property to obtain a list of objects. + To examine the exception-handling clauses in a method, obtain a object and call the method to obtain the method body. Use the property to obtain a list of objects. > [!NOTE] > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example provided for the class. diff --git a/xml/System.Reflection/FieldInfo.xml b/xml/System.Reflection/FieldInfo.xml index 16c8c7954fa..cb6f4be5bef 100644 --- a/xml/System.Reflection/FieldInfo.xml +++ b/xml/System.Reflection/FieldInfo.xml @@ -97,14 +97,14 @@ class does not have a public constructor. objects are obtained by calling either the or method of a `Type` object. + The field information is obtained from metadata. The class does not have a public constructor. objects are obtained by calling either the or method of a `Type` object. Fields are variables defined in the class. provides access to the metadata for a field within a class and provides dynamic set and get functionality for the field. The class is not loaded into memory until invoke or get is called on the object. ## Examples - The following example uses the method to get the field-related information from the class, and then displays field attributes. + The following example uses the method to get the field-related information from the class, and then displays field attributes. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/Overview/fieldinfo.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/Overview/fieldinfo.vb" id="Snippet1"::: @@ -406,7 +406,7 @@ ## Examples - The following example creates a field, gets its type and , and displays its . + The following example creates a field, gets its type and , and displays its . :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/FieldType/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/FieldType/source.vb" id="Snippet1"::: @@ -492,7 +492,7 @@ ## Examples - The following code example uses the method to get objects for the fields of a type, gets a structure for each field, and then retrieves the objects from the handles using this overload of the method. + The following code example uses the method to get objects for the fields of a type, gets a structure for each field, and then retrieves the objects from the handles using this overload of the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/GetFieldFromHandle/fieldinfo_getfieldfromhandle.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/GetFieldFromHandle/fieldinfo_getfieldfromhandle.vb" id="Snippet1"::: @@ -573,14 +573,14 @@ Implementations are compatible in some cases. For example, a single implementation is shared by all types that are constructed from a particular generic type definition by using reference types for the generic type arguments. For example, `MyType`, `MyType`, and `MyType` all share the same implementation. In this situation, the object that is returned represents a field on the type that `declaringType` specifies, regardless of the original source of `handle`. This practice is not recommended, because it works only if the generic type arguments of the constructed type are reference types. - If a generic argument is a value type, the runtime type handle of the constructed type is not compatible with runtime field handles from constructions that have a reference type in the same generic parameter position, or that have a different value type in that position. In that case, the only way to use the overload is to ensure that `declaringType` is the runtime type handle for the constructed type that `handle` belongs to. + If a generic argument is a value type, the runtime type handle of the constructed type is not compatible with runtime field handles from constructions that have a reference type in the same generic parameter position, or that have a different value type in that position. In that case, the only way to use the overload is to ensure that `declaringType` is the runtime type handle for the constructed type that `handle` belongs to. ## Examples The following example shows how to retrieve objects for fields on constructed generic classes. The example defines the generic type `Test` (`Test(Of T)` in Visual Basic) with a single field named `TestField`, of type `T`. The example gets the and for the case where `T` is , and demonstrates the following: -- An exception is thrown if the method overload is used. This is true even if the field is not of type `T`. +- An exception is thrown if the method overload is used. This is true even if the field is not of type `T`. - A is retrieved successfully if the runtime type handle is from the same construction as the runtime field handle, in this case `Test`. @@ -686,9 +686,9 @@ , , and , which are used to obtain custom modifiers from a function pointer. + A modified type supports , , and , which are used to obtain custom modifiers from a function pointer. - To obtain the normal, unmodified type from a modified type, use . + To obtain the normal, unmodified type from a modified type, use . This method is provided for designers of managed compilers. For more information on custom modifiers, see classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -747,7 +747,7 @@ and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -864,7 +864,7 @@ and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -972,12 +972,12 @@ > To use this functionality, your application should target .NET Framework 3.5 or later. ## Examples - The following example uses the method to retrieve the value of a static field. Note that the value of the `obj` argument is `null`. + The following example uses the method to retrieve the value of a static field. Note that the value of the `obj` argument is `null`. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/GetValue/getfldval.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/GetValue/getfldval.vb" id="Snippet1"::: - The following example retrieves an array of objects that represents the fields of the `FieldsClass` type, and then calls the to display the value of each field for the `fieldsInst` object. + The following example retrieves an array of objects that represents the fields of the `FieldsClass` type, and then calls the to display the value of each field for the `fieldsInst` object. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/GetValue/fieldinfo_getvalue.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/GetValue/fieldinfo_getvalue.vb" id="Snippet1"::: @@ -1114,7 +1114,7 @@ Note: In .NET for Win The visibility of a field is exactly described by if the only visibility modifier is `internal` (`Friend` in Visual Basic). This property is `false` for fields that are `protected internal` in C# (`Protected Friend` in Visual Basic); use the property to identify such fields. ## Examples - The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/IsAssembly/source.vb" id="Snippet1"::: @@ -1183,7 +1183,7 @@ Note: In .NET for Win The visibility of a field is exactly described by if the only visibility modifier is `protected`. This property is `false` for fields that are `protected internal` in C# (`Protected Friend` in Visual Basic); use the property to identify such fields. ## Examples - The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/source.cs" id="Snippet1"::: @@ -1256,7 +1256,7 @@ Note: In .NET for Win The visibility of a field is exactly described by if the visibility modifier is `private protected` in C# or `Private Protected` in Visual Basic. ## Examples - The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/IsAssembly/source.vb" id="Snippet1"::: @@ -1329,7 +1329,7 @@ Note: In .NET for Win The visibility of a field is exactly described by if the visibility modifier is `protected internal` in C# (`Protected Friend` in Visual Basic). ## Examples - The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/IsAssembly/source.vb" id="Snippet1"::: @@ -1807,7 +1807,7 @@ Myfieldb - B readonly field, IsInitOnly = True , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -1818,7 +1818,7 @@ Myfieldb - B readonly field, IsInitOnly = True Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -1873,7 +1873,7 @@ Myfieldb - B readonly field, IsInitOnly = True , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -1884,7 +1884,7 @@ Myfieldb - B readonly field, IsInitOnly = True Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -1939,7 +1939,7 @@ Myfieldb - B readonly field, IsInitOnly = True , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -1950,7 +1950,7 @@ Myfieldb - B readonly field, IsInitOnly = True Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -2162,7 +2162,7 @@ Myfieldb - B static field; IsStatic - True . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a field. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a field. diff --git a/xml/System.Reflection/GenericParameterAttributes.xml b/xml/System.Reflection/GenericParameterAttributes.xml index 3d354d85eac..7575bf1765a 100644 --- a/xml/System.Reflection/GenericParameterAttributes.xml +++ b/xml/System.Reflection/GenericParameterAttributes.xml @@ -73,7 +73,7 @@ ## Examples - The following code example defines a generic type `Test` with two type parameters. The second type parameter has a base class constraint and a reference type constraint. When the program executes, the constraints are examined using the property and the method. + The following code example defines a generic type `Test` with two type parameters. The second type parameter has a base class constraint and a reference type constraint. When the program executes, the constraints are examined using the property and the method. :::code language="csharp" source="~/snippets/csharp/System/Type/GenericParameterAttributes/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GenericParameterAttributes/source.vb" id="Snippet1"::: diff --git a/xml/System.Reflection/ICustomAttributeProvider.xml b/xml/System.Reflection/ICustomAttributeProvider.xml index 12334c3116c..176db36a0dd 100644 --- a/xml/System.Reflection/ICustomAttributeProvider.xml +++ b/xml/System.Reflection/ICustomAttributeProvider.xml @@ -133,7 +133,7 @@ on or when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. + Calling on or when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. This method returns custom attributes defined directly on a non-inherited member only. @@ -199,7 +199,7 @@ This method returns custom attributes defined directly on a non-inherited member only. - Calling on or when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. + Calling on or when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. ]]> diff --git a/xml/System.Reflection/IReflect.xml b/xml/System.Reflection/IReflect.xml index a0193b341de..a1dc3ff8114 100644 --- a/xml/System.Reflection/IReflect.xml +++ b/xml/System.Reflection/IReflect.xml @@ -251,7 +251,7 @@ On .NET Framework, the interface is used to in method retrieves an array of objects by using the name and binding attribute that correspond to all public members or to all members that match a specified name. The case of the specified name is observed or ignored, as specified by . + The method retrieves an array of objects by using the name and binding attribute that correspond to all public members or to all members that match a specified name. The case of the specified name is observed or ignored, as specified by . ]]> @@ -847,9 +847,9 @@ On .NET Framework, the interface is used to in A method is invoked if the number of parameters in the method declaration equals the number of arguments in the specified argument list, and the type of each argument can be converted by the binder to the type of the parameter. > [!NOTE] -> The array of parameter modifiers passed to the method must contain a single parameter modifier. Only the first parameter modifier is considered when determining which argument needs to be passed by reference when exposed to COM. +> The array of parameter modifiers passed to the method must contain a single parameter modifier. Only the first parameter modifier is considered when determining which argument needs to be passed by reference when exposed to COM. - The binder finds all matching methods, in accordance with the type of binding requested (, , and so on). The set of methods is filtered by the name, number of arguments, and a set of search modifiers defined in the binder. After the method is selected, it is invoked, and accessibility is checked at that point. The search may control which set of methods is searched based upon the accessibility attribute associated with the method. selects the method to be invoked. The default binder selects the most specific match. + The binder finds all matching methods, in accordance with the type of binding requested (, , and so on). The set of methods is filtered by the name, number of arguments, and a set of search modifiers defined in the binder. After the method is selected, it is invoked, and accessibility is checked at that point. The search may control which set of methods is searched based upon the accessibility attribute associated with the method. selects the method to be invoked. The default binder selects the most specific match. Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked through reflection whenever the code is fully trusted. diff --git a/xml/System.Reflection/ImageFileMachine.xml b/xml/System.Reflection/ImageFileMachine.xml index 063afeda242..04c95f79add 100644 --- a/xml/System.Reflection/ImageFileMachine.xml +++ b/xml/System.Reflection/ImageFileMachine.xml @@ -55,14 +55,14 @@ Identifies the platform targeted by an executable. - method. - + method. + > [!NOTE] -> The values in this enumeration correspond to the constants IMAGE_FILE_MACHINE_I386, IMAGE_FILE_MACHINE_IA64, and IMAGE_FILE_MACHINE_AMD64 in the unmanaged Windows API, which are accessed by the unmanaged `GetPEKind` function. - +> The values in this enumeration correspond to the constants IMAGE_FILE_MACHINE_I386, IMAGE_FILE_MACHINE_IA64, and IMAGE_FILE_MACHINE_AMD64 in the unmanaged Windows API, which are accessed by the unmanaged `GetPEKind` function. + ]]> diff --git a/xml/System.Reflection/InterfaceMapping.xml b/xml/System.Reflection/InterfaceMapping.xml index 7605da9b1f0..6cf66a76132 100644 --- a/xml/System.Reflection/InterfaceMapping.xml +++ b/xml/System.Reflection/InterfaceMapping.xml @@ -71,13 +71,13 @@ Retrieves the mapping of an interface into the actual methods on a class that implements that interface. - structure when a type implements interface methods that use method names other than those specified by the interface, or when a type implements multiple interfaces which have a method with the same name. - - To obtain an structure, use the method. - + structure when a type implements interface methods that use method names other than those specified by the interface, or when a type implements multiple interfaces which have a method with the same name. + + To obtain an structure, use the method. + ]]> @@ -134,11 +134,11 @@ Shows the methods that are defined on the interface. - array. That is, the elements are in the same array indexing order. - + array. That is, the elements are in the same array indexing order. + ]]> @@ -245,11 +245,11 @@ Shows the methods that implement the interface. - array match their counterpart elements returned from the `TargetMethods` array. That is, the elements are in the same array indexing order. - + array match their counterpart elements returned from the `TargetMethods` array. That is, the elements are in the same array indexing order. + ]]> @@ -304,11 +304,11 @@ Represents the type that was used to create the interface mapping. - field is the instance of whose method returned the current structure. - + field is the instance of whose method returned the current structure. + ]]> diff --git a/xml/System.Reflection/InvalidFilterCriteriaException.xml b/xml/System.Reflection/InvalidFilterCriteriaException.xml index 21a2d786ad3..d357a49345a 100644 --- a/xml/System.Reflection/InvalidFilterCriteriaException.xml +++ b/xml/System.Reflection/InvalidFilterCriteriaException.xml @@ -152,8 +152,8 @@ |Property|Value| |--------------|-----------| -||null| -||The empty string ("").| +||null| +||The empty string ("").| ]]> @@ -213,8 +213,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The error message string.| +||`null`| +||The error message string.| ]]> @@ -337,8 +337,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Reflection/LocalVariableInfo.xml b/xml/System.Reflection/LocalVariableInfo.xml index 4a28c2187b6..f963255a72e 100644 --- a/xml/System.Reflection/LocalVariableInfo.xml +++ b/xml/System.Reflection/LocalVariableInfo.xml @@ -75,7 +75,7 @@ property. Use the method to obtain the for a object. + To get a list of local variables in a method, use the property. Use the method to obtain the for a object. > [!NOTE] > Local variable names are not persisted in metadata. In Microsoft intermediate language (MSIL), local variables are accessed by their position in the local variable signature. @@ -83,7 +83,7 @@ ## Examples - The following example defines a test method named `MethodBodyExample`, and displays its local variable information. The method is used to obtain a object for the test method. The property is then used to obtain a list of objects and to display their types and index order. + The following example defines a test method named `MethodBodyExample`, and displays its local variable information. The method is used to obtain a object for the test method. The property is then used to obtain a list of objects and to display their types and index order. This code example is part of a larger example provided for the class. diff --git a/xml/System.Reflection/MemberFilter.xml b/xml/System.Reflection/MemberFilter.xml index 31776558ed4..aef31a9b41f 100644 --- a/xml/System.Reflection/MemberFilter.xml +++ b/xml/System.Reflection/MemberFilter.xml @@ -89,13 +89,13 @@ to include the member in the filtered list; otherwise . - and has a constructor and an `Invoke` method. (See the code example in `Delegate`.) - - The method uses this delegate to filter the list of members that it returns. - + and has a constructor and an `Invoke` method. (See the code example in `Delegate`.) + + The method uses this delegate to filter the list of members that it returns. + ]]> diff --git a/xml/System.Reflection/MemberInfo.xml b/xml/System.Reflection/MemberInfo.xml index 8c44710816e..ddf22b8f669 100644 --- a/xml/System.Reflection/MemberInfo.xml +++ b/xml/System.Reflection/MemberInfo.xml @@ -283,7 +283,7 @@ - If the `Type` object from which this `MemberInfo` object was obtained did not declare this member, the property will represent one of its base types. -- If the `MemberInfo` object is a global member (that is, if it was obtained from the method, which returns global methods on a module), the returned will be `null`. +- If the `MemberInfo` object is a global member (that is, if it was obtained from the method, which returns global methods on a module), the returned will be `null`. @@ -422,7 +422,7 @@ method. + This method ignores the `inherit` parameter for properties and events. To search the inheritance chain for attributes on properties and events, use the appropriate overloads of the method. > [!NOTE] > In the .NET Framework version 2.0, this method returns security attributes on methods, constructors, and types if they are stored in the new metadata format. Assemblies compiled with version 2.0 use this format. Dynamic assemblies and assemblies compiled with earlier versions of the .NET Framework use the old XML format. See [Emitting Declarative Security Attributes](https://msdn.microsoft.com/library/9eeddee8-ca89-4440-b84b-fd613f590cd5). @@ -500,7 +500,7 @@ method. + This method ignores the `inherit` parameter for properties and events. To search the inheritance chain for attributes on properties and events, use the appropriate overloads of the method. > [!NOTE] > In the .NET Framework version 2.0, this method returns security attributes on methods, constructors, and types if the attributes are stored in the new metadata format. Assemblies compiled with version 2.0 use this format. Dynamic assemblies and assemblies compiled with earlier versions of the .NET Framework use the old XML format. See [Emitting Declarative Security Attributes](https://msdn.microsoft.com/library/9eeddee8-ca89-4440-b84b-fd613f590cd5). @@ -565,7 +565,7 @@ and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods like and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. This method gets custom attribute data for types, nested types, and type members, because the class and the classes in the namespace that represent type members all derive from . @@ -804,7 +804,7 @@ For more information, see [How to use and debug assembly unloadability in .NET C method. + This method ignores the `inherit` parameter for properties and events. To search the inheritance chain for attributes on properties and events, use the appropriate overloads of the method. > [!NOTE] > In the .NET Framework version 2.0, this method returns `true` if a type, method, or constructor has security attributes stored in the new metadata format. Assemblies compiled with version 2.0 use this format. Dynamic assemblies and assemblies compiled with earlier versions of the .NET Framework use the old XML format. See [Emitting Declarative Security Attributes](https://msdn.microsoft.com/library/9eeddee8-ca89-4440-b84b-fd613f590cd5). @@ -871,7 +871,7 @@ For more information, see [How to use and debug assembly unloadability in .NET C objects - for example, the array returned by - the property can be used to determine the member type of any given member. + This property is overridden in derived classes, and the override returns the appropriate member type. Therefore, when you examine a set of objects - for example, the array returned by - the property can be used to determine the member type of any given member. To get the `MemberType` property, get the class . From the `Type`, get the array. From the `MethodInfo` array, get the `MemberTypes`. @@ -997,7 +997,7 @@ For more information, see [How to use and debug assembly unloadability in .NET C ## Examples - The following code example declares a class that inherits and overrides . The example obtains objects for the class's `ToString` method and for the inherited method, and displays the names of the modules in which the two methods are declared. + The following code example declares a class that inherits and overrides . The example obtains objects for the class's `ToString` method and for the inherited method, and displays the names of the modules in which the two methods are declared. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MemberInfo/Module/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MemberInfo/Module/source.vb" id="Snippet1"::: @@ -1242,12 +1242,12 @@ For more information, see [How to use and debug assembly unloadability in .NET C ## Remarks The `ReflectedType` property retrieves the object that was used to obtain this instance of `MemberInfo`. This may differ from the value of the property if this object represents a member that is inherited from a base class. - If the `MemberInfo` object is a global member (that is, if it was obtained from the method, which returns global methods on a module), the returned will be `null`. + If the `MemberInfo` object is a global member (that is, if it was obtained from the method, which returns global methods on a module), the returned will be `null`. ## Examples - The following code example shows how the changes when the member is viewed from a obtained from type and from a obtained from the class itself, which inherits but does not override . + The following code example shows how the changes when the member is viewed from a obtained from type and from a obtained from the class itself, which inherits but does not override . :::code language="csharp" source="~/snippets/csharp/System.Reflection/MemberInfo/ReflectedType/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MemberInfo/ReflectedType/source.vb" id="Snippet1"::: diff --git a/xml/System.Reflection/MemberInfoExtensions.xml b/xml/System.Reflection/MemberInfoExtensions.xml index c18633b0e00..6bf2b6e32e8 100644 --- a/xml/System.Reflection/MemberInfoExtensions.xml +++ b/xml/System.Reflection/MemberInfoExtensions.xml @@ -74,12 +74,12 @@ Gets a metadata token for the given member, if available. An integer representing the metadata token. The returned token is never nil. If unavailable, an exception is thrown. - to determine whether a metadata token is available before calling this method. + to determine whether a metadata token is available before calling this method. + ]]> There is no metadata token available. @@ -123,12 +123,12 @@ This method throws an exception if a metadata token is not available for the spe if there is a metadata token available for the given member; otherwise, . - throws an exception if a metadata token is not available for the specified member. So use this method to determine whether a metadata token is available before calling . + throws an exception if a metadata token is not available for the specified member. So use this method to determine whether a metadata token is available before calling . + ]]> diff --git a/xml/System.Reflection/MemberTypes.xml b/xml/System.Reflection/MemberTypes.xml index a0f045730be..1c7027ab0aa 100644 --- a/xml/System.Reflection/MemberTypes.xml +++ b/xml/System.Reflection/MemberTypes.xml @@ -79,9 +79,9 @@ ## Remarks These enumeration values are returned by the following properties: -- . +- . -- . +- . - . @@ -103,7 +103,7 @@ 1. Get a object that represents that type. -2. Retrieve the array that represents the members of that type by calling the method. +2. Retrieve the array that represents the members of that type by calling the method. 3. Retrieve the value of the From the property for each member in the array. A `switch` statement in C# or `Select Case` statement in Visual Basic is typically used to process member types. diff --git a/xml/System.Reflection/MetadataAssemblyResolver.xml b/xml/System.Reflection/MetadataAssemblyResolver.xml index 13d46e3bbf4..1b056de53ff 100644 --- a/xml/System.Reflection/MetadataAssemblyResolver.xml +++ b/xml/System.Reflection/MetadataAssemblyResolver.xml @@ -83,7 +83,7 @@ ## Remarks -Binding an assembly name to an assembly occurs when is called or when a type from one assembly has a dependency on another assembly. The handler that overrides `Resolve` should use , or to load the requested assembly and return it. +Binding an assembly name to an assembly occurs when is called or when a type from one assembly has a dependency on another assembly. The handler that overrides `Resolve` should use , or to load the requested assembly and return it. To indicate the failure to find an assembly, the handler should return `null` rather than throwing an exception. Returning `null` commits the failure so that future attempts to load that name will fail without re-invoking the handler. diff --git a/xml/System.Reflection/MetadataLoadContext.xml b/xml/System.Reflection/MetadataLoadContext.xml index 69510ae2afb..a3e339adfdd 100644 --- a/xml/System.Reflection/MetadataLoadContext.xml +++ b/xml/System.Reflection/MetadataLoadContext.xml @@ -116,7 +116,7 @@ The core assembly is treated differently than other assemblies because reference Typically, this assembly is named "mscorlib" or "netstandard". If the core assembly cannot be found, the value will be `null`, and many other reflection methods, including those that parse method signatures, will throw an exception. The `CoreAssembly` is determined by passing the `coreAssemblyName` parameter passed to the constructor -to the method. +to the method. If no `coreAssemblyName` argument was specified in the constructor of , then default values are used, including "mscorlib", "System.Runtime" and "netstandard". @@ -126,16 +126,16 @@ Note that is not an ideal core assembly because it exclude The core assembly is not loaded until necessary. The following APIs do not trigger the search for the core assembly: -* -* -* -* +* +* +* +* * -* -* +* +* * -* -* +* +* * * * @@ -146,11 +146,11 @@ If a core assembly cannot be found or if the core assembly is missing types, thi * APIs that need to parse signatures or typespecs and return the results as objects will throw an exception. For example: * - * + * * - * + * -* APIs that need to compare types to well-known core types will not throw an exception, and the comparison will evaluate to `false`. For example, if you do not specify a core assembly, will return `false` for everything, even types named . Similarly, will return for everything. +* APIs that need to compare types to well-known core types will not throw an exception, and the comparison will evaluate to `false`. For example, if you do not specify a core assembly, will return `false` for everything, even types named . Similarly, will return for everything. * If a metadata entity sets flags that surface as a pseudo-custom attribute, and the core assembly does not contain the pseudo-custom attribute type, the necessary constructor or any of the parameter types of the constructor, the will not throw. It will omit the pseudo-custom attribute from the list of returned attributes. ]]> @@ -185,7 +185,7 @@ After disposal, it is not safe to use any obje Though objects provided by the strive to throw an , this is not guaranteed. -Some APIs may return fixed or previously cached data. Accessing objects *during* a method call may result in an unmanaged access violation and failfast. +Some APIs may return fixed or previously cached data. Accessing objects *during* a method call may result in an unmanaged access violation and failfast. ]]> @@ -238,7 +238,7 @@ Some APIs may return fixed or previously cached data. Accessing objects *during* resolve event, but does not match the behavior of . (The latter gives up without raising its resolve event.) +Note that the behavior of this method matches the behavior of the resolve event, but does not match the behavior of . (The latter gives up without raising its resolve event.) ]]> The resolver returns . @@ -270,7 +270,7 @@ Note that the behavior of this method matches the behavior of the resolve event but does not match the behavior of . (The latter gives up without raising its resolve event.) +Note that the behavior of this method matches the behavior of the resolve event but does not match the behavior of . (The latter gives up without raising its resolve event.) ]]> diff --git a/xml/System.Reflection/MethodBase.xml b/xml/System.Reflection/MethodBase.xml index 8c190fb1cd6..4e5f338ae69 100644 --- a/xml/System.Reflection/MethodBase.xml +++ b/xml/System.Reflection/MethodBase.xml @@ -470,14 +470,14 @@ that is returned by is obtained from the generic type definition (that is, returns `true`). Therefore, it does not reflect the type arguments that were used when the method was called. For example, if a method `M()` is defined on a generic type `C` (`C(Of T)` in Visual Basic), and is called from `C.M()`, then returns `C.M()` (`C(Of T).M()` in Visual Basic). + If the currently executing method is defined on a generic type, the that is returned by is obtained from the generic type definition (that is, returns `true`). Therefore, it does not reflect the type arguments that were used when the method was called. For example, if a method `M()` is defined on a generic type `C` (`C(Of T)` in Visual Basic), and is called from `C.M()`, then returns `C.M()` (`C(Of T).M()` in Visual Basic). - If the currently executing method is a generic method, returns the generic method definition. If the generic method is defined on a generic type, the is obtained from the generic type definition. + If the currently executing method is a generic method, returns the generic method definition. If the generic method is defined on a generic type, the is obtained from the generic type definition. ## Examples - The following example defines two types. The first is a non-generic class, `TestClass`, includes a constructor, a method named `GetValue`, and a read-write property named `GetValue`. The second is a generic class named `TestClass` that includes a constructor, a `GetValue` method, and a generic method, `ConvertValue`. Each constructor, method, and property accessor includes a call to the method. + The following example defines two types. The first is a non-generic class, `TestClass`, includes a constructor, a method named `GetValue`, and a read-write property named `GetValue`. The second is a generic class named `TestClass` that includes a constructor, a `GetValue` method, and a generic method, `ConvertValue`. Each constructor, method, and property accessor includes a call to the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/GetCurrentMethod/GetCurentMethod1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/GetCurrentMethod/GetCurentMethod1.vb" id="Snippet1"::: @@ -544,7 +544,7 @@ ## Remarks The elements of the returned array are in the order in which they appear in the list of type parameters for the generic method. -- If the current method is a closed constructed method (that is, the property returns `false`), the array returned by the method contains the types that have been assigned to the generic type parameters of the generic method definition. +- If the current method is a closed constructed method (that is, the property returns `false`), the array returned by the method contains the types that have been assigned to the generic type parameters of the generic method definition. - If the current method is a generic method definition, the array contains the type parameters. @@ -670,12 +670,12 @@ in order to use it. You can call the method on and objects, because the method is overridden in the runtime versions of these classes. For example, the runtime version of the class derives from the class, which in turn derives from the class. + You do not have to override the in order to use it. You can call the method on and objects, because the method is overridden in the runtime versions of these classes. For example, the runtime version of the class derives from the class, which in turn derives from the class. ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their types and index order. The property is used to obtain a list of exception-handling clauses. @@ -895,7 +895,7 @@ method to display the method implementation flags that are set by default. + The following example defines a constructor in a dynamic assembly and then uses the method to display the method implementation flags that are set by default. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/GetMethodImplementationFlags/constructorbuilder_getmodule_4.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/GetMethodImplementationFlags/constructorbuilder_getmodule_4.vb" id="Snippet3"::: @@ -958,7 +958,7 @@ method to retrieve the parameters of the `Invoke` method of a delegate. + The following example uses the method to retrieve the parameters of the `Invoke` method of a delegate. The example defines a delegate named `MyDelegate` and an event named `ev` of type `MyDelegate`. The code in the `Main` method discovers the event signature by getting the delegate type of the event, getting the `Invoke` method of the delegate type, and then retrieving and displaying the parameters. @@ -1087,9 +1087,9 @@ method overload, passing for `invokeAttr` and `null` for `binder` and `culture`. + This is a convenience method that calls the method overload, passing for `invokeAttr` and `null` for `binder` and `culture`. - If the invoked method throws an exception, the method returns the originating exception. + If the invoked method throws an exception, the method returns the originating exception. To invoke a static method using its object, pass `null` for `obj`. @@ -1223,7 +1223,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked via reflection whenever the code is fully trusted. - If the invoked method throws an exception, the method returns the originating exception. + If the invoked method throws an exception, the method returns the originating exception. > [!NOTE] > This method can be used to access non-public members if the caller has been granted with the flag and if the grant set of the non-public members is restricted to the caller's grant set, or a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later. @@ -1231,7 +1231,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, ## Examples - The following example demonstrates all members of the class using an overload of . The private method `CanConvertFrom` finds compatible types for a given type. For another example of invoking members in a custom binding scenario, see [Dynamically Loading and Using Types](/dotnet/framework/reflection-and-codedom/dynamically-loading-and-using-types). + The following example demonstrates all members of the class using an overload of . The private method `CanConvertFrom` finds compatible types for a given type. For another example of invoking members in a custom binding scenario, see [Dynamically Loading and Using Types](/dotnet/framework/reflection-and-codedom/dynamically-loading-and-using-types). :::code language="csharp" source="~/snippets/csharp/System.Reflection/Binder/Overview/binder.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Binder/Overview/binder.vb" id="Snippet1"::: @@ -1385,7 +1385,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, The visibility of a method or constructor is exactly described by if the only visibility modifier is `internal` (`Friend` in Visual Basic). This property is `false` for methods that are `protected internal` in C# (`Protected Friend` in Visual Basic); use the property to identify such methods. ## Examples - The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsAssembly/source.vb" id="Snippet1"::: @@ -1561,7 +1561,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, The visibility of a method or constructor is exactly described by if the only visibility modifier is `protected`. This property is `false` for methods that are `protected internal` in C# (`Protected Friend` in Visual Basic); use the property to identify such methods. ## Examples - The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsAssembly/source.vb" id="Snippet1"::: @@ -1630,7 +1630,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, The visibility of a method or constructor is exactly described by if the visibility modifier is `private protected` in C# or `Private Protected` in Visual Basic. ## Examples - The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsAssembly/source.vb" id="Snippet1"::: @@ -1703,7 +1703,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, The visibility of a method or constructor is exactly described by if the visibility modifier is `protected internal` in C# (`Protected Friend` in Visual Basic). ## Examples - The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsAssembly/source.vb" id="Snippet1"::: @@ -1853,7 +1853,7 @@ The following table summarizes the invariant conditions for terms specific to ge |Term|Invariant condition| |---|---| -|generic method definition| The property is `true`.
Defines a generic method. A constructed method is created by calling the method on a object that represents a generic method definition, and specifying an array of type arguments.
The method can be called only on generic method definitions.
Any generic method definition is a generic method, but the converse is not true.| +|generic method definition| The property is `true`.
Defines a generic method. A constructed method is created by calling the method on a object that represents a generic method definition, and specifying an array of type arguments.
The method can be called only on generic method definitions.
Any generic method definition is a generic method, but the converse is not true.| |generic method|The `IsGenericMethod` property is `true`.
Can be a generic method definition, an open constructed method, or a closed constructed method.| |open constructed method|The property is `true`.
It is not possible to invoke an open constructed method.| |closed constructed method|The property is `false`.
When examined recursively, the method has no unassigned generic parameters. The containing type has no generic type parameters, and none of the type arguments have generic type parameters.
The method can be invoked.| @@ -1919,7 +1919,7 @@ The following table summarizes the invariant conditions for terms specific to ge - The property is `true`. -- For each object in the array returned by the method: +- For each object in the array returned by the method: - The property is `true`. @@ -1990,7 +1990,7 @@ The following table summarizes the invariant conditions for terms specific to ge returns `false` on a member declared with the Visual Basic `Shadows` modifier, and `true` on a member declared with the C# `new` modifier. + When a member in a derived class is declared with the C# `new` modifier or the Visual Basic `Shadows` modifier, it can hide a member of the same name in the base class. C# hides base class members by signature. That is, if the base class member has multiple overloads, the only one that is hidden is the one that has the identical signature. By contrast, Visual Basic hides all the base class overloads. Thus, returns `false` on a member declared with the Visual Basic `Shadows` modifier, and `true` on a member declared with the C# `new` modifier. > [!WARNING] > This property does not determine whether a method has the attribute. A method that is declared with either the `new` or the `Shadows` modifier will have the attribute, but only methods declared with `new` (that is, only C# methods) will have the property set to `true`. To determine whether a method has the attribute, use code similar to the following: `if ((myMethodInfo.Attributes & MethodAttributes.VtableLayoutMask) == MethodAttributes.NewSlot)` in C# or `If (myMethodInfo.Attributes And MethodAttributes.VtableLayoutMask) = MethodAttributes.NewSlot` in Visual Basic. Note, however, that although all methods declared with `new` or `Shadows` have the attribute, not all methods that have the attribute are declared with `new` or `Shadows`. @@ -2181,7 +2181,7 @@ The following table summarizes the invariant conditions for terms specific to ge , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2192,7 +2192,7 @@ The following table summarizes the invariant conditions for terms specific to ge Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -2249,7 +2249,7 @@ The following table summarizes the invariant conditions for terms specific to ge , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2260,7 +2260,7 @@ The following table summarizes the invariant conditions for terms specific to ge Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -2317,12 +2317,12 @@ The following table summarizes the invariant conditions for terms specific to ge and properties return `false`. + If this property returns `true`, the and properties return `false`. - The , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. + The , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -2392,7 +2392,7 @@ The following table summarizes the invariant conditions for terms specific to ge ## Examples - This example shows a use of to filter internal or private members out of a list. + This example shows a use of to filter internal or private members out of a list. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsSpecialName/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsSpecialName/source.vb" id="Snippet1"::: @@ -2519,7 +2519,7 @@ The following table summarizes the invariant conditions for terms specific to ge ## Remarks A virtual member may reference instance data in a class and must be referenced through an instance of the class. - To determine if a method is overridable, it is not sufficient to check that `IsVirtual` is `true`. For a method to be overridable, `IsVirtual` must be `true` and must be `false`. For example, a method might be non-virtual, but it implements an interface method. The common language runtime requires that all methods that implement interface members must be marked as `virtual`; therefore, the compiler marks the method `virtual final`. So there are cases where a method is marked as `virtual` but is still not overridable. + To determine if a method is overridable, it is not sufficient to check that `IsVirtual` is `true`. For a method to be overridable, `IsVirtual` must be `true` and must be `false`. For example, a method might be non-virtual, but it implements an interface method. The common language runtime requires that all methods that implement interface members must be marked as `virtual`; therefore, the compiler marks the method `virtual final`. So there are cases where a method is marked as `virtual` but is still not overridable. To establish with certainty whether a method is overridable, use code such as this: @@ -2533,7 +2533,7 @@ If MethodInfo.IsVirtual AndAlso Not MethodInfo.IsFinal Then If `IsVirtual` is `false` or `IsFinal` is `true`, then the method cannot be overridden. - You can determine whether the current method overrides a method in a base class by calling the method. The following example implements an `IsOverride` method that does this. + You can determine whether the current method overrides a method in a base class by calling the method. The following example implements an `IsOverride` method that does this. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsVirtual/IsOverride1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsVirtual/IsOverride1.vb" id="Snippet2"::: @@ -2655,7 +2655,7 @@ If MethodInfo.IsVirtual AndAlso Not MethodInfo.IsFinal Then method for more information. + See the method for more information. ]]> diff --git a/xml/System.Reflection/MethodBody.xml b/xml/System.Reflection/MethodBody.xml index 9cf6a542a64..090aca7d5d1 100644 --- a/xml/System.Reflection/MethodBody.xml +++ b/xml/System.Reflection/MethodBody.xml @@ -64,17 +64,17 @@ ## Remarks The class provides access to information about the local variables and exception-handling clauses in a method body, and to the Microsoft intermediate language (MSIL) that makes up the method body. - You can use the token-resolution methods of the module class, such as , , and , to resolve the tokens in the method body to objects, objects, and objects that provide detailed information about the types, methods, and fields accessed by the MSIL in the method body. + You can use the token-resolution methods of the module class, such as , , and , to resolve the tokens in the method body to objects, objects, and objects that provide detailed information about the types, methods, and fields accessed by the MSIL in the method body. > [!NOTE] > Parsing method bodies requires a thorough understanding of metadata and MSIL instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". - To obtain a object for a given method, first obtain a object for the method, then call the object's method. + To obtain a object for a given method, first obtain a object for the method, then call the object's method. ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The example uses the property to obtain a list of objects and then displays their types and index order. The property is used to obtain a list of exception-handling clauses. @@ -180,7 +180,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and MSIL instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample` and displays information about its exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects. + The following code example defines a test method named `MethodBodyExample` and displays information about its exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects. This code example is part of a larger example provided for the class. @@ -249,7 +249,7 @@ , , and , to resolve the tokens in the method body to objects, objects, and objects that provide detailed information about the types, methods, and fields accessed by the MSIL in the method body. + You can use the token-resolution methods of the module class, such as , , and , to resolve the tokens in the method body to objects, objects, and objects that provide detailed information about the types, methods, and fields accessed by the MSIL in the method body. > [!NOTE] > Parsing method bodies requires a thorough understanding of metadata and MSIL instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". @@ -313,7 +313,7 @@ ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The and properties are displayed. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The and properties are displayed. This code example is part of a larger example provided for the class. @@ -430,7 +430,7 @@ ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information. The method is used to obtain a object for the test method. The property is used to obtain a list of objects. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information. The method is used to obtain a object for the test method. The property is used to obtain a list of objects. This code example is part of a larger example provided for the class. @@ -496,7 +496,7 @@ For more information, see the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics" and "Partition III: CIL Instruction Set". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The and properties are displayed. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The and properties are displayed. This code example is part of a larger example provided for the class. diff --git a/xml/System.Reflection/MethodInfo.xml b/xml/System.Reflection/MethodInfo.xml index 9481db14f90..652d497bbc9 100644 --- a/xml/System.Reflection/MethodInfo.xml +++ b/xml/System.Reflection/MethodInfo.xml @@ -99,19 +99,19 @@ ## Remarks The class represents a method of a type. You can use a object to obtain information about the method that the object represents and to invoke the method. For example: -- You can determine the method's visibility by retrieving the values of the , , , and properties. +- You can determine the method's visibility by retrieving the values of the , , , and properties. -- You can discover what attributes are applied to the method by retrieving the value of the property or calling the method. +- You can discover what attributes are applied to the method by retrieving the value of the property or calling the method. -- You can determine whether the method is a generic method, an open constructed generic method, or a closed constructed generic method, by retrieving the values of the and properties. +- You can determine whether the method is a generic method, an open constructed generic method, or a closed constructed generic method, by retrieving the values of the and properties. -- You can get information about the method's parameters and return type from the method and the , , and properties. +- You can get information about the method's parameters and return type from the method and the , , and properties. -- You can execute a method on a class instance by calling the method. +- You can execute a method on a class instance by calling the method. -- You can instantiate a object that represents a constructed generic method from one that represents a generic method definition by calling the method. +- You can instantiate a object that represents a constructed generic method from one that represents a generic method definition by calling the method. - You can instantiate a instances by calling the or method, or by calling the method of a object that represents a generic method definition. + You can instantiate a instances by calling the or method, or by calling the method of a object that represents a generic method definition. For a list of the invariant conditions for terms specific to generic methods, see the property. For a list of the invariant conditions for other terms used in generic reflection, see the property. @@ -554,37 +554,37 @@ For a list of the invariant conditions for other terms used in generic reflectio method returns the first definition of the specified method in the class hierarchy. You can determine the type on which the first definition of the method is found by retrieving the value of the property on the returned object. + The method returns the first definition of the specified method in the class hierarchy. You can determine the type on which the first definition of the method is found by retrieving the value of the property on the returned object. - The method behaves as follows: + The method behaves as follows: -- If the current object represents an interface implementation, the method returns the current object. +- If the current object represents an interface implementation, the method returns the current object. -- If the current object represents a method that overrides a virtual definition in a base class, the method returns a object that represents the virtual definition. +- If the current object represents a method that overrides a virtual definition in a base class, the method returns a object that represents the virtual definition. -- If the current object represents a method that is specified with the `new` keyword in C# or the `Shadows` keyword in Visual Basic (as in `newslot`, as described in [Common Type System](/dotnet/standard/base-types/common-type-system)), the method returns the current object. +- If the current object represents a method that is specified with the `new` keyword in C# or the `Shadows` keyword in Visual Basic (as in `newslot`, as described in [Common Type System](/dotnet/standard/base-types/common-type-system)), the method returns the current object. -- If the current object represents an inherited method (that is, the current method does not provide its own implementation), the method returns a object that represents the lowest method in the class hierarchy. For example, if `Base.ToString` overrides `Object.ToString`, and `Derived.ToString` overrides `Base.ToString`, calling the method on a object that represents `Derived.ToString` returns a object that represents `Object.ToString`. +- If the current object represents an inherited method (that is, the current method does not provide its own implementation), the method returns a object that represents the lowest method in the class hierarchy. For example, if `Base.ToString` overrides `Object.ToString`, and `Derived.ToString` overrides `Base.ToString`, calling the method on a object that represents `Derived.ToString` returns a object that represents `Object.ToString`. -- If the current object represents a method that is not present in any base class, the method returns the current object. +- If the current object represents a method that is not present in any base class, the method returns the current object. - You can determine whether the current method overrides a method in a base class by calling the method. The following example implements an `IsOverride` method that does this. + You can determine whether the current method overrides a method in a base class by calling the method. The following example implements an `IsOverride` method that does this. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsVirtual/IsOverride1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsVirtual/IsOverride1.vb" id="Snippet2"::: To call the `GetBaseDefinition` method: -1. Get a object that represents the type (the class or structure) that contains the property. If you are working with an object (an instance of a type), you can call its method. Otherwise, you can use the C# operator or the Visual Basic [GetType](/dotnet/visual-basic/language-reference/operators/gettype-operator) operator, as the example illustrates. +1. Get a object that represents the type (the class or structure) that contains the property. If you are working with an object (an instance of a type), you can call its method. Otherwise, you can use the C# operator or the Visual Basic [GetType](/dotnet/visual-basic/language-reference/operators/gettype-operator) operator, as the example illustrates. -2. Get a object that represents the method in which you're interested. You can do this by getting an array of all methods from the method and then iterating the elements in the array, or you can retrieve the object that represents the method directly by calling the method and specifying the method name. +2. Get a object that represents the method in which you're interested. You can do this by getting an array of all methods from the method and then iterating the elements in the array, or you can retrieve the object that represents the method directly by calling the method and specifying the method name. -3. Call the method to get the value of the object that represents the base method definition. +3. Call the method to get the value of the object that represents the base method definition. ## Examples - The following example demonstrates the behavior of the method. + The following example demonstrates the behavior of the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsVirtual/getbasedefinition1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsVirtual/getbasedefinition1.vb" id="Snippet1"::: @@ -651,7 +651,7 @@ For a list of the invariant conditions for other terms used in generic reflectio ## Remarks The elements of the returned array are in the order in which they appear in the list of type parameters for the generic method. -- If the current method is a closed constructed method (that is, the property returns `false`), the array returned by the method contains the types that have been assigned to the generic type parameters of the generic method definition. +- If the current method is a closed constructed method (that is, the property returns `false`), the array returned by the method contains the types that have been assigned to the generic type parameters of the generic method definition. - If the current method is a generic method definition, the array contains the type parameters. @@ -662,7 +662,7 @@ For a list of the invariant conditions for other terms used in generic reflectio ## Examples The following code example shows how to get the type arguments of a generic method and display them. - This example is part of a larger example provided for the method. + This example is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System/Type/DeclaringMethod/source.cs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/DeclaringMethod/source.vb" id="Snippet8"::: @@ -733,11 +733,11 @@ For a list of the invariant conditions for other terms used in generic reflectio (T t)` (expressed in C# syntax; `Function M(Of T)(ByVal tVal As T) As T` in Visual Basic) you can construct and invoke the method `int M(int t)` (`Function M(Of Integer)(ByVal tVal As Integer) As Integer` in Visual Basic). Given a object representing this constructed method, the method returns the generic method definition. + A generic method definition is a template from which methods can be constructed. For example, from the generic method definition `T M(T t)` (expressed in C# syntax; `Function M(Of T)(ByVal tVal As T) As T` in Visual Basic) you can construct and invoke the method `int M(int t)` (`Function M(Of Integer)(ByVal tVal As Integer) As Integer` in Visual Basic). Given a object representing this constructed method, the method returns the generic method definition. - If two constructed methods are created from the same generic method definition, the method returns the same object for both methods. + If two constructed methods are created from the same generic method definition, the method returns the same object for both methods. - If you call on a that already represents a generic method definition, it returns the current . + If you call on a that already represents a generic method definition, it returns the current . If a generic method definition includes generic parameters of the declaring type, there will be a generic method definition specific to each constructed type. For example, consider the following code: @@ -756,7 +756,7 @@ Class C(Of T) End Class ``` - In the constructed type `C` (`C(Of Integer)` in Visual Basic), the generic method `M` returns `B`. In the open type `C`, `M` returns `B`. In both cases, the property returns `true` for the that represents `M`, so can be called on both objects. In the case of the constructed type, the result of calling is a that can be invoked. In the case of the open type, the returned by cannot be invoked. + In the constructed type `C` (`C(Of Integer)` in Visual Basic), the generic method `M` returns `B`. In the open type `C`, `M` returns `B`. In both cases, the property returns `true` for the that represents `M`, so can be called on both objects. In the case of the constructed type, the result of calling is a that can be invoked. In the case of the open type, the returned by cannot be invoked. For a list of the invariant conditions for terms specific to generic methods, see the property. For a list of the invariant conditions for other terms used in generic reflection, see the property. @@ -765,7 +765,7 @@ End Class ## Examples The following code example shows a class with a generic method and the code required to obtain a for the method, bind the method to type arguments, and get the original generic type definition back from the bound method. - This example is part of a larger example provided for the method. + This example is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System/Type/DeclaringMethod/source.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/DeclaringMethod/source.vb" id="Snippet2"::: @@ -1027,7 +1027,7 @@ Use the `IsGenericMethodDefinition` property to determine whether type arguments The method body of M contains a call to method N, specifying the type parameter of M and the type . The `IsGenericMethodDefinition` property returns false for method `N`. > [!NOTE] -> Although the open constructed method `N` is not encountered when reflecting over class C, it must be generated using in order to emit C as a dynamic class. +> Although the open constructed method `N` is not encountered when reflecting over class C, it must be generated using in order to emit C as a dynamic class. If a generic method definition includes generic parameters of the declaring type, there will be a generic method definition specific to each constructed type. For example, consider the following code: @@ -1063,7 +1063,7 @@ For a list of the invariant conditions for terms specific to generic methods, se The following code example uses the `IsGenericMethodDefinition` property to display a message indicating whether a represents a generic method definition. -This example is part of a larger example provided for the method. +This example is part of a larger example provided for the method. ```vb Console.WriteLine(vbTab _ @@ -1157,9 +1157,9 @@ Console::WriteLine("\tIs this a generic method definition? {0}", method allows you to write code that assigns specific types to the type parameters of a generic method definition, thus creating a object that represents a particular constructed method. If the property of this object returns `true`, you can use it to invoke the method or to create a delegate to invoke the method. + The method allows you to write code that assigns specific types to the type parameters of a generic method definition, thus creating a object that represents a particular constructed method. If the property of this object returns `true`, you can use it to invoke the method or to create a delegate to invoke the method. - Methods constructed with the method can be open, that is, some of their type arguments can be type parameters of enclosing generic types. You might use such open constructed methods when you generate dynamic assemblies. For example, consider the following code. + Methods constructed with the method can be open, that is, some of their type arguments can be type parameters of enclosing generic types. You might use such open constructed methods when you generate dynamic assemblies. For example, consider the following code. ```csharp class C @@ -1273,7 +1273,7 @@ End Class . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a method. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a method. To get the `MemberType` property, first get the class `Type`. From the `Type`, get the `MethodInfo`. From the `MethodInfo`, get the `MemberType`. diff --git a/xml/System.Reflection/Module.xml b/xml/System.Reflection/Module.xml index abef453ab50..0e763ff51a9 100644 --- a/xml/System.Reflection/Module.xml +++ b/xml/System.Reflection/Module.xml @@ -606,7 +606,7 @@ . + To get the name without the path, use . If the assembly for this module was loaded from a byte array then the `FullyQualifiedName` for the module will be: \. @@ -811,7 +811,7 @@ and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods such as and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and example code, see the class. ]]> @@ -1024,7 +1024,7 @@ method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. ]]> @@ -1091,7 +1091,7 @@ method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. ]]> @@ -1824,7 +1824,7 @@ > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). - A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . + A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . @@ -1936,7 +1936,7 @@ > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). - A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . + A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . @@ -2047,7 +2047,7 @@ > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). - A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . + A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . @@ -2558,7 +2558,7 @@ If the assembly for this module was loaded from a byte array then the `FullyQualifiedName` for the module will be: \. - To get the name and the path, use . + To get the name and the path, use . @@ -2740,12 +2740,12 @@ method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a field that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. + To resolve a metadata token that identifies a field whose parent `TypeSpec` has a signature containing element type `ELEMENT_TYPE_VAR` or `ELEMENT_TYPE_MVAR`, use the method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a field that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -2838,12 +2838,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -2923,12 +2923,12 @@ method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a member that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. + To resolve a metadata token for a `MethodSpec` or `TypeSpec` whose signature contains element type `ELEMENT_TYPE_VAR` or `ELEMENT_TYPE_MVAR`, use the method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a member that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -3025,12 +3025,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -3114,7 +3114,7 @@ method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a method that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. + To resolve a metadata token for a `MethodSpec` whose signature contains element type `ELEMENT_TYPE_VAR` or `ELEMENT_TYPE_MVAR`, use the method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a method that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -3122,7 +3122,7 @@ ## Examples - The following example shows how to use the two overloads of the method to resolve metadata tokens from call sites in generic and non-generic contexts. + The following example shows how to use the two overloads of the method to resolve metadata tokens from call sites in generic and non-generic contexts. The code example defines two generic types, `G1` and `G2` (`G1(Of Tg1)` and `G2(Of Tg2)` in Visual Basic), each of which has a generic method. `G1` also has a non-generic method that uses the type parameter `Tg1` for its parameter. The generic method `GM2` in type `G2` contains several method calls: @@ -3138,9 +3138,9 @@ - Case 5: The generic method `GM1` is called, specifying and for the type arguments of the generic type and the generic method, respectively. The context for this method has no enclosing generic type or generic method. - For each case, the example first constructs a that represents the called method, and then resolves the token using the method overload, using the and methods to get the values for the `genericTypeArguments` and `genericMethodArguments` parameters. This technique works in all cases, because the methods return for non-generic contexts. The example compares the resolved with the constructed . + For each case, the example first constructs a that represents the called method, and then resolves the token using the method overload, using the and methods to get the values for the `genericTypeArguments` and `genericMethodArguments` parameters. This technique works in all cases, because the methods return for non-generic contexts. The example compares the resolved with the constructed . - The example then attempts to use the method overload to resolve the token. This works in cases 3, 4, and 5, because the method calls do not depend on the generic context. In cases 1 and 2, an exception is thrown because there is insufficient information to resolve the token. + The example then attempts to use the method overload to resolve the token. This works in cases 3, 4, and 5, because the method calls do not depend on the generic context. In cases 1 and 2, an exception is thrown because there is insufficient information to resolve the token. The metadata token values are hard-coded as an enumeration. If you change this code example, the token values are likely to change. To determine the new token values, compile the code and use Ildasm.exe with the **/TOKENS** option to examine the assembly. The tokens can be found at the points of call. Insert the new values into the enumeration, and recompile the example. @@ -3238,7 +3238,7 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericMethodArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericMethodArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -3246,7 +3246,7 @@ ## Examples - The following example shows how to use the two overloads of the method to resolve metadata tokens from call sites in generic and non-generic contexts. + The following example shows how to use the two overloads of the method to resolve metadata tokens from call sites in generic and non-generic contexts. The code example defines two generic types, `G1` and `G2`, each of which has a generic method. `G1` also has a non-generic method that uses the type parameter `Tg1` for its parameter. The generic method `GM2` in type `G2` contains several method calls: @@ -3262,9 +3262,9 @@ - Case 5: The generic method `GM1` is called, specifying and for the type arguments of the generic type and the generic method, respectively. The context for this method has no enclosing generic type or generic method. - For each case, the example first constructs a that represents the called method, and then resolves the token using the method overload, using the and methods to get the values for the `genericTypeArguments` and `genericMethodArguments` parameters. This technique works in all cases, because the methods return for non-generic contexts. The example compares the resolved with the constructed . + For each case, the example first constructs a that represents the called method, and then resolves the token using the method overload, using the and methods to get the values for the `genericTypeArguments` and `genericMethodArguments` parameters. This technique works in all cases, because the methods return for non-generic contexts. The example compares the resolved with the constructed . - The example then attempts to use the method overload to resolve the token. This works in cases 3, 4, and 5, because the method calls do not depend on the generic context. In cases 1 and 2, an exception is thrown because there is insufficient information to resolve the token. + The example then attempts to use the method overload to resolve the token. This works in cases 3, 4, and 5, because the method calls do not depend on the generic context. In cases 1 and 2, an exception is thrown because there is insufficient information to resolve the token. The metadata token values are hard-coded as an enumeration. If you change this code example, the token values are likely to change. To determine the new token values, compile the code and use Ildasm.exe with the **/TOKENS** option to examine the assembly. The tokens can be found at the points of call. Insert the new values into the enumeration, and recompile the example. @@ -3492,7 +3492,7 @@ method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a type that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. + To resolve a metadata token for a `TypeSpec` whose signature contains `ELEMENT_TYPE_VAR` or `ELEMENT_TYPE_MVAR`, use the method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a type that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -3588,12 +3588,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> diff --git a/xml/System.Reflection/ObfuscationAttribute.xml b/xml/System.Reflection/ObfuscationAttribute.xml index 5c670ed3507..43d8866ffb5 100644 --- a/xml/System.Reflection/ObfuscationAttribute.xml +++ b/xml/System.Reflection/ObfuscationAttribute.xml @@ -252,7 +252,7 @@ ## Examples - The following code example shows a type that is marked to be excluded from obfuscation. It is not necessary to specify the property, because it defaults to `true`, but specifying it explicitly makes your intent clear. The is set to `false`, so that the exclusion from obfuscation does not apply to the members of the class. That is, the class name is visible but the members are obfuscated. + The following code example shows a type that is marked to be excluded from obfuscation. It is not necessary to specify the property, because it defaults to `true`, but specifying it explicitly makes your intent clear. The is set to `false`, so that the exclusion from obfuscation does not apply to the members of the class. That is, the class name is visible but the members are obfuscated. The `MethodA` method is marked with the value `"default"` for the property. It is necessary to specify `false` for the property in order to avoid excluding `MethodA` from obfuscation, because the default for the property is `true`. The property is `false` so that the obfuscation tool will not strip the attribute after obfuscation. diff --git a/xml/System.Reflection/ParameterInfo.xml b/xml/System.Reflection/ParameterInfo.xml index 1050bae6bb4..da19f064c24 100644 --- a/xml/System.Reflection/ParameterInfo.xml +++ b/xml/System.Reflection/ParameterInfo.xml @@ -120,7 +120,7 @@ ## Remarks Use an instance of `ParameterInfo` to obtain information about the parameter's data type, default value, and so on. - returns an array of `ParameterInfo` objects representing the parameters of a method, in order. + returns an array of `ParameterInfo` objects representing the parameters of a method, in order. @@ -228,7 +228,7 @@ This method utilizes the method. -To get the array, first get the method or the constructor and then call . +To get the array, first get the method or the constructor and then call . ## Examples @@ -289,7 +289,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to parameter attributes is through . ]]> @@ -349,7 +349,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to parameter types is through . ]]> @@ -463,7 +463,7 @@ The following example defines a method with three parameters. It uses the method. - To get the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . ]]> @@ -523,7 +523,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to the default value of the parameter is through . ]]> @@ -592,14 +592,14 @@ The following example defines a method with three parameters. It uses the method. + This method ignores the `inherit` parameter. To search the inheritance chain for attributes on parameters, use the appropriate overloads of the method. ## Examples The following example shows how custom attributes that have been applied to the parameters of methods can be retrieved at run time. The example defines a custom attribute named `MyAttribute` that can be applied to parameters. The example then defines a class named `MyClass` with a method named `MyMethod`, and applies `MyAttribute` to a parameter of the method. - When the example is run, it uses the method to retrieve the custom attributes that have been applied to all parameters of all methods in `MyClass`, and displays them at the console. + When the example is run, it uses the method to retrieve the custom attributes that have been applied to all parameters of all methods in `MyClass`, and displays them at the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/GetCustomAttributes/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/GetCustomAttributes/source.vb" id="Snippet1"::: @@ -664,7 +664,7 @@ The following example defines a method with three parameters. It uses the method. + This method ignores the `inherit` parameter. To search the inheritance chain for attributes on parameters, use the appropriate overloads of the method. ]]> @@ -719,7 +719,7 @@ The following example defines a method with three parameters. It uses the and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods such as and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and example code, see the class. ]]> @@ -760,9 +760,9 @@ The following example defines a method with three parameters. It uses the , , and , which are used to obtain custom modifiers from a function pointer. + A modified type supports , , and , which are used to obtain custom modifiers from a function pointer. - To obtain the normal, unmodified type from a modified type, use . + To obtain the normal, unmodified type from a modified type, use . This method is provided for designers of managed compilers. For more information on custom modifiers, see classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -821,7 +821,7 @@ The following example defines a method with three parameters. It uses the and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace, and the metadata specification in the ECMA Partition II documentation. For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace, and the metadata specification in the ECMA Partition II documentation. For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -892,7 +892,7 @@ The following example defines a method with three parameters. It uses the method. + This method implements the method. ]]> @@ -946,7 +946,7 @@ The following example defines a method with three parameters. It uses the and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace, and the metadata specification in Partition II of [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace, and the metadata specification in Partition II of [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -1055,14 +1055,14 @@ The following example defines a method with three parameters. It uses the method. + This method ignores the `inherit` parameter. To search the inheritance chain for attributes on parameters, use the appropriate overloads of the method. ## Examples The following example defines two custom attributes, `MyAttribute` and `MyDerivedAttribute`. `MyDerivedAttribute` is derived from `MyAttribute`. The example then applies these attributes to the parameters of a method of an example class. - When the example is run, it uses the method to test all parameters of all methods in the example class. It then displays the parameters that have `MyAttribute` or `MyDerivedAttribute`. + When the example is run, it uses the method to test all parameters of all methods in the example class. It then displays the parameters that have `MyAttribute` or `MyDerivedAttribute`. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/IsDefined/parameterinfo_getcustomattribute_isdefined.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/IsDefined/parameterinfo_getcustomattribute_isdefined.vb" id="Snippet1"::: @@ -1129,7 +1129,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . @@ -1142,9 +1142,9 @@ The following example defines a method with three parameters. It uses the , the second with , and the third with . -- Calls to complete the type. +- Calls to complete the type. - After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. + After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.vb" id="Snippet1"::: @@ -1204,7 +1204,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . ]]> @@ -1264,7 +1264,7 @@ The following example defines a method with three parameters. It uses the array, first get the method and then call . + To get the array, first get the method and then call . @@ -1277,9 +1277,9 @@ The following example defines a method with three parameters. It uses the , the second with , and the third with . -- Calls to complete the type. +- Calls to complete the type. - After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. + After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.vb" id="Snippet1"::: @@ -1342,7 +1342,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . @@ -1355,9 +1355,9 @@ The following example defines a method with three parameters. It uses the , the second with , and the third with . -- Calls to complete the type. +- Calls to complete the type. - After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. + After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/IsOut/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/IsOut/source.vb" id="Snippet1"::: @@ -1420,7 +1420,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . ]]> @@ -1521,7 +1521,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to the parameter name is through the . ]]> @@ -1641,7 +1641,7 @@ The following example defines a method with three parameters. It uses the field, and depends on an optional metadata flag that might not be available in all compilers. - To get the array, first get the method or the constructor and then call the method. + To get the array, first get the method or the constructor and then call the method. > [!WARNING] > If this represents a return value (that is, if it was obtained by using the property), this property will be `null`. @@ -1712,7 +1712,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to the parameter name is through the . ]]> @@ -1769,7 +1769,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . @@ -1836,7 +1836,7 @@ The following example defines a method with three parameters. It uses the method. - To get the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . ]]>
@@ -1890,7 +1890,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to the name of the parameter is through . ]]>
@@ -1953,7 +1953,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call the method. + To get the array, first get the method or the constructor and then call the method. ]]>
diff --git a/xml/System.Reflection/ParameterModifier.xml b/xml/System.Reflection/ParameterModifier.xml index 2c6bab41adb..8a6916a7298 100644 --- a/xml/System.Reflection/ParameterModifier.xml +++ b/xml/System.Reflection/ParameterModifier.xml @@ -79,7 +79,7 @@ structure is used with the method overload when passing parameters by reference to a COM component that is accessed late bound. The parameters that are to be passed by reference are specified by a single structure, which must be passed in an array containing a single element. The single structure in this array must be initialized with the number of parameters in the member that is to be invoked. To indicate which of these parameters are passed by reference, set the value of the property (the indexer in C#) to `true` for the index number corresponding to the zero-based position of the parameter. + The structure is used with the method overload when passing parameters by reference to a COM component that is accessed late bound. The parameters that are to be passed by reference are specified by a single structure, which must be passed in an array containing a single element. The single structure in this array must be initialized with the number of parameters in the member that is to be invoked. To indicate which of these parameters are passed by reference, set the value of the property (the indexer in C#) to `true` for the index number corresponding to the zero-based position of the parameter. diff --git a/xml/System.Reflection/PortableExecutableKinds.xml b/xml/System.Reflection/PortableExecutableKinds.xml index e4c6c3f3b86..a9b70ac1df3 100644 --- a/xml/System.Reflection/PortableExecutableKinds.xml +++ b/xml/System.Reflection/PortableExecutableKinds.xml @@ -59,14 +59,14 @@ Identifies the nature of the code in an executable file. - method. - + method. + > [!NOTE] -> This enumeration corresponds to the `CorPEKind` enumeration in the unmanaged reflection API, which is accessed by the unmanaged `GetPEKind` function. - +> This enumeration corresponds to the `CorPEKind` enumeration in the unmanaged reflection API, which is accessed by the unmanaged `GetPEKind` function. + ]]> diff --git a/xml/System.Reflection/PropertyInfo.xml b/xml/System.Reflection/PropertyInfo.xml index 1a5b1943361..630bd2e92f4 100644 --- a/xml/System.Reflection/PropertyInfo.xml +++ b/xml/System.Reflection/PropertyInfo.xml @@ -100,7 +100,7 @@ Properties are logically the same as fields. A property is a named aspect of an object's state whose value is typically accessible through `get` and `set` accessors. Properties may be read-only, in which case a set routine is not supported. > [!NOTE] -> To determine whether a property is `static`, you must obtain the for the `get` or `set` accessor, by calling the or the method, and examine its property. +> To determine whether a property is `static`, you must obtain the for the `get` or `set` accessor, by calling the or the method, and examine its property. Several methods in this class assume that the `get` accessor and `set` accessor methods of a property have certain formats. The signatures of the `get` and `set` methods must match the following convention: @@ -110,7 +110,7 @@ If this format is not followed, the behavior of the `GetValue` and `SetValue` methods is undefined. - Calling on `PropertyInfo` when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. + Calling on `PropertyInfo` when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. @@ -227,17 +227,17 @@ The property returns the attributes associated with the property represented by this object. The attributes are primarily modifiers applied by a compiler when creating a property; they indicate whether a property is the default property, a `SpecialName` property, and so on. Note that, for almost all properties found in types in the .NET Framework class library, the value of the property is . > [!TIP] -> In most cases, you probably want to retrieve the custom attributes associated with a property. To do this, retrieve the value of the property, or call one of the overloads of the method. +> In most cases, you probably want to retrieve the custom attributes associated with a property. To do this, retrieve the value of the property, or call one of the overloads of the method. To get the property: 1. Get a object that represents the type to which the property belongs. -2. Get the object by calling an overload of the method. +2. Get the object by calling an overload of the method. 3. Retrieve the property's attributes from the property. - You can define the attributes of a property for a type created dynamically using reflection emit by calling an overload of the method and supplying a value for the `attributes` argument. + You can define the attributes of a property for a type created dynamically using reflection emit by calling an overload of the method and supplying a value for the `attributes` argument. ]]> @@ -367,13 +367,13 @@ returns `true` if the property has a `set` accessor, even if the accessor is `private`, `internal` (or `Friend` in Visual Basic), or `protected`. If the property does not have a `set` accessor, the method returns `false`. + returns `true` if the property has a `set` accessor, even if the accessor is `private`, `internal` (or `Friend` in Visual Basic), or `protected`. If the property does not have a `set` accessor, the method returns `false`. To get the value of the property: 1. Get the object of the type that includes the property. -2. Call the to get the object that represents the property. +2. Call the to get the object that represents the property. 3. Retrieve the value of the property. @@ -507,14 +507,14 @@ method: + To call the method: 1.Get a object that represents the class. 2.From the object, get the object. -3.From the object, call the method. +3.From the object, call the method. ## Examples - The following example retrieves the public accessors of the `ClassWithProperty.Caption` property and displays information about them. It also calls the method of the setter to set the property value and of the getter to retrieve the property value. + The following example retrieves the public accessors of the `ClassWithProperty.Caption` property and displays information about them. It also calls the method of the setter to set the property value and of the getter to retrieve the property value. :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/GetAccessors/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/PropertyInfo/GetAccessors/source1.vb" id="Snippet1"::: @@ -578,14 +578,14 @@ ## Remarks -To call the method: +To call the method: 1. Get a object that represents the class. 2. From the object, get the object. -3. From the object, call the method. +3. From the object, call the method. ## Examples - The following example retrieves the accessors of the `ClassWithProperty.Caption` property and displays information about them. It also calls the method of the setter to set the property value and of the getter to retrieve the property value. + The following example retrieves the accessors of the `ClassWithProperty.Caption` property and displays information about them. It also calls the method of the setter to set the property value and of the getter to retrieve the property value. :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/GetAccessors/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/PropertyInfo/GetAccessors/source.vb" id="Snippet1"::: @@ -647,7 +647,7 @@ To call the method: This method is provided for designers of managed compilers and code analyzers. > [!NOTE] -> Do not use this method in the reflection-only context, because it might cause code to execute. Use the method instead. +> Do not use this method in the reflection-only context, because it might cause code to execute. Use the method instead. In unmanaged metadata, the Constant table is used to store constant values for fields, parameters, and properties. Constant information does not directly influence runtime behavior. Compilers inspect this information, at compile time, when importing metadata. If used, the value of a constant is embedded in the Microsoft intermediate language (MSIL) stream the compiler emits. There are no MSIL instructions that can be used to access the Constant table at run time. @@ -1005,9 +1005,9 @@ To call the method: , , and , which are used to obtain custom modifiers from a function pointer. + A modified type supports , , and , which are used to obtain custom modifiers from a function pointer. - To obtain the normal, unmodified type from a modified type, use . + To obtain the normal, unmodified type from a modified type, use . This method is provided for designers of managed compilers. For more information on custom modifiers, see classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -1066,7 +1066,7 @@ To call the method: and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -1182,7 +1182,7 @@ To call the method: and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -1445,14 +1445,14 @@ To call the method: overload to retrieve the value of a non-indexed property; if you try to retrieve the value of an indexed property, the method throws a exception. You can determine whether a property is indexed or not by calling the method. If the length of the returned array is zero, the property is not indexed. + You call the overload to retrieve the value of a non-indexed property; if you try to retrieve the value of an indexed property, the method throws a exception. You can determine whether a property is indexed or not by calling the method. If the length of the returned array is zero, the property is not indexed. - This is a convenience method that provides an implementation for the abstract method with the parameter set to , the set to `null`, the object array of index values set to `null`, and the set to `null`. + This is a convenience method that provides an implementation for the abstract method with the parameter set to , the set to `null`, the object array of index values set to `null`, and the set to `null`. ## Examples - The following example defines a `Planet` class that has two properties: `Name`, the name of the planet; and `Distance`, the planet's distance from Earth. The example instantiates a `Planet` object that represents the planet Jupiter and passes it to a `GetPropertyValues` method that displays information about the properties and uses the method to get the value of each `Planet` property. + The following example defines a `Planet` class that has two properties: `Name`, the name of the planet; and `Distance`, the planet's distance from Earth. The example instantiates a `Planet` object that represents the planet Jupiter and passes it to a `GetPropertyValues` method that displays information about the properties and uses the method to get the value of each `Planet` property. :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/GetValue/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/PropertyInfo/GetValue/getvalue1.vb" id="Snippet1"::: @@ -1526,7 +1526,7 @@ To call the method: method. If the resulting array has 0 (zero) elements, the property is not indexed. + To determine whether a property is indexed, use the method. If the resulting array has 0 (zero) elements, the property is not indexed. This is a convenience method that provides an implementation for the abstract `GetValue` method with a `BindingFlags` parameter of `Default`, the `Binder` set to `null`, and the `CultureInfo` set to `null`. @@ -1629,7 +1629,7 @@ Note: In method. If the resulting array has 0 (zero) elements, the property is not indexed. + To determine whether a property is indexed, use the method. If the resulting array has 0 (zero) elements, the property is not indexed. Because static properties belong to the type, not individual objects, get static properties by passing `null` as the object argument. For example, use the following code to get the static `CurrentCulture` property of `CultureInfo` : @@ -1772,7 +1772,7 @@ Console.WriteLine("CurrCult: " + . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a property. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a property. `MemberType` is a derived class of `MemberInfo` and specifies the type of member this is. Member types are constructors, properties, fields, and methods. Since this is a `PropertyInfo` property, the returned type is a property. @@ -1958,9 +1958,9 @@ Console.WriteLine("CurrCult: " + ## Remarks To determine the type of a particular property, do the following: -1. Get a object that represents the type (the class or structure) that contains the property. If you are working with an object (an instance of a type), you can call its method. Otherwise, you can use the C# operator or the Visual Basic [GetType](/dotnet/visual-basic/language-reference/operators/gettype-operator) operator, as the example illustrates. +1. Get a object that represents the type (the class or structure) that contains the property. If you are working with an object (an instance of a type), you can call its method. Otherwise, you can use the C# operator or the Visual Basic [GetType](/dotnet/visual-basic/language-reference/operators/gettype-operator) operator, as the example illustrates. -2. Get a object that represents the property in which you're interested. You can do this by getting an array of all properties from the method and then iterating the elements in the array, or you can retrieve the object that represents the property directly by calling the method and specifying the property name. +2. Get a object that represents the property in which you're interested. You can do this by getting an array of all properties from the method and then iterating the elements in the array, or you can retrieve the object that represents the property directly by calling the method and specifying the property name. 3. Retrieve the value of the property from the object. @@ -2024,7 +2024,7 @@ Console.WriteLine("CurrCult: " + property is equivalent to calling the method with a value of `true` for the `nonPublic` argument. + Retrieving the value of the property is equivalent to calling the method with a value of `true` for the `nonPublic` argument. ]]> @@ -2106,19 +2106,19 @@ Console.WriteLine("CurrCult: " + overload sets the value of a non-indexed property. To determine whether a property is indexed, call the method. If the resulting array has 0 (zero) elements, the property is not indexed. To set the value of an indexed property, call the overload. + The overload sets the value of a non-indexed property. To determine whether a property is indexed, call the method. If the resulting array has 0 (zero) elements, the property is not indexed. To set the value of an indexed property, call the overload. If the property type of this object is a value type and `value` is `null`, the property will be set to the default value for that type. - This is a convenience method that calls the runtime implementation of the abstract method, specifying for the `BindingFlags` parameter, `null` for `Binder`, `null` for `Object[]`, and `null` for `CultureInfo`. + This is a convenience method that calls the runtime implementation of the abstract method, specifying for the `BindingFlags` parameter, `null` for `Binder`, `null` for `Object[]`, and `null` for `CultureInfo`. - To use the method, first get a object that represents the class. From the , get the object. From the object, call the method. + To use the method, first get a object that represents the class. From the , get the object. From the object, call the method. > [!NOTE] > This method can be used to access non-public members if the caller has been granted with the flag and if the grant set of the non-public members is restricted to the caller's grant set, or a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later. ## Examples - The following example declares a class named `Example` with one `static` (`Shared` in Visual Basic) and one instance property. The example uses the method to change the original property values and displays the original and final values. + The following example declares a class named `Example` with one `static` (`Shared` in Visual Basic) and one instance property. The example uses the method to change the original property values and displays the original and final values. :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/SetValue/example2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/PropertyInfo/SetValue/example2.vb" id="Snippet2"::: @@ -2211,24 +2211,24 @@ Note: In method to change the default values of the properties and displays the original and final values. + The following example declares a class named `Example` with three properties: a `static` property (`Shared` in Visual Basic), an instance property, and an indexed instance property. The example uses the method to change the default values of the properties and displays the original and final values. The name that is used to search for an indexed instance property with reflection is different depending on the language and on attributes applied to the property. @@ -2325,7 +2325,7 @@ Note: In property retrieves an array of type `Exception` that is parallel to the array. This array will contain null values whenever reflection cannot load a class. + The property retrieves an array of type `Exception` that is parallel to the array. This array will contain null values whenever reflection cannot load a class. ]]> diff --git a/xml/System.Reflection/TargetException.xml b/xml/System.Reflection/TargetException.xml index 3eb51355033..6160d3ab042 100644 --- a/xml/System.Reflection/TargetException.xml +++ b/xml/System.Reflection/TargetException.xml @@ -153,8 +153,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("").| +||`null`| +||The empty string ("").| ]]> @@ -212,8 +212,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The message string.| +||`null`| +||The message string.| ]]> @@ -336,8 +336,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Reflection/TargetInvocationException.xml b/xml/System.Reflection/TargetInvocationException.xml index 4546f04cad2..89bf79469a5 100644 --- a/xml/System.Reflection/TargetInvocationException.xml +++ b/xml/System.Reflection/TargetInvocationException.xml @@ -87,7 +87,7 @@ . + For more information, see . `TargetInvocationException` uses the HRESULT COR_E_TARGETINVOCATION, which has the value 0x80131604. @@ -167,8 +167,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> @@ -234,8 +234,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Reflection/TargetParameterCountException.xml b/xml/System.Reflection/TargetParameterCountException.xml index 26e12ad59fe..170590448ae 100644 --- a/xml/System.Reflection/TargetParameterCountException.xml +++ b/xml/System.Reflection/TargetParameterCountException.xml @@ -155,8 +155,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("").| +||`null`| +||The empty string ("").| ]]> @@ -216,8 +216,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The message string.| +||`null`| +||The message string.| ]]> @@ -281,8 +281,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]>
diff --git a/xml/System.Reflection/TypeAttributes.xml b/xml/System.Reflection/TypeAttributes.xml index 6af7e85dbab..31e7a1f0656 100644 --- a/xml/System.Reflection/TypeAttributes.xml +++ b/xml/System.Reflection/TypeAttributes.xml @@ -78,7 +78,7 @@ value retrieved from a property such as . The following table lists the masks and the individual members that they include: + Some of the members of the `TypeAttributes` enumeration are masks that represent a set of mutually exclusive attributes. For example, the `VisibilityMask` member includes the `NotPublic`, `Public`, `NestedPublic`, `NestedPrivate`, `NestedFamily`, `NestedAssembly`, `NestedFamANDAssem`, and `NestedFamORAssem` members. Because each attribute set includes a member whose underlying value is zero, you should first `And` the value of the mask with the specific value retrieved from a property such as . The following table lists the masks and the individual members that they include: |Mask|Includes| |----------|--------------| diff --git a/xml/System.Reflection/TypeDelegator.xml b/xml/System.Reflection/TypeDelegator.xml index 9e1aa2586bc..8eb6c0ab9b6 100644 --- a/xml/System.Reflection/TypeDelegator.xml +++ b/xml/System.Reflection/TypeDelegator.xml @@ -75,15 +75,15 @@ derives from and implements most of the properties and methods of . For each member it implements, automatically delegates to the corresponding member of an internal object, which is supplied as an argument to the constructor. This internal object is exposed to deriving classes by the `protected` field. > [!NOTE] -> Some members of have implementations even though the members themselves are simply inherited from . In these cases, the implementation is provided by an overridden `protected` method that has a name that ends in "Impl". For example, the implementation for all overloads of the method is supplied by the overridden method. The implementation for inherited properties such as and is provided by the overridden method. +> Some members of have implementations even though the members themselves are simply inherited from . In these cases, the implementation is provided by an overridden `protected` method that has a name that ends in "Impl". For example, the implementation for all overloads of the method is supplied by the overridden method. The implementation for inherited properties such as and is provided by the overridden method. - Deriving classes can provide a public constructor that takes a object as its parameter and simply passes that object to the constructor, or can set the internal object in some other way. + Deriving classes can provide a public constructor that takes a object as its parameter and simply passes that object to the constructor, or can set the internal object in some other way. - If a deriving class uses a member that is not implemented by , it must override that member and provide an implementation. The simplest implementation is to call the corresponding member on the internal object exposed by the field, but you can provide any implementation your application requires. It is not necessary to override these members if they are not used by your application or by library functions your application calls (for example, by the constructor). + If a deriving class uses a member that is not implemented by , it must override that member and provide an implementation. The simplest implementation is to call the corresponding member on the internal object exposed by the field, but you can provide any implementation your application requires. It is not necessary to override these members if they are not used by your application or by library functions your application calls (for example, by the constructor). - The following virtual methods (`Overridable` methods in Visual Basic) of are not implemented by : , , , , , , , , , , , , . + The following virtual methods (`Overridable` methods in Visual Basic) of are not implemented by : , , , , , , , , , , , , . - The following virtual properties (`Overridable` properties in Visual Basic) of are not implemented by : , , , , , , , , , . + The following virtual properties (`Overridable` properties in Visual Basic) of are not implemented by : , , , , , , , , , . ]]> @@ -1063,7 +1063,7 @@ method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. Use a `bindingAttr` of .NonPublic to return all public and nonpublic fields. @@ -2096,7 +2096,7 @@ This method can be used to find a constructed generic member given a member from The binder will find all the matching methods. These methods are found based upon the type of binding requested (`BindingFlags.MethodInvoke`, `BindingFlags.GetProperties`, and so on). The set of methods is filtered by the name, number of arguments, and a set of search modifiers defined in the binder. - After the method is selected, it will be invoked. Accessibility is checked at that point. The search may control which set of methods are searched based upon the accessibility attribute associated with the method. The method is responsible for selecting the method to be invoked. The default binder selects the most specific match. + After the method is selected, it will be invoked. Accessibility is checked at that point. The search may control which set of methods are searched based upon the accessibility attribute associated with the method. The method is responsible for selecting the method to be invoked. The default binder selects the most specific match. > [!NOTE] > Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked using reflection whenever the code is fully trusted. @@ -2966,7 +2966,7 @@ t.InvokeMember ("MyArray", BindingFlags.SetField, null, this, new . + A string containing the name of the current `TypeDelegator`. Only the simple name, not the fully qualified name, is returned. To get the name and the path, use . ]]> diff --git a/xml/System.Reflection/TypeFilter.xml b/xml/System.Reflection/TypeFilter.xml index 35075646de6..1dfb3b547c1 100644 --- a/xml/System.Reflection/TypeFilter.xml +++ b/xml/System.Reflection/TypeFilter.xml @@ -92,7 +92,7 @@ objects. The method uses this delegate to filter the list of interfaces that it returns. Every derived class of and has a constructor and a `DynamicInvoke` method. + The `TypeFilter` delegate is used to filter a list of classes. Specifically, you use it to filter the classes represented in an array of objects. The method uses this delegate to filter the list of interfaces that it returns. Every derived class of and has a constructor and a `DynamicInvoke` method. ## Examples This example shows how to define a method matching the delegate prototype allowing you to use reflection to filter or return a subset of matching entries. diff --git a/xml/System.Reflection/TypeInfo.xml b/xml/System.Reflection/TypeInfo.xml index 14f66597ac8..3c20bbd4014 100644 --- a/xml/System.Reflection/TypeInfo.xml +++ b/xml/System.Reflection/TypeInfo.xml @@ -91,11 +91,11 @@ ## Remarks Starting with .NET Framework 4.5, the class is included in the .NET for Windows 8.x Store apps subset for use in creating Windows Store apps. is available in the full .NET Framework as well. For more information about reflection for Windows Store apps, see [System.Reflection namespaces](/dotnet/api/?term=system.reflection) and [Reflection in the .NET Framework for Windows Store Apps](/dotnet/framework/reflection-and-codedom/reflection-for-windows-store-apps). - contains many of the members available in the class, and many of the reflection properties in the .NET for Windows 8.x Store apps return collections of objects. To get a object from a object, use the extension method. + contains many of the members available in the class, and many of the reflection properties in the .NET for Windows 8.x Store apps return collections of objects. To get a object from a object, use the extension method. A object represents the type definition itself, whereas a object represents a reference to the type definition. Getting a object forces the assembly that contains that type to load. In comparison, you can manipulate objects without necessarily requiring the runtime to load the assembly they reference. - In the .NET for Windows 8.x Store apps, you use the reflection properties of that return collections instead of methods that return arrays. For example, use the property to get all declared members, or the property to get all declared properties. Reflection contexts can implement lazy traversal of these collections for large assemblies or types. To get specific members, use methods such as and , and pass the name of the method or property you would like to retrieve. + In the .NET for Windows 8.x Store apps, you use the reflection properties of that return collections instead of methods that return arrays. For example, use the property to get all declared members, or the property to get all declared properties. Reflection contexts can implement lazy traversal of these collections for large assemblies or types. To get specific members, use methods such as and , and pass the name of the method or property you would like to retrieve. To filter the results of properties, use LINQ queries. For reflection objects that originate with the runtime (for example, as the result of `typeof(Object)`), you can traverse the inheritance tree by using the methods in the class. Consumers of objects from customized reflection contexts cannot use these methods and must traverse the inheritance tree themselves. diff --git a/xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml b/xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml index 70221841ed3..2c8184571d6 100644 --- a/xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml +++ b/xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml @@ -43,9 +43,9 @@ ## Remarks Typically, resources separate code from content within an application. Creating and consuming these resources makes it easier to develop localizable applications. In the .NET Framework, resources are usually consumed by using the class, which contains methods that provide access to culture-specific resources at run time. For more information about creating and consuming resources, see [Resources in Desktop Apps](/dotnet/framework/resources/). - Strongly typed resource support is a compile-time feature that encapsulates access to resources by creating classes that contain a set of static, read-only (`get`) properties. This provides an alternative way to consume resources instead of calling the and methods. + Strongly typed resource support is a compile-time feature that encapsulates access to resources by creating classes that contain a set of static, read-only (`get`) properties. This provides an alternative way to consume resources instead of calling the and methods. - The basic functionality for strongly typed resource support is provided by the class (as well as the `/str` command-line option in the [Resgen.exe (Resource File Generator)](/dotnet/framework/tools/resgen-exe-resource-file-generator)). The output of the method is a class that contains strongly typed properties that match the resources that are referenced in the input parameter. This class provides read-only access to the resources that are available in the file processed. + The basic functionality for strongly typed resource support is provided by the class (as well as the `/str` command-line option in the [Resgen.exe (Resource File Generator)](/dotnet/framework/tools/resgen-exe-resource-file-generator)). The output of the method is a class that contains strongly typed properties that match the resources that are referenced in the input parameter. This class provides read-only access to the resources that are available in the file processed. @@ -140,7 +140,7 @@ method to generate a class that provides a strongly typed, read-only wrapper to access the resources that are contained in the `resourceList` parameter. + Use the method to generate a class that provides a strongly typed, read-only wrapper to access the resources that are contained in the `resourceList` parameter. The class ignores any resource name that begins with the characters "$" or ">>". The resource names "Culture" and "ResourceManager" are invalid identifiers. @@ -218,7 +218,7 @@ method to generate a class that provides strongly typed, read-only access to the resources that are contained in the `resxFile` parameter. + Use the method to generate a class that provides strongly typed, read-only access to the resources that are contained in the `resxFile` parameter. The class ignores any resource name that begins with the characters "$" or ">>". The resource names "Culture" and "ResourceManager" are invalid identifiers. @@ -385,7 +385,7 @@ System.Resources.ResourceManager rm = new System.Resources.ResourceManager(" method to generate a class that provides strongly typed, read-only access to the resources that are contained in the `resxFile` parameter. + Use the method to generate a class that provides strongly typed, read-only access to the resources that are contained in the `resxFile` parameter. The class ignores any resource name that begins with the characters "$" or ">>". The resource names "Culture" and "ResourceManager" are invalid identifiers. @@ -439,14 +439,14 @@ System.Resources.ResourceManager rm = new System.Resources.ResourceManager(" method attempts to generate a valid string based on the `key` and `provider` parameters. If a valid string can be generated, that string is returned; otherwise, `null` is returned. + If the `key` parameter is a valid string of characters, that string is returned. If the `key` parameter is an invalid string or a string that contains invalid characters, the method attempts to generate a valid string based on the `key` and `provider` parameters. If a valid string can be generated, that string is returned; otherwise, `null` is returned. - If the `key` parameter is an empty string (""), a string that consists of a single underscore character (_) is returned. If the `key` parameter is not an empty string, the method compares each character in the string to a set of invalid tokens based on the language specified by the `provider` parameter. Any invalid character in the string is replaced with an underscore character. The characters that will be replaced with an underscore are as follows: + If the `key` parameter is an empty string (""), a string that consists of a single underscore character (_) is returned. If the `key` parameter is not an empty string, the method compares each character in the string to a set of invalid tokens based on the language specified by the `provider` parameter. Any invalid character in the string is replaced with an underscore character. The characters that will be replaced with an underscore are as follows: ' ' (space), U+00A0 (non-breaking space), '.' (period), ',' (comma), ';' (semicolon), '|', '~', '@', '#', '%', '^', '&', '*', '+', '-', '/', '\\', '\<', '>', '?', '[', ']', '(', ')', '{', '}', '"' (quote), ''' (apostrophe), ':', and '!'. > [!NOTE] -> Strongly typed resources do not allow the use of language keywords (such as `if`, `for`, and so on) as resource key names. However, the design pattern allows the use of language keywords by prefixing the keyword with the underscore character. The method calls the method to enforce this design. For example, if you use a resource name that is the same as a language keyword, such as `for`, the name appears as `_for` in the generated strongly typed resource class. +> Strongly typed resources do not allow the use of language keywords (such as `if`, `for`, and so on) as resource key names. However, the design pattern allows the use of language keywords by prefixing the keyword with the underscore character. The method calls the method to enforce this design. For example, if you use a resource name that is the same as a language keyword, such as `for`, the name appears as `_for` in the generated strongly typed resource class. ]]> diff --git a/xml/System.Resources/IResourceReader.xml b/xml/System.Resources/IResourceReader.xml index fcd076867a8..a301471141b 100644 --- a/xml/System.Resources/IResourceReader.xml +++ b/xml/System.Resources/IResourceReader.xml @@ -67,11 +67,11 @@ Provides the base functionality for reading data from resource files. - ) or if you are using a non-standard format or file type for storing resources. Otherwise, use the default class, which reads resource information from binary .resources files, or the class, which reads resource information from XML resource (.resx) files. - + ) or if you are using a non-standard format or file type for storing resources. Otherwise, use the default class, which reads resource information from binary .resources files, or the class, which reads resource information from XML resource (.resx) files. + ]]> @@ -121,11 +121,11 @@ Closes the resource reader after releasing any resources associated with it. - @@ -174,11 +174,11 @@ Returns a dictionary enumerator of the resources for this reader. A dictionary enumerator for the resources for this reader. - inherits the interface, it must also provide an implementation of the method, which returns an object that can be used to enumerate a collection. Typically, is implemented as an explicit interface implementation. - + inherits the interface, it must also provide an implementation of the method, which returns an object that can be used to enumerate a collection. Typically, is implemented as an explicit interface implementation. + ]]> diff --git a/xml/System.Resources/IResourceWriter.xml b/xml/System.Resources/IResourceWriter.xml index e35ee3b9e8e..acd0d1477d9 100644 --- a/xml/System.Resources/IResourceWriter.xml +++ b/xml/System.Resources/IResourceWriter.xml @@ -54,11 +54,11 @@ Provides the base functionality for writing resources to an output file or stream. - class, which writes resources to a binary .resources file, or the class, which writes resources to an XML resource (.resx) file. - + class, which writes resources to a binary .resources file, or the class, which writes resources to an XML resource (.resx) file. + ]]> @@ -128,11 +128,11 @@ Value of a resource as an 8-bit unsigned integer array. Adds an 8-bit unsigned integer array as a named resource to the list of resources to be written. - method is called. - + method is called. + ]]> The parameter is . @@ -191,14 +191,14 @@ The value of the resource. Adds a named resource of type to the list of resources to be written. - method is called. - + method is called. + > [!NOTE] -> `value` might have to be serializable, so you might have to provide a type converter, depending on which resource writer is used. - +> `value` might have to be serializable, so you might have to provide a type converter, depending on which resource writer is used. + ]]> The parameter is . @@ -257,11 +257,11 @@ The value of the resource. Adds a named resource of type to the list of resources to be written. - method is called. - + method is called. + ]]> The parameter is . @@ -307,11 +307,11 @@ Closes the underlying resource file or stream, ensuring all the data has been written to the file. - will call the method to output the resources to the underlying file or stream before closing it. - + will call the method to output the resources to the underlying file or stream before closing it. + ]]> @@ -356,11 +356,11 @@ Writes all the resources added by the method to the output file or stream. - does not close the output file or output stream. Instead, consider calling the method. is useful when you want to create a resource file, but you don't want to close the output stream. can be called only once. After you call , all methods other than will throw an exception. - + does not close the output file or output stream. Instead, consider calling the method. is useful when you want to create a resource file, but you don't want to close the output stream. can be called only once. After you call , all methods other than will throw an exception. + ]]> diff --git a/xml/System.Resources/MissingManifestResourceException.xml b/xml/System.Resources/MissingManifestResourceException.xml index 14d64078616..4892df0c690 100644 --- a/xml/System.Resources/MissingManifestResourceException.xml +++ b/xml/System.Resources/MissingManifestResourceException.xml @@ -146,8 +146,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||The localized error message for .| +||`null`.| +||The localized error message for .| ]]> @@ -205,8 +205,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||The `message` string.| +||`null`.| +||The `message` string.| ]]> @@ -332,8 +332,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Resources/MissingSatelliteAssemblyException.xml b/xml/System.Resources/MissingSatelliteAssemblyException.xml index 0265474163e..678b25278b8 100644 --- a/xml/System.Resources/MissingSatelliteAssemblyException.xml +++ b/xml/System.Resources/MissingSatelliteAssemblyException.xml @@ -73,13 +73,13 @@ is thrown if the resource manager tries to retrieve but cannot find a resource for the default culture. However, the .NET Framework will load the resources for an app's default culture from a satellite assembly if the attribute specifies a value of for the location parameter. When this is the case, the exception is thrown when the resource manager tries to retrieve a resource of the default culture and the satellite assembly for the culture specified in the attribute is missing. Note that the exception is thrown by a resource retrieval method such as or , and not when the object is instantiated. + The default culture is the culture whose resources are loaded if the appropriate culture-specific resources cannot be found. By default, resources for the default culture are located in the main assembly, and a is thrown if the resource manager tries to retrieve but cannot find a resource for the default culture. However, the .NET Framework will load the resources for an app's default culture from a satellite assembly if the attribute specifies a value of for the location parameter. When this is the case, the exception is thrown when the resource manager tries to retrieve a resource of the default culture and the satellite assembly for the culture specified in the attribute is missing. Note that the exception is thrown by a resource retrieval method such as or , and not when the object is instantiated. uses the HRESULT COR_E_MISSINGSATELLITEASSEMBLY, which has the value 0x80131536. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. - For a list of initial property values for an instance of the class, see the constructors. + For a list of initial property values for an instance of the class, see the constructors. > [!NOTE] > You should always use the attribute to define your app's default culture so that if a resource for a specific culture is unavailable, your application will display acceptable behavior. @@ -194,8 +194,8 @@ HelloWorld2 |Property|Value| |--------------|-----------| -||`null`.| -||The localized error message for .| +||`null`.| +||The localized error message for .| ]]> @@ -251,8 +251,8 @@ HelloWorld2 |Property|Value| |--------------|-----------| -||`null`.| -||The `message` string.| +||`null`.| +||The `message` string.| ]]>
@@ -379,8 +379,8 @@ HelloWorld2 |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]>
@@ -438,8 +438,8 @@ HelloWorld2 |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]>
diff --git a/xml/System.Resources/NeutralResourcesLanguageAttribute.xml b/xml/System.Resources/NeutralResourcesLanguageAttribute.xml index cde3450338b..2af93b42ee9 100644 --- a/xml/System.Resources/NeutralResourcesLanguageAttribute.xml +++ b/xml/System.Resources/NeutralResourcesLanguageAttribute.xml @@ -194,7 +194,7 @@ For a detailed list of culture names available on Windows systems, see the **Lan constructor with the enumeration to specify whether the class is to retrieve neutral fallback resources from the main app assembly (the default), or from a satellite assembly specified by the and the properties. + Use the constructor with the enumeration to specify whether the class is to retrieve neutral fallback resources from the main app assembly (the default), or from a satellite assembly specified by the and the properties. For a detailed list of culture names available on Windows systems, see the **Language tag** column in the [list of language/region names supported by Windows](https://learn.microsoft.com/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c). Culture names follow the standard defined by [BCP 47](https://tools.ietf.org/html/bcp47). diff --git a/xml/System.Resources/ResXDataNode.xml b/xml/System.Resources/ResXDataNode.xml index 23053261f3b..40cfe54d0dc 100644 --- a/xml/System.Resources/ResXDataNode.xml +++ b/xml/System.Resources/ResXDataNode.xml @@ -47,12 +47,12 @@ The class supports the representation of rich data types within a resource file. It can support the storage of any object in a resource file, so long as the object supports serialization and type editors. - You can create a object by calling one of its overloaded class constructors. You can then add the resource item or element to a resource file by calling the method. + You can create a object by calling one of its overloaded class constructors. You can then add the resource item or element to a resource file by calling the method. - To retrieve an existing object, you must enumerate the objects in an XML resource file by instantiating a object, setting the property to `true`, and calling the method to get an enumerator. The example provides an illustration. + To retrieve an existing object, you must enumerate the objects in an XML resource file by instantiating a object, setting the property to `true`, and calling the method to get an enumerator. The example provides an illustration. ## Examples - The following example uses the method to obtain an object that is used to enumerate the objects in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary XML resource file. + The following example uses the method to obtain an object that is used to enumerate the objects in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary XML resource file. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXDataNode/Overview/resxresourcereader2.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXDataNode/Overview/resxresourcereader2.vb" id="Snippet1"::: @@ -302,7 +302,7 @@ ## Remarks If a comment has not been assigned to the resource item, the value of the property is . - You access the property of an data node in an existing XML resource file by instantiating a object, setting the property to `true`, and calling the method to retrieve an object that you use to enumerate the items in the XML resource file. The property returns the object. + You access the property of an data node in an existing XML resource file by instantiating a object, setting the property to `true`, and calling the method to retrieve an object that you use to enumerate the items in the XML resource file. The property returns the object. @@ -417,7 +417,7 @@ looks for a by using the specified type resolution service that can convert from a string to the appropriate object. If the resource is a file reference, tries to de-serialize it. + If the stored value currently exists in memory, it is returned directly. If it is stored in the resource file and it is not a file reference, looks for a by using the specified type resolution service that can convert from a string to the appropriate object. If the resource is a file reference, tries to de-serialize it. ]]> @@ -466,7 +466,7 @@ looks in the assemblies identified by names to find the object's corresponding type, and then looks for a that can convert from a string to the appropriate object. If the resource is a file reference, tries to deserialize it. + If the stored value currently exists in memory, it is returned directly. If it is stored in the resource file and it is not a file reference, looks in the assemblies identified by names to find the object's corresponding type, and then looks for a that can convert from a string to the appropriate object. If the resource is a file reference, tries to deserialize it. ]]> diff --git a/xml/System.Resources/ResXFileRef+Converter.xml b/xml/System.Resources/ResXFileRef+Converter.xml index dd99c36d2f5..7890eb4ed2f 100644 --- a/xml/System.Resources/ResXFileRef+Converter.xml +++ b/xml/System.Resources/ResXFileRef+Converter.xml @@ -31,16 +31,16 @@ Provides a type converter to convert data for a to and from a string. - provides the object the refers to. For example, if the is "xplogo.bmp;System.Drawing.Bitmap, System.Drawing", then calling the method of the converter will return a , not a . - - For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). - + provides the object the refers to. For example, if the is "xplogo.bmp;System.Drawing.Bitmap, System.Drawing", then calling the method of the converter will return a , not a . + + For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). + > [!NOTE] -> Typically, you do not directly create an instance of an . Instead, call the method of . For more information, see the examples in the base class. - +> Typically, you do not directly create an instance of an . Instead, call the method of . For more information, see the examples in the base class. + ]]> diff --git a/xml/System.Resources/ResXFileRef.xml b/xml/System.Resources/ResXFileRef.xml index 154342a8a83..d0db658a311 100644 --- a/xml/System.Resources/ResXFileRef.xml +++ b/xml/System.Resources/ResXFileRef.xml @@ -40,29 +40,29 @@ Represents a link to an external resource. - class is used to include references to files in an XML resource (.resx) file. A object represents a link to an external resource in an XML resource (.resx) file. You add the object to a .resx file by calling the method. - - In a data entry in a .resx file, the type is , and the value is the path location on disk. When the resource manager deserializes the object, the performs the I/O to get the file. The following is an example of a .resx file. - -``` - - lookout.bmp;System.Drawing.Bitmap, System.Drawing - - - mailbackground.bmp;System.Drawing.Bitmap, System.Drawing - - - xplogo.png;System.Drawing.Bitmap, System.Drawing - -``` - - To add a object to a .resx file programmatically, you call the constructor to instantiate a object. You then pass this object to the method. - - When you compile a .resx file with [Resgen.exe (Resource File Generator)](/dotnet/framework/tools/resgen-exe-resource-file-generator), the resources specified in the .resx file are embedded in the resulting document resource file. - + class is used to include references to files in an XML resource (.resx) file. A object represents a link to an external resource in an XML resource (.resx) file. You add the object to a .resx file by calling the method. + + In a data entry in a .resx file, the type is , and the value is the path location on disk. When the resource manager deserializes the object, the performs the I/O to get the file. The following is an example of a .resx file. + +``` + + lookout.bmp;System.Drawing.Bitmap, System.Drawing + + + mailbackground.bmp;System.Drawing.Bitmap, System.Drawing + + + xplogo.png;System.Drawing.Bitmap, System.Drawing + +``` + + To add a object to a .resx file programmatically, you call the constructor to instantiate a object. You then pass this object to the method. + + When you compile a .resx file with [Resgen.exe (Resource File Generator)](/dotnet/framework/tools/resgen-exe-resource-file-generator), the resources specified in the .resx file are embedded in the resulting document resource file. + ]]> Working with .resx Files Programmatically @@ -107,11 +107,11 @@ The type of the resource that is referenced. Creates a new instance of the class that references the specified file. - object as a parameter. - + object as a parameter. + ]]> @@ -155,11 +155,11 @@ The encoding used in the referenced file. Initializes a new instance of the class that references the specified file. - object as a parameter. - + object as a parameter. + ]]> diff --git a/xml/System.Resources/ResXResourceReader.xml b/xml/System.Resources/ResXResourceReader.xml index f9614a7186e..940349bea19 100644 --- a/xml/System.Resources/ResXResourceReader.xml +++ b/xml/System.Resources/ResXResourceReader.xml @@ -52,12 +52,12 @@ The class provides a default implementation of the interface that reads resource information in an XML format. To read resource information from a binary resource format, use the class. - You use the class to enumerate resources in .resx files by traversing the dictionary enumerator () that is returned by the method. You call the methods provided by to advance to the next resource and to read the name and value of each resource in the .resx file. + You use the class to enumerate resources in .resx files by traversing the dictionary enumerator () that is returned by the method. You call the methods provided by to advance to the next resource and to read the name and value of each resource in the .resx file. > [!NOTE] -> The class provides two enumerators. The method returns an object; we recommend that you use this method to enumerate resources. The method is an explicit interface implementation that returns an object; we do not recommend its use. +> The class provides two enumerators. The method returns an object; we recommend that you use this method to enumerate resources. The method is an explicit interface implementation that returns an object; we do not recommend its use. - The following example uses the method to obtain an object that is used to enumerate the resources in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary resource file. + The following example uses the method to obtain an object that is used to enumerate the resources in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary resource file. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader1.vb" id="Snippet1"::: @@ -67,7 +67,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader2.vb" id="Snippet2"::: - If is `true`, the items in the enumeration can be either: + If is `true`, the items in the enumeration can be either: - Named resources along with their data. In this case, the property is `null`. @@ -81,7 +81,7 @@ ## Examples - The following example demonstrates how to use a to iterate through the resources in a .resx file. First, the `rsxr` is created for the file `items.resx`. Next, the method is used to create an to iterate through the resources and display the contents to the console. + The following example demonstrates how to use a to iterate through the resources in a .resx file. First, the `rsxr` is created for the file `items.resx`. Next, the method is used to create an to iterate through the resources and display the contents to the console. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader.vb" id="Snippet1"::: @@ -141,7 +141,7 @@ ## Remarks > [!NOTE] -> The and methods do not close the stream you specify in this constructor. +> The and methods do not close the stream you specify in this constructor. ]]> @@ -555,12 +555,12 @@ enables the resources used by the to be reallocated for other purposes. For more information about , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). + Calling enables the resources used by the to be reallocated for other purposes. For more information about , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). ## Examples - The following example displays the resources of a file to the console, and then uses the method to shut down the reader and to make its resources available for other processes. + The following example displays the resources of a file to the console, and then uses the method to shut down the reader and to make its resources available for other processes. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader.vb" id="Snippet1"::: @@ -604,7 +604,7 @@ method or the method. invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + This method can be called by either the method or the method. invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. @@ -809,12 +809,12 @@ method retrieves the name/value pairs in the XML resource (.resx) stream or string associated with the current object. However, if the property is set to `true` before you call , the resource items are retrieved as objects. In this case, all resource nodes are returned regardless of type. + The method retrieves the name/value pairs in the XML resource (.resx) stream or string associated with the current object. However, if the property is set to `true` before you call , the resource items are retrieved as objects. In this case, all resource nodes are returned regardless of type. ## Examples - The following example uses the method to obtain an object that is used to enumerate the resources in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary resource file. + The following example uses the method to obtain an object that is used to enumerate the resources in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary resource file. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader1.vb" id="Snippet1"::: @@ -854,12 +854,12 @@ method provides an object that can retrieve the metadata from the resource file or stream associated with the current object. However, if the property is set to `true` before you call , no resource nodes are retrieved. + Resources are stored as name/value pairs in a resource file or stream. Design-time properties, which are called metadata, are stored in the resource file or stream along with runtime data resources. The method provides an object that can retrieve the metadata from the resource file or stream associated with the current object. However, if the property is set to `true` before you call , no resource nodes are retrieved. ## Examples - The following example uses the method to iterate through the metadata resources in an XML resource file. This code example is part of a larger example provided for the property. + The following example uses the method to iterate through the metadata resources in an XML resource file. This code example is part of a larger example provided for the property. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/useresxdatanodes.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/useresxdatanodes.vb" id="Snippet4"::: @@ -909,7 +909,7 @@ instance is cast to an interface. To enumerate the resources in a .resx file, we recommend that you call the method, and then call the `MoveNext` method on the returned object. + This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. To enumerate the resources in a .resx file, we recommend that you call the method, and then call the `MoveNext` method on the returned object. ]]> @@ -998,7 +998,7 @@ ## Examples - The following example enumerates and displays resource items in an XML file. Initially, is set to `false` to show both data and metadata items as they occur in the resource file. The second enumeration has the set to `true` so that resource data elements are returned as objects. + The following example enumerates and displays resource items in an XML file. Initially, is set to `false` to show both data and metadata items as they occur in the resource file. The second enumeration has the set to `true` so that resource data elements are returned as objects. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/useresxdatanodes.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/useresxdatanodes.vb" id="Snippet2"::: diff --git a/xml/System.Resources/ResXResourceSet.xml b/xml/System.Resources/ResXResourceSet.xml index 9a2812f03cb..0e18103e837 100644 --- a/xml/System.Resources/ResXResourceSet.xml +++ b/xml/System.Resources/ResXResourceSet.xml @@ -39,7 +39,7 @@ The class enumerates over an , loads every name and value, and stores them in a hash table. You can then enumerate the resources in the object or retrieve individual resources by name. - A object provides a convenient way to read all the resources in a .resx file into memory. You can use the method to retrieve a particular resource when the .resx file has been read into a instance. + A object provides a convenient way to read all the resources in a .resx file into memory. You can use the method to retrieve a particular resource when the .resx file has been read into a instance. ## Examples The following example instantiates a object and illustrates how to enumerate its resources and retrieve individual resources by name. For each resource that it enumerates, the example uses the property in a call to the `GetString` or `GetObject` method, depending on whether the value of the resource is a string or an object. diff --git a/xml/System.Resources/ResXResourceWriter.xml b/xml/System.Resources/ResXResourceWriter.xml index 32d8f0af840..2224acadd4b 100644 --- a/xml/System.Resources/ResXResourceWriter.xml +++ b/xml/System.Resources/ResXResourceWriter.xml @@ -46,9 +46,9 @@ ## Remarks The writes resources in XML format. To write a binary resource file, use . - Resources are specified as name/value pairs using the method. Resource names are case-sensitive when used for lookups; but to more easily support authoring tools and help eliminate bugs, does not allow a.resx file to have names that vary only by case. + Resources are specified as name/value pairs using the method. Resource names are case-sensitive when used for lookups; but to more easily support authoring tools and help eliminate bugs, does not allow a.resx file to have names that vary only by case. - To create a.resx file, create a with a unique file name, call at least once, call to write the resources file to disk, and then call to close the file. Calling will implicitly the file if required. + To create a.resx file, create a with a unique file name, call at least once, call to write the resources file to disk, and then call to close the file. Calling will implicitly the file if required. The resources are not necessarily written in the same order they were added. @@ -112,7 +112,7 @@ ## Remarks > [!NOTE] -> The method closes the stream you specify as a parameter. To write the resource to the stream without closing the stream, you must use the method. +> The method closes the stream you specify as a parameter. To write the resource to the stream without closing the stream, you must use the method. ]]> @@ -365,7 +365,7 @@ is called. + Resources whose values are from an aliased assembly are automatically added to the list of aliases. The resource is not written until is called. ]]> @@ -615,7 +615,7 @@ is called. + The resource is not written until is called. The resource is serialized and stored in a binary format. @@ -670,14 +670,14 @@ is called. The resource that was added must be serializable. + The resource is not written until is called. The resource that was added must be serializable. If the resource being added is a string, it is written as a string; otherwise, the resource is serialized and stored in a binary format. ## Examples - The following example creates a .resx file named `CarResources.resx` that stores six strings, an icon, and two application-defined objects (two `Automobile` objects). To store the icon and the `Automobile` objects, it calls the method. Note that the `Automobile` class, which is defined and instantiated in the example, is tagged with the attribute. + The following example creates a .resx file named `CarResources.resx` that stores six strings, an icon, and two application-defined objects (two `Automobile` objects). To store the icon and the `Automobile` objects, it calls the method. Note that the `Automobile` class, which is defined and instantiated in the example, is tagged with the attribute. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceWriter/Overview/create1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceWriter/Overview/create1.vb" id="Snippet1"::: @@ -739,12 +739,12 @@ is called. + The resource is not written until is called. ## Examples - The following example creates a .resx file named `CarResources.resx` that stores six strings, an icon, and two application-defined objects (two `Automobile` objects). To store the strings, it calls the method. + The following example creates a .resx file named `CarResources.resx` that stores six strings, an icon, and two application-defined objects (two `Automobile` objects). To store the strings, it calls the method. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceWriter/Overview/create1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceWriter/Overview/create1.vb" id="Snippet1"::: @@ -897,7 +897,7 @@ . + Calling this method is the equivalent of calling . ]]> @@ -975,9 +975,9 @@ method calls the method, if necessary, before releasing managed and unmanaged system resources. + The method calls the method, if necessary, before releasing managed and unmanaged system resources. - Calling allows the system resources used by the to be reallocated for other purposes. For more information about , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). + Calling allows the system resources used by the to be reallocated for other purposes. For more information about , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). ]]> @@ -1018,9 +1018,9 @@ method calls the method, if necessary, before releasing managed and unmanaged system resources. + The method calls the method, if necessary, before releasing managed and unmanaged system resources. - This method is called by the public method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + This method is called by the public method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. @@ -1098,9 +1098,9 @@ method writes the resources to the output file or stream. If you want to write the resources as well as close the output file or stream, call the method. + The method writes the resources to the output file or stream. If you want to write the resources as well as close the output file or stream, call the method. - The method can be called only once. After calling the method, all methods other than will throw an exception. + The method can be called only once. After calling the method, all methods other than will throw an exception. ]]> diff --git a/xml/System.Resources/ResourceManager.xml b/xml/System.Resources/ResourceManager.xml index b3b158f7c1c..ea60cf8c9e8 100644 --- a/xml/System.Resources/ResourceManager.xml +++ b/xml/System.Resources/ResourceManager.xml @@ -324,7 +324,7 @@ The individual culture-specific resource files should be contained in satellite assemblies, and the default culture's resource file should be contained in the main assembly. A satellite assembly is assumed to contain resources for a single culture specified in that assembly's manifest, and is loaded as necessary. > [!NOTE] -> To retrieve resources from .resources files directly instead of retrieving them from assemblies, you must call the method instead to instantiate a object. +> To retrieve resources from .resources files directly instead of retrieving them from assemblies, you must call the method instead to instantiate a object. If the resource file identified by `baseName` cannot be found in `assembly`, the method instantiates a object, but the attempt to retrieve a specific resource throws an exception, typically . For information about diagnosing the cause of the exception, see the "Handling the MissingManifestResourceException Exception" section of the class topic. @@ -392,12 +392,12 @@ > [!IMPORTANT] > The property value of a resource file that is compiled and embedded from the command line does not include a namespace name unless you explicitly include one when compiling the file. On the other hand, the property value of a resource file that is compiled and embedded within the Visual Studio environment typically does include the default namespace name. - The property value is the same as the string passed to the or constructor when instantiating a instance. + The property value is the same as the string passed to the or constructor when instantiating a instance. ## Examples - You can determine the names of embedded .resources files by compiling and running the following utility. This is a console app that accepts the name of a main assembly or satellite assembly as a command-line parameter. It displays the strings that should be provided as the `baseName` parameter of the or constructor so that the resource manager can correctly identify the resource. + You can determine the names of embedded .resources files by compiling and running the following utility. This is a console app that accepts the name of a main assembly or satellite assembly as a command-line parameter. It displays the strings that should be provided as the `baseName` parameter of the or constructor so that the resource manager can correctly identify the resource. :::code language="csharp" source="~/snippets/csharp/System.Resources/MissingManifestResourceException/Overview/resourcenames.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceManager/BaseName/resourcenames.vb" id="Snippet4"::: @@ -512,10 +512,10 @@ ## Remarks This method returns a resource manager that retrieves resources from a .resources file that is not embedded in an assembly. You can use this object to load resources for an ASP.NET page or to test a implementation. For an example that retrieves resources from a standalone .resources file, see the [Retrieving Resources](/dotnet/framework/resources/retrieving-resources-in-desktop-apps) article. - This method lets you specify a implementation. If you do not want a specific implementation, but would like to use a custom resource file format, you should derive from the class, override the and methods, and pass that type to this constructor. + This method lets you specify a implementation. If you do not want a specific implementation, but would like to use a custom resource file format, you should derive from the class, override the and methods, and pass that type to this constructor. > [!CAUTION] -> Using standalone .resources files in an ASP.NET app will break XCOPY deployment, because the resources remain locked until they are explicitly released by the method. If you want to deploy resources with your ASP.NET apps, compile your .resources files into satellite assemblies. +> Using standalone .resources files in an ASP.NET app will break XCOPY deployment, because the resources remain locked until they are explicitly released by the method. If you want to deploy resources with your ASP.NET apps, compile your .resources files into satellite assemblies. ]]> @@ -822,7 +822,7 @@ method is useful only if you write your own class that derives from the class. + The method is useful only if you write your own class that derives from the class. This method uses the property as part of the file name for all cultures other than the invariant culture. This method does not look in an assembly's manifest or touch the disk, and is used only to construct a resource file name (suitable for passing to the constructor) or a manifest resource blob name. @@ -903,12 +903,12 @@ uses resource fallback rules to load an appropriate resource. If `tryParents` is `false` and a culture-specific resource set cannot be found, the method returns `null`. For more information about resource fallback, see "The Resource Fallback Process" section in the [Packaging and Deploying Resources](/dotnet/framework/resources/packaging-and-deploying-resources-in-desktop-apps) article. + The resource set that is returned represents the resources that are localized for the specified culture. If the resources have not been localized for that culture and `tryParents` is `true`, uses resource fallback rules to load an appropriate resource. If `tryParents` is `false` and a culture-specific resource set cannot be found, the method returns `null`. For more information about resource fallback, see "The Resource Fallback Process" section in the [Packaging and Deploying Resources](/dotnet/framework/resources/packaging-and-deploying-resources-in-desktop-apps) article. ## Examples - The following example calls the method to retrieve culture-specific resources for the French (France) culture. It then enumerates all of the resources in the resource set. It contains the source code for an executable named ShowNumbers.exe. The example includes two text files that contain the names of numbers. The first, NumberResources.txt, contains the names of numbers from one to ten in the English language: + The following example calls the method to retrieve culture-specific resources for the French (France) culture. It then enumerates all of the resources in the resource set. It contains the source code for an executable named ShowNumbers.exe. The example includes two text files that contain the names of numbers. The first, NumberResources.txt, contains the names of numbers from one to ten in the English language: ```txt one=one @@ -1117,7 +1117,7 @@ If you change the value of the `createIfNotExists` argument to `false`, the meth method takes the name of a resource that is stored as a object, gets the value of the resource, and returns an object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. + The method takes the name of a resource that is stored as a object, gets the value of the resource, and returns an object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. The returned resource is localized for the UI culture of the current thread, which is defined by the property. If the resource is not localized for that culture, the resource manager uses fallback rules to load an appropriate resource. If no usable set of localized resources is found, the falls back on the default culture's resources. If a resource set for the default culture is not found, the method throws a exception or, if the resource set is expected to reside in a satellite assembly, a exception. If the resource manager can load an appropriate resource set but cannot find a resource named `name`, the method returns `null`. @@ -1126,7 +1126,7 @@ If you change the value of the `createIfNotExists` argument to `false`, the meth ## Examples - The following example uses the method to retrieve a bitmap that is used in an app's opening splash window. The following source code from a file named CreateResources.cs (for C#) or CreateResources.vb (for Visual Basic) generates a .resx file named AppResources.resx that contains the serialized image. In this case, the image is loaded from a file named SplashScreen.jpg; you can modify the file name to substitute your own image. + The following example uses the method to retrieve a bitmap that is used in an app's opening splash window. The following source code from a file named CreateResources.cs (for C#) or CreateResources.vb (for Visual Basic) generates a .resx file named AppResources.resx that contains the serialized image. In this case, the image is loaded from a file named SplashScreen.jpg; you can modify the file name to substitute your own image. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceManager/Overview/createresources.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceManager/GetStream/createresources.vb" id="Snippet4"::: @@ -1225,7 +1225,7 @@ csc GetStream.cs /resource:AppResources.resources method takes the name of a resource that is stored as a object, gets the value of the resource, and returns an object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. + The method takes the name of a resource that is stored as a object, gets the value of the resource, and returns an object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. The returned resource is localized for the culture that is specified by `culture`, or for the culture that is specified by the property if `culture` is `null`. If the resource is not localized for that culture, the resource manager uses fallback rules to load an appropriate resource. If no usable set of localized resources is found, the falls back on the default culture's resources. If a resource set for the default culture is not found, the method throws a exception or, if the resource set is expected to reside in a satellite assembly, a exception. If the resource manager can load an appropriate resource set but cannot find a resource named `name`, the method returns `null`. @@ -1478,12 +1478,12 @@ csc GetStream.cs /resource:AppResources.resources property is `false`, a resource with the name "Resource" is not equivalent to the resource with the name "resource". If is `true`, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that when is `true`, the and methods perform case-insensitive string comparisons by using the invariant culture. The advantage is that results of case-insensitive string comparisons performed by these methods are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. + If the value of the property is `false`, a resource with the name "Resource" is not equivalent to the resource with the name "resource". If is `true`, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that when is `true`, the and methods perform case-insensitive string comparisons by using the invariant culture. The advantage is that results of case-insensitive string comparisons performed by these methods are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. - For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). However, because the comparison is conducted by using the casing rules of the invariant culture if is `true`, this comparison succeeds. + For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). However, because the comparison is conducted by using the casing rules of the invariant culture if is `true`, this comparison succeeds. > [!NOTE] -> For performance reasons, it is best to always specify the correct case for your resource names. Setting to `true` can cause a significant increase in working set and a significant decline in performance. +> For performance reasons, it is best to always specify the correct case for your resource names. Setting to `true` can cause a significant increase in working set and a significant decline in performance. ]]> @@ -1727,12 +1727,12 @@ csc GetStream.cs /resource:AppResources.resources This method will shrink the working set in a running app. Any future resource lookups on this object will be as expensive as the first lookup, because the resource manager will have to search and load resources again. This can be useful in some complex threading scenarios, where creating a new object is the appropriate behavior. > [!NOTE] -> Starting with the .NET Framework version 2.0, the method is not thread safe with respect to , , and operations. The advantage of this change is a performance improvement for multiple threads that access resources. However, if you call the method in one thread while simultaneously getting a resource in another thread, the get operation can throw an exception. +> Starting with the .NET Framework version 2.0, the method is not thread safe with respect to , , and operations. The advantage of this change is a performance improvement for multiple threads that access resources. However, if you call the method in one thread while simultaneously getting a resource in another thread, the get operation can throw an exception. You can also use this method in situations where the managed instances for the resources created by the current resource manager have to be released deterministically, without waiting for the resource manager to go completely out of scope and be garbage collected. > [!NOTE] -> Calling this method does not unload satellite assemblies. To unload satellite assemblies, use the method . +> Calling this method does not unload satellite assemblies. To unload satellite assemblies, use the method . ]]> diff --git a/xml/System.Resources/ResourceReader.xml b/xml/System.Resources/ResourceReader.xml index 298a06315d6..d4d3af43edf 100644 --- a/xml/System.Resources/ResourceReader.xml +++ b/xml/System.Resources/ResourceReader.xml @@ -174,7 +174,7 @@ constructor instantiates a object that retrieves resources either from a standalone .resources file or from a .resources file that is embedded in an assembly. To read from a standalone .resources file, instantiate a object and pass it to the constructor. To read from an embedded .resources file, call the method with the case-sensitive name of the .resources file, and pass the returned object to the constructor. + The constructor instantiates a object that retrieves resources either from a standalone .resources file or from a .resources file that is embedded in an assembly. To read from a standalone .resources file, instantiate a object and pass it to the constructor. To read from an embedded .resources file, call the method with the case-sensitive name of the .resources file, and pass the returned object to the constructor. [!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)] @@ -277,7 +277,7 @@ If the Visual Basic example is named `Example.vb`, you can compile it by using t constructor instantiates a object that retrieves resources from a standalone .resources file. To retrieve resources from an embedded .resources file, use the constructor. + The constructor instantiates a object that retrieves resources from a standalone .resources file. To retrieve resources from an embedded .resources file, use the constructor. [!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)] @@ -368,12 +368,12 @@ Label11="Mobile Phone:" can be safely called multiple times. + can be safely called multiple times. ## Examples - The following example moves through a file's resources and displays all the key/value pairs it finds. The code then uses the method to shut down the and to release all resources used by it. + The following example moves through a file's resources and displays all the key/value pairs it finds. The code then uses the method to shut down the and to release all resources used by it. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceReader/Close/getenumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceReader/Close/getenumerator.vb" id="Snippet1"::: @@ -434,9 +434,9 @@ Label11="Mobile Phone:" , call to release all resources used by this instance. You should eliminate further references to this instance so that the garbage collector can reclaim the memory of the instance instead of keeping it alive for finalization. + When you are finished using this instance of , call to release all resources used by this instance. You should eliminate further references to this instance so that the garbage collector can reclaim the memory of the instance instead of keeping it alive for finalization. - calls the private Dispose(Boolean) method, which contains the code to release managed and unmanaged resources. For more information, see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + calls the private Dispose(Boolean) method, which contains the code to release managed and unmanaged resources. For more information, see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). ]]> @@ -500,7 +500,7 @@ Label11="Mobile Phone:" method and then repeatedly calling the method on the returned object until the method returns `false`. The resource name is available from the property; its value from the property. The example illustrates how to enumerate resources in this way. + Typically, you enumerate resources by calling the method and then repeatedly calling the method on the returned object until the method returns `false`. The resource name is available from the property; its value from the property. The example illustrates how to enumerate resources in this way. The implementation of the property by the class can throw the following exceptions: @@ -516,10 +516,10 @@ Label11="Mobile Phone:" The type to which the data belongs cannot be found. - You can handle the exception by calling the method to retrieve information about the data type and the byte array assigned to the named resource. For more information, see the "Retrieving Resources by Name with GetResourceData" section in the class topic. + You can handle the exception by calling the method to retrieve information about the data type and the byte array assigned to the named resource. For more information, see the "Retrieving Resources by Name with GetResourceData" section in the class topic. > [!IMPORTANT] -> The class includes two methods that return enumerators. The method returns an interface object and is the recommended method to call when enumerating resources. +> The class includes two methods that return enumerators. The method returns an interface object and is the recommended method to call when enumerating resources. ## Examples The example in this section uses the following .txt file named `PatientForm.txt` to define the resources used by an application. @@ -610,7 +610,7 @@ Label11="Mobile Phone:" method retrieves the value of a named resource as a byte array. It is typically used when the property throws an exception when it tries to retrieve the value of a resource. + The method retrieves the value of a named resource as a byte array. It is typically used when the property throws an exception when it tries to retrieve the value of a resource. `resourceType` is a string that represents the data type of the resource. It can be any of the following values: @@ -618,9 +618,9 @@ Label11="Mobile Phone:" |ResourceTypeCode value|Description| |----------------------------|-----------------| - |`ResourceTypeCode.ByteArray`|The data is a byte array. This data type commonly results from the call to the method.| - |`ResourceTypeCode.Null`|The data is a null reference. This data type commonly results from the call to the method with an object whose value is `null`.| - |`ResourceTypeCode.Stream`|The data is stored in a stream. This data type commonly results from the call to the or method.| + |`ResourceTypeCode.ByteArray`|The data is a byte array. This data type commonly results from the call to the method.| + |`ResourceTypeCode.Null`|The data is a null reference. This data type commonly results from the call to the method with an object whose value is `null`.| + |`ResourceTypeCode.Stream`|The data is stored in a stream. This data type commonly results from the call to the or method.| Assuming that `resourceData` has not been corrupted, it can usually be converted from a byte array back to its original value by calling a or method. @@ -628,7 +628,7 @@ Label11="Mobile Phone:" `Extensions.Person, Utility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null` -- The string used to describe the data type in the method call. +- The string used to describe the data type in the method call. ]]> @@ -696,7 +696,7 @@ Label11="Mobile Phone:" is an explicit interface implementation. It can be used only when the instance is cast to an interface. The recommended approach to enumerating the resources in a .resources file is to call the method of the object returned by the method. + is an explicit interface implementation. It can be used only when the instance is cast to an interface. The recommended approach to enumerating the resources in a .resources file is to call the method of the object returned by the method. ]]> diff --git a/xml/System.Resources/ResourceSet.xml b/xml/System.Resources/ResourceSet.xml index 5d20a86b668..a5e24e4b058 100644 --- a/xml/System.Resources/ResourceSet.xml +++ b/xml/System.Resources/ResourceSet.xml @@ -87,10 +87,10 @@ The class enumerates over an , loading every name and value, and storing them in a . A custom can be used. - You can instantiate a object that represents the resources of a specific culture by calling the method. + You can instantiate a object that represents the resources of a specific culture by calling the method. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. ]]> @@ -366,15 +366,15 @@ ## Remarks All calls to methods on the after a call to this method might fail. - can be safely called multiple times. + can be safely called multiple times. > [!NOTE] -> The current implementation of calls (`true`). +> The current implementation of calls (`true`). ## Examples - The following code example uses the method to release all resources used by the calling instance. + The following code example uses the method to release all resources used by the calling instance. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceSet/.ctor/getenumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceSet/.ctor/getenumerator.vb" id="Snippet1"::: @@ -442,10 +442,10 @@ when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. > [!NOTE] -> The current method is the implementation of . This implementation calls (`true`). +> The current method is the implementation of . This implementation calls (`true`). ]]> @@ -661,13 +661,13 @@ ## Remarks Enumerators only allow reading the data in the collection. Enumerators cannot be used to modify the underlying collection. - Initially, the enumerator is positioned before the first element in the collection. also brings the enumerator back to this position. At this position, calling throws an exception. Therefore, you must call to advance the enumerator to the first element of the collection before reading the value of . + Initially, the enumerator is positioned before the first element in the collection. also brings the enumerator back to this position. At this position, calling throws an exception. Therefore, you must call to advance the enumerator to the first element of the collection before reading the value of . - returns the same object until either or is called. sets to the next element. + returns the same object until either or is called. sets to the next element. - After the end of the collection is passed, the enumerator is positioned after the last element in the collection, and calling returns `false`. If the last call to returned `false`, calling throws an exception. To set to the first element of the collection again, you can call followed by . + After the end of the collection is passed, the enumerator is positioned after the last element in the collection, and calling returns `false`. If the last call to returned `false`, calling throws an exception. To set to the first element of the collection again, you can call followed by . - An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying or deleting elements, the enumerator is irrecoverably invalidated and the next call to or throws an . If the collection is modified between and , will return the element that it is set to, even if the enumerator is already invalidated. + An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying or deleting elements, the enumerator is irrecoverably invalidated and the next call to or throws an . If the collection is modified between and , will return the element that it is set to, even if the enumerator is already invalidated. You can use the property to access the value stored in the current element. Use the property to access the key of the current element. Use the property to access the value of the current element. @@ -676,7 +676,7 @@ ## Examples - The following example demonstrates how to create a `rs` for the file `items.resources`. Next, the method is used to create an for `rs`. The iterates through `rs` and displays the contents to the console. + The following example demonstrates how to create a `rs` for the file `items.resources`. Next, the method is used to create an for `rs`. The iterates through `rs` and displays the contents to the console. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceSet/.ctor/getenumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceSet/.ctor/getenumerator.vb" id="Snippet1"::: @@ -753,7 +753,7 @@ . + The name of the resource object is case sensitive. For a case-insensitive search, use . ]]> @@ -820,7 +820,7 @@ . The advantage is that results of case-insensitive string comparisons performed by this method are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. + If the value of the `ignoreCase` parameter is `true`, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that this method always performs case-insensitive string comparisons using . The advantage is that results of case-insensitive string comparisons performed by this method are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). Using the `GetObject` method with `ignoreCase` set to `true`, this comparison succeeds. @@ -958,7 +958,7 @@ . The advantage is that results of case-insensitive string comparisons performed by this method are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. + If the value of the `ignoreCase` parameter is `true`, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that this method always performs case-insensitive string comparisons using . The advantage is that results of case-insensitive string comparisons performed by this method are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). Using the `GetString` method with `ignoreCase` set to `true`, this comparison succeeds. diff --git a/xml/System.Resources/ResourceWriter.xml b/xml/System.Resources/ResourceWriter.xml index f37b019f312..8d6f3673d14 100644 --- a/xml/System.Resources/ResourceWriter.xml +++ b/xml/System.Resources/ResourceWriter.xml @@ -79,12 +79,12 @@ ## Remarks provides a default implementation of the interface. It enables you to programmatically create a binary resource (.resources) file. - Resources are specified as name and value pairs using the method. Resource names are case-sensitive when used for lookups, but to more easily support authoring tools and help eliminate bugs, will not allow a .resources file to have names that vary only by case. The class enables you to create string, object, and binary resources. Binary resources can be written to the resource file as a byte array or a stream. + Resources are specified as name and value pairs using the method. Resource names are case-sensitive when used for lookups, but to more easily support authoring tools and help eliminate bugs, will not allow a .resources file to have names that vary only by case. The class enables you to create string, object, and binary resources. Binary resources can be written to the resource file as a byte array or a stream. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. - To create a resources file, create a with a unique file name, call at least once, call to write the resources file to disk, and then call to close the file. Calling will implicitly call if you do not explicitly call . + To create a resources file, create a with a unique file name, call at least once, call to write the resources file to disk, and then call to close the file. Calling will implicitly call if you do not explicitly call . The resources will not necessarily be written in the same order they were added. @@ -303,14 +303,14 @@ is called. + The resource is not written until is called. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add a graphics image that has been read as an array of bytes to a object. + The following example uses the method to add a graphics image that has been read as an array of bytes to a object. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResource/addresource_byt1.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/AddResource/addresource_byt1.vb" id="Snippet4"::: @@ -380,12 +380,12 @@ ## Remarks You can specify any stream that supports the property for `value`. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add a graphics image that has been saved to a object to a object. + The following example uses the method to add a graphics image that has been saved to a object to a object. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResource/addresource_str1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/AddResource/addresource_str1.vb" id="Snippet2"::: @@ -465,14 +465,14 @@ ## Remarks `value` must be serializable. - The resource is not written until the method is called. + The resource is not written until the method is called. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add object data to a binary resources file. + The following example uses the method to add object data to a binary resources file. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResource/addresource_obj1.cs" id="Snippet1"::: @@ -551,14 +551,14 @@ is called. + The resource is not written until is called. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add string resources to a object. + The following example uses the method to add string resources to a object. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/.ctor/resourcewritercstr1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/.ctor/resourcewritercstr1.vb" id="Snippet1"::: @@ -632,12 +632,12 @@ ## Remarks You can specify any stream that supports the property for `value`. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add a graphics image that has been saved to a object to a object. + The following example uses the method to add a graphics image that has been saved to a object to a object. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResource/addresource_str2.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/AddResource/addresource_str2.vb" id="Snippet3"::: @@ -705,7 +705,7 @@ method to add a resource in binary form (that is, as an array of bytes) to the list of resources to be written. You must specify the name of the resource, the type name of the data contained in the resource, and the binary representation of the data itself. After you have added each resource you require, use the method to write the list of resources to the resources file or stream that was specified in the constructor. + Use the method to add a resource in binary form (that is, as an array of bytes) to the list of resources to be written. You must specify the name of the resource, the type name of the data contained in the resource, and the binary representation of the data itself. After you have added each resource you require, use the method to write the list of resources to the resources file or stream that was specified in the constructor. `typeName` is a string that represents the data type of the resource. It can be any of the following values: @@ -721,12 +721,12 @@ `Extensions.Person, Utility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null` - A parallel method for reading resource data written with the method is . + A parallel method for reading resource data written with the method is . ## Examples - The following example uses the method to write two integer values to a .resources file, and then uses a object to retrieve them. + The following example uses the method to write two integer values to a .resources file, and then uses a object to retrieve them. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResourceData/addresourcedata.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/AddResourceData/addresourcedata.vb" id="Snippet1"::: @@ -789,12 +789,12 @@ is called implicitly by , if required. + is called implicitly by , if required. ## Examples - The following example uses the method to write all resource objects in a class to the output stream. The code then shuts down the writer. + The following example uses the method to write all resource objects in a class to the output stream. The code then shuts down the writer. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/.ctor/resourcewritercstr1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/.ctor/resourcewritercstr1.vb" id="Snippet1"::: @@ -853,12 +853,12 @@ . + The implementation of this method is the same as . ## Examples - The following code example uses the method to write all resource objects in a class to the output stream. The code then shuts down the writer and make the writer's resources available for other processes. + The following code example uses the method to write all resource objects in a class to the output stream. The code then shuts down the writer and make the writer's resources available for other processes. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/Dispose/resourcewriterdispose.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/Dispose/resourcewriterdispose.vb" id="Snippet1"::: @@ -927,16 +927,16 @@ method is called implicitly by the method if it is not called by your application code. + The method is called implicitly by the method if it is not called by your application code. - can only be called once, after all calls to and have been made. If an exception occurs while writing the resources, the output stream will be closed to prevent writing invalid information. + can only be called once, after all calls to and have been made. If an exception occurs while writing the resources, the output stream will be closed to prevent writing invalid information. - does not close the output stream in normal cases. Unless you are combining extra data with your .resources file or need access to the stream afterwards, you should call after calling , or simply call . + does not close the output stream in normal cases. Unless you are combining extra data with your .resources file or need access to the stream afterwards, you should call after calling , or simply call . ## Examples - The following code example uses the method to write all resource objects in a class to the output stream + The following code example uses the method to write all resource objects in a class to the output stream :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/Generate/resourcewritergenerate.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/Generate/resourcewritergenerate.vb" id="Snippet1"::: diff --git a/xml/System.Resources/UltimateResourceFallbackLocation.xml b/xml/System.Resources/UltimateResourceFallbackLocation.xml index 1726feb534b..be96d2c9559 100644 --- a/xml/System.Resources/UltimateResourceFallbackLocation.xml +++ b/xml/System.Resources/UltimateResourceFallbackLocation.xml @@ -65,13 +65,13 @@ Specifies whether a object looks for the resources of the app's default culture in the main assembly or in a satellite assembly. - enumeration is used with the constructor to specify whether a object retrieves the resources of the app's default culture from the main app assembly (the default), or from a satellite assembly. In a localized application, the resources of the default culture are used if no culture-specific resources are found after using the resource fallback process. For more information, see the "Resource Fallback Process" section in [Packaging and Deploying Resources](/dotnet/framework/resources/packaging-and-deploying-resources-in-desktop-apps). - - If you specify a value of MainAssembly or no value to the attribute and resource manager cannot load a resource set that belongs to the default culture, it throws a exception. If you specify a value of Satellite to the and resource manager cannot load a resource set that belongs to the default culture, it throws a exception. - + enumeration is used with the constructor to specify whether a object retrieves the resources of the app's default culture from the main app assembly (the default), or from a satellite assembly. In a localized application, the resources of the default culture are used if no culture-specific resources are found after using the resource fallback process. For more information, see the "Resource Fallback Process" section in [Packaging and Deploying Resources](/dotnet/framework/resources/packaging-and-deploying-resources-in-desktop-apps). + + If you specify a value of MainAssembly or no value to the attribute and resource manager cannot load a resource set that belongs to the default culture, it throws a exception. If you specify a value of Satellite to the and resource manager cannot load a resource set that belongs to the default culture, it throws a exception. + ]]> diff --git a/xml/System.Runtime.Caching.Hosting/IApplicationIdentifier.xml b/xml/System.Runtime.Caching.Hosting/IApplicationIdentifier.xml index b30a2f0cccb..9b2dd3841cb 100644 --- a/xml/System.Runtime.Caching.Hosting/IApplicationIdentifier.xml +++ b/xml/System.Runtime.Caching.Hosting/IApplicationIdentifier.xml @@ -58,9 +58,9 @@ method is typically implemented by a .NET Framework host environment in order to construct an application identifier for an implementation. A implementation uses this information to identify the application domain that is currently running. + The method is typically implemented by a .NET Framework host environment in order to construct an application identifier for an implementation. A implementation uses this information to identify the application domain that is currently running. - For example, in ASP.NET, the cache uses an application identifier to construct identifiers for cache performance counters. The cache calls the method that is implemented by the host environment and the host returns the identifier. This provides names for performance counter instances that can be distinguished between application domains when multiple application domains are running. + For example, in ASP.NET, the cache uses an application identifier to construct identifiers for cache performance counters. The cache calls the method that is implemented by the host environment and the host returns the identifier. This provides names for performance counter instances that can be distinguished between application domains when multiple application domains are running. ]]> diff --git a/xml/System.Runtime.Caching.Hosting/IFileChangeNotificationSystem.xml b/xml/System.Runtime.Caching.Hosting/IFileChangeNotificationSystem.xml index ea1a5da9ae5..0e2d454f1ea 100644 --- a/xml/System.Runtime.Caching.Hosting/IFileChangeNotificationSystem.xml +++ b/xml/System.Runtime.Caching.Hosting/IFileChangeNotificationSystem.xml @@ -72,7 +72,7 @@ interface in order to register file paths for monitoring with the host environment. The method is called by implementers of the interface in order to register a file or directory for change monitoring. + This method is used by custom cache objects and custom change monitors that implement the host environment's interface in order to register file paths for monitoring with the host environment. The method is called by implementers of the interface in order to register a file or directory for change monitoring. ]]> @@ -106,7 +106,7 @@ method must be called by custom caches and custom change monitors that are being disposed by the host environment in order to stop monitoring file paths and directories. + The method must be called by custom caches and custom change monitors that are being disposed by the host environment in order to stop monitoring file paths and directories. ]]> diff --git a/xml/System.Runtime.Caching.Hosting/IMemoryCacheManager.xml b/xml/System.Runtime.Caching.Hosting/IMemoryCacheManager.xml index 94a59747d69..7a6c8aa0bb5 100644 --- a/xml/System.Runtime.Caching.Hosting/IMemoryCacheManager.xml +++ b/xml/System.Runtime.Caching.Hosting/IMemoryCacheManager.xml @@ -60,7 +60,7 @@ method to release the reference. When a cache is being disposed, it should call the method to make sure that no reference to the cache is held on the host. + If a cache has previously registered itself with the host environment, the cache can call the method to release the reference. When a cache is being disposed, it should call the method to make sure that no reference to the cache is held on the host. ]]> @@ -94,7 +94,7 @@ method to periodically report the size of the cache's memory footprint to the host environment. + A well-behaved cache implementation should use the method to periodically report the size of the cache's memory footprint to the host environment. The cache implementation that reports the size also passes a reference to itself as a parameter. This enables the host environment to perform the following tasks: diff --git a/xml/System.Runtime.Caching/CacheEntryChangeMonitor.xml b/xml/System.Runtime.Caching/CacheEntryChangeMonitor.xml index 40309cab921..9369c451bbd 100644 --- a/xml/System.Runtime.Caching/CacheEntryChangeMonitor.xml +++ b/xml/System.Runtime.Caching/CacheEntryChangeMonitor.xml @@ -28,7 +28,7 @@ class provides abstract, read-only properties that can be implemented for monitoring cache entries. This class is used when a cache implementation has to monitor changes to entries in its own cache. For caches that are cache implementations, an instance of the type is returned by the method. + The class provides abstract, read-only properties that can be implemented for monitoring cache entries. This class is used when a cache implementation has to monitor changes to entries in its own cache. For caches that are cache implementations, an instance of the type is returned by the method. ]]> diff --git a/xml/System.Runtime.Caching/CacheEntryRemovedArguments.xml b/xml/System.Runtime.Caching/CacheEntryRemovedArguments.xml index a421be2b9cf..79fdbd84a24 100644 --- a/xml/System.Runtime.Caching/CacheEntryRemovedArguments.xml +++ b/xml/System.Runtime.Caching/CacheEntryRemovedArguments.xml @@ -25,13 +25,13 @@ Provides information about a cache entry that was removed from the cache. - class represent the cache entry itself, the instance that the entry was removed from, and the reason for the removal. The constructor of the class uses these arguments to create a new instance of the class. - - A object is typically created in a callback method to pass information about a removed cache entry back to an application when a cache entry is removed from the cache. - + class represent the cache entry itself, the instance that the entry was removed from, and the reason for the removal. The constructor of the class uses these arguments to create a new instance of the class. + + A object is typically created in a callback method to pass information about a removed cache entry back to an application when a cache entry is removed from the cache. + ]]> @@ -63,20 +63,20 @@ An instance of the cached entry that was removed. Initializes a new instance of the class. - class when they want to be notified after a cache entry has been removed from the cache. - - When a cache implementation is about to remove one or more cache entries from the cache, the cache implementation calls the delegate that was registered in the application. When a cache implementation calls the delegate, it typically calls the constructor to pass to the callback a new instance that contains information about the cache entry that is being removed. The callback notifies the application that registered the callback about the cache entry that is being removed. After the constructor returns, the instance contains the details about the removal of the cache entry. - + class when they want to be notified after a cache entry has been removed from the cache. + + When a cache implementation is about to remove one or more cache entries from the cache, the cache implementation calls the delegate that was registered in the application. When a cache implementation calls the delegate, it typically calls the constructor to pass to the callback a new instance that contains information about the cache entry that is being removed. The callback notifies the application that registered the callback about the cache entry that is being removed. After the constructor returns, the instance contains the details about the removal of the cache entry. + ]]> - is . - - -or- - + is . + + -or- + is . @@ -134,11 +134,11 @@ Gets a value that indicates why a cache entry was removed. One of the enumeration values that indicates why the entry was removed. - enumeration indicates one of a predefined set of reasons for the removal, such as that the entry was explicitly removed or that it expired. - + enumeration indicates one of a predefined set of reasons for the removal, such as that the entry was explicitly removed or that it expired. + ]]> diff --git a/xml/System.Runtime.Caching/CacheItem.xml b/xml/System.Runtime.Caching/CacheItem.xml index 48b3981a30d..df64a59857b 100644 --- a/xml/System.Runtime.Caching/CacheItem.xml +++ b/xml/System.Runtime.Caching/CacheItem.xml @@ -82,7 +82,7 @@ method overload is called, the property values for and are set to `null`. + When the method overload is called, the property values for and are set to `null`. ]]> @@ -113,7 +113,7 @@ method overload is called, the property value for is set to `null`. + When the method overload is called, the property value for is set to `null`. ]]> diff --git a/xml/System.Runtime.Caching/ChangeMonitor.xml b/xml/System.Runtime.Caching/ChangeMonitor.xml index de3e8d6142a..2ed862a761a 100644 --- a/xml/System.Runtime.Caching/ChangeMonitor.xml +++ b/xml/System.Runtime.Caching/ChangeMonitor.xml @@ -140,7 +140,7 @@ Note: This automatic call to the dispose method during the event firing only occ method is used to release the instance and related resources. The public method is invoked to coordinate the disposal process with key life-cycle events of derived change-monitor classes (such as initialization), and to release the instance so that the instance can be garbage collected. The method is implemented by derived change-monitor classes to dispose of their managed and unmanaged resources. + The method is used to release the instance and related resources. The public method is invoked to coordinate the disposal process with key life-cycle events of derived change-monitor classes (such as initialization), and to release the instance so that the instance can be garbage collected. The method is implemented by derived change-monitor classes to dispose of their managed and unmanaged resources. ]]> @@ -172,35 +172,35 @@ Note: This automatic call to the dispose method during the event firing only occ method invokes the method of derived classes only one time, the first time it is called. Subsequent calls to the method have no effect. After the method has been called, the property is set to `true`. + The method invokes the method of derived classes only one time, the first time it is called. Subsequent calls to the method have no effect. After the method has been called, the property is set to `true`. - The overload must be called to dispose of a instance. The following are the rules for calling the dispose method: + The overload must be called to dispose of a instance. The following are the rules for calling the dispose method: - Before an item is inserted into the cache, it is the caller's responsibility to dispose of a instance. -- Once cache item and the instances that are associated with it are passed to a cache, the cache implementer that must make sure that is called, even if the insert fails. +- Once cache item and the instances that are associated with it are passed to a cache, the cache implementer that must make sure that is called, even if the insert fails. -- After an item and its associated instances are passed to a cache, the caller must not dispose the dependency because when the method is called, the call is treated as if the dependency has changed. As a result, the method is automatically invoked. +- After an item and its associated instances are passed to a cache, the caller must not dispose the dependency because when the method is called, the call is treated as if the dependency has changed. As a result, the method is automatically invoked. -- Taking these rules into consideration, the method must be called in one of the following ways: +- Taking these rules into consideration, the method must be called in one of the following ways: - - Users must call the method overload if they decide not to insert the derived change-monitor instance into a cache. + - Users must call the method overload if they decide not to insert the derived change-monitor instance into a cache. - - The cache implementation is responsible for calling the overload if the implementation tries to insert the change-monitor instance into an object cache but the insertion fails. When the insertion attempt causes an exception, the cache implementation must dispose any associated dependencies. + - The cache implementation is responsible for calling the overload if the implementation tries to insert the change-monitor instance into an object cache but the insertion fails. When the insertion attempt causes an exception, the cache implementation must dispose any associated dependencies. - If the cache entry is removed, the cache implementation must also dispose the dependency. - The internal implementation of the method automatically calls the method after it calls a callback that is registered through the method. + The internal implementation of the method automatically calls the method after it calls a callback that is registered through the method. > [!NOTE] > This automatic dispose during the event firing only occurs if the initialization of the instance previously completed. - When a derived change monitor's constructor calls the method, if the state of the change monitor has already changed (that is, the state that is monitored has already changed when the constructor was still active) then method will automatically dispose the change monitor. + When a derived change monitor's constructor calls the method, if the state of the change monitor has already changed (that is, the state that is monitored has already changed when the constructor was still active) then method will automatically dispose the change monitor. > [!NOTE] -> Users should not call the method. However, you cannot prevent users from calling the method. Therefore, if they do, the method is invoked. In that case, the cache entry is notified as if the dependency has changed. +> Users should not call the method. However, you cannot prevent users from calling the method. Therefore, if they do, the method is invoked. In that case, the cache entry is notified as if the dependency has changed. - To prevent derived classes from overriding method, the method is not an explicit interface implementation. + To prevent derived classes from overriding method, the method is not an explicit interface implementation. ]]> @@ -235,7 +235,7 @@ Note: This automatic call to the dispose method during the event firing only occ method will invoke the implemented method only one time. + When the value of `disposing` value is `true`, all managed and unmanaged resources are disposed and any references to this object are released so that the derived change-monitor instance can be garbage collected. It is guaranteed that the base method will invoke the implemented method only one time. ]]> @@ -272,7 +272,7 @@ Note: This automatic call to the dispose method during the event firing only occ ## Remarks You can check the value of this property in a derived class to see whether a dependency has changed. - The value is set to `true` when a dependency change occurs (that is, when the method is called). After the method is called by the derived class, the value of the property will be `true`, regardless of whether a instance has been notified by a call to the method. + The value is set to `true` when a dependency change occurs (that is, when the method is called). After the method is called by the derived class, the value of the property will be `true`, regardless of whether a instance has been notified by a call to the method. > [!NOTE] > Callers can check the property to see whether a dependency has changed. However, in a multi-threaded environment, a simpler and more maintainable approach is to insert data into a cache implementation without checking the property. Cache implementations must check the property for you and must not perform an insert or set operation if one or more associated dependencies have already changed. @@ -306,9 +306,9 @@ Note: This automatic call to the dispose method during the event firing only occ method. + If a dependency changes before initialization is complete in a derived class, the constructor of the derived class must invoke the method. - When the method is invoked, the property is automatically set to `true` by the change monitor. As a result, when the change monitor's constructor calls the method, the base class will automatically call the method. If initialization is complete, the method automatically disposes the derived change-monitor instance. + When the method is invoked, the property is automatically set to `true` by the change monitor. As a result, when the change monitor's constructor calls the method, the base class will automatically call the method. If initialization is complete, the method automatically disposes the derived change-monitor instance. ]]> @@ -341,7 +341,7 @@ Note: This automatic call to the dispose method during the event firing only occ method calls the method in a derived class to dispose of the instance. + The property is set to `true` after the base method calls the method in a derived class to dispose of the instance. ]]> @@ -380,9 +380,9 @@ Note: This automatic call to the dispose method during the event firing only occ > [!NOTE] > The base cache extensibility API has no requirement for explicit dependency on the type of state. - The implementation of the method automatically determines whether the state of the monitor has already changed at the time method is called. If the property is `true`, then the method automatically calls the event handler, that was registered, through the method. This occurs because it is possible that from the time a cache implementation creates a change monitor, to the time a cache implementation gets the monitor and wires itself up to it, the underlying monitored state has changed. If the state has already changed then the object that is passed to the method is `null`. + The implementation of the method automatically determines whether the state of the monitor has already changed at the time method is called. If the property is `true`, then the method automatically calls the event handler, that was registered, through the method. This occurs because it is possible that from the time a cache implementation creates a change monitor, to the time a cache implementation gets the monitor and wires itself up to it, the underlying monitored state has changed. If the state has already changed then the object that is passed to the method is `null`. - The method can be invoked only one time, and will throw an exception on subsequent calls. + The method can be invoked only one time, and will throw an exception on subsequent calls. ]]> @@ -423,9 +423,9 @@ Note: This automatic call to the dispose method during the event firing only occ method is called when dependency changes occur. The method is also invoked when a change-monitor instance is disposed but the disposal occurs only if the callback has not already been invoked. + Typically, the method is called when dependency changes occur. The method is also invoked when a change-monitor instance is disposed but the disposal occurs only if the callback has not already been invoked. - If the method is called before the method is called, the state data from the call to the method is saved by the cache implementation. Also, the callback to the method is invoked immediately when the method is invoked. + If the method is called before the method is called, the state data from the call to the method is saved by the cache implementation. Also, the callback to the method is invoked immediately when the method is invoked. ]]> diff --git a/xml/System.Runtime.Caching/HostFileChangeMonitor.xml b/xml/System.Runtime.Caching/HostFileChangeMonitor.xml index f151723e13f..26332e9575d 100644 --- a/xml/System.Runtime.Caching/HostFileChangeMonitor.xml +++ b/xml/System.Runtime.Caching/HostFileChangeMonitor.xml @@ -98,7 +98,7 @@ constructor must provide a non-null value for the `filePaths` parameter. At a minimum, the constructor validates the collection of paths that is passed into it and then initializes monitoring for those paths. + Calls to the constructor must provide a non-null value for the `filePaths` parameter. At a minimum, the constructor validates the collection of paths that is passed into it and then initializes monitoring for those paths. > [!NOTE] > The constructor performs only string validation of the path name. It does not canonicalize paths or validate that the paths exist. diff --git a/xml/System.Runtime.Caching/MemoryCache.xml b/xml/System.Runtime.Caching/MemoryCache.xml index e41cfdaf8eb..4020b2cdf2f 100644 --- a/xml/System.Runtime.Caching/MemoryCache.xml +++ b/xml/System.Runtime.Caching/MemoryCache.xml @@ -42,7 +42,7 @@ The class does not allow `null` as a value in the cache. Any attempt to add or change a cache entry with a value of `null` will fail. - The type does not implement *cache regions*. Therefore, when you call methods that implement base methods that contain a parameter for regions, do not pass a value for the parameter. The methods that use the region parameter all supply a default `null` value. For example, the method overload has a `regionName` parameter whose default value is `null`. + The type does not implement *cache regions*. Therefore, when you call methods that implement base methods that contain a parameter for regions, do not pass a value for the parameter. The methods that use the region parameter all supply a default `null` value. For example, the method overload has a `regionName` parameter whose default value is `null`. @@ -136,11 +136,11 @@ private void btnGet_Click(object sender, EventArgs e) ## Remarks When the class is initialized, it checks for configuration entries that might have been overridden by using the optional `config` parameter in the constructor. You can pass the following parameters in the `config` parameter. All values can be passed as integers. -- +- -- +- -- +- When this constructor is invoked, configuration settings are first retrieved from application configuration files. If no configuration entries exist in the application configuration file, only the settings provided in `config` are applied. If the configuration entries in the application configuration exist, and if information is also passed in `config`, the information in the `config` overrides the information that is read from the configuration file. @@ -222,7 +222,7 @@ private void btnGet_Click(object sender, EventArgs e) ## Remarks > [!WARNING] -> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. +> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. ]]> @@ -239,7 +239,7 @@ private void btnGet_Click(object sender, EventArgs e) method overloads are used to insert a cache entry into the cache. If a cache entry with a matching key does not exist, these methods insert a new entry. If a cache entry with a matching key already exists, they return the existing entry. + The method overloads are used to insert a cache entry into the cache. If a cache entry with a matching key does not exist, these methods insert a new entry. If a cache entry with a matching key already exists, they return the existing entry. ]]> @@ -277,7 +277,7 @@ private void btnGet_Click(object sender, EventArgs e) The `item` parameter supplies the key and the value that is used by the method. If the cache has a cache entry with the same key as the key of the `item` parameter, the method returns the existing entry as a instance. If there is no existing cache entry, the method creates a new one by using the key and value supplied by the `item` parameter, and with the eviction details specified by `policy`. > [!WARNING] -> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. +> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. ]]> @@ -326,10 +326,10 @@ private void btnGet_Click(object sender, EventArgs e) method overload returns `null`. If a matching cache entry exists, the existing entry is returned. + If the cache does not have a cache entry whose key matches the `key` parameter, a new cache entry is created, and the method overload returns `null`. If a matching cache entry exists, the existing entry is returned. > [!WARNING] -> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. +> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. ]]> @@ -383,7 +383,7 @@ private void btnGet_Click(object sender, EventArgs e) ## Remarks > [!WARNING] -> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. +> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. ]]> @@ -500,11 +500,11 @@ You can specify the settings for the method creates a instance. This specialized change monitor is used to monitor the cache entries that are specified in the `keys` collection and to trigger events when the entries change. + The method creates a instance. This specialized change monitor is used to monitor the cache entries that are specified in the `keys` collection and to trigger events when the entries change. A monitored entry is considered to have changed for any of the following reasons: -- The key does not exist at the time of the call to the method. In that case, the resulting instance is immediately set to a changed state. This means that when code subsequently binds a change-notification callback, the callback is triggered immediately. +- The key does not exist at the time of the call to the method. In that case, the resulting instance is immediately set to a changed state. This means that when code subsequently binds a change-notification callback, the callback is triggered immediately. - The associated cache entry was removed from the cache. This can occur if the entry is explicitly removed, if it expires, or if it is evicted to recover memory @@ -616,11 +616,11 @@ You can specify the settings for the instance is bound to the event. However, during application-domain shutdown, if a memory-based cache has not been explicitly disposed, the cache instance will automatically call the method. + Each instance is bound to the event. However, during application-domain shutdown, if a memory-based cache has not been explicitly disposed, the cache instance will automatically call the method. The disposed cache instance is shut down using the following steps: -1. The state of the cache is set to indicate that the cache is disposed. Any attempt to call public caching methods that change the state of the cache, such as methods that add, remove, or retrieve cache entries, might cause unexpected behavior. For example, if you call the method after the cache is disposed, a no-op error occurs. If you attempt to retrieve items from the cache, the method will always return `null`. +1. The state of the cache is set to indicate that the cache is disposed. Any attempt to call public caching methods that change the state of the cache, such as methods that add, remove, or retrieve cache entries, might cause unexpected behavior. For example, if you call the method after the cache is disposed, a no-op error occurs. If you attempt to retrieve items from the cache, the method will always return `null`. 2. Performance counter information is no longer raised from the current cache instance. @@ -701,7 +701,7 @@ You can specify the settings for the method returns it as a instance. The and properties of the instance will be set. However, the property will be `null`, because regions are not implemented in the class. + If the cache entry specified by `key` exists in the cache, the method returns it as a instance. The and properties of the instance will be set. However, the property will be `null`, because regions are not implemented in the class. ]]> @@ -762,7 +762,7 @@ You can specify the settings for the method can be used to iterate over entries in the cache. + The enumerator that is returned by the method can be used to iterate over entries in the cache. > [!IMPORTANT] > Retrieving an enumerator for a instance is a resource-intensive and blocking operation. Therefore, the enumerator should not be used in production applications. @@ -909,7 +909,7 @@ You can specify the settings for the property returns the name of the current instance of the class. In an application that uses multiple cache instances, you can use the property to help distinguish instances. For more information, see the method. The default memory-based cache returns the default name. + The property returns the name of the current instance of the class. In an application that uses multiple cache instances, you can use the property to help distinguish instances. For more information, see the method. The default memory-based cache returns the default name. ]]> @@ -970,7 +970,7 @@ You can specify the settings for the property can be specified in the application configuration file. Alternatively they can be passed when the class is initialized. For more information about how to configure this property, see [<namedCaches> Element (Cache Settings)](/dotnet/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings). For more information about how to configure the property when the class is being initialized, see the method. + The settings for the property can be specified in the application configuration file. Alternatively they can be passed when the class is initialized. For more information about how to configure this property, see [<namedCaches> Element (Cache Settings)](/dotnet/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings). For more information about how to configure the property when the class is being initialized, see the method. ]]> @@ -1098,7 +1098,7 @@ You can specify the settings for the method overloads, the method always puts a cache value in the cache, regardless whether an entry already exists that has the same key. If the specified entry does not exist in the cache, a new cache entry is inserted. If the specified entry already exists, its value is updated. + Like other method overloads, the method always puts a cache value in the cache, regardless whether an entry already exists that has the same key. If the specified entry does not exist in the cache, a new cache entry is inserted. If the specified entry already exists, its value is updated. ]]> @@ -1159,7 +1159,7 @@ You can specify the settings for the method overloads, the method always puts a cache value in the cache, regardless whether an entry already exists with the same key. If the specified entry does not exist, a new cache entry is inserted. If the specified entry exists, it is updated. + Like other method overloads, the method always puts a cache value in the cache, regardless whether an entry already exists with the same key. If the specified entry does not exist, a new cache entry is inserted. If the specified entry exists, it is updated. The `absoluteExpiration` parameter indicates when the entry should be removed from the cache. @@ -1222,7 +1222,7 @@ You can specify the settings for the method overloads, the method always puts a cache value in the cache, regardless whether a matching entry already exists. If the specified entry does not exist in the cache, a new cache entry is inserted. If the specified entry exists, it is updated. + Like other method overloads, the method always puts a cache value in the cache, regardless whether a matching entry already exists. If the specified entry does not exist in the cache, a new cache entry is inserted. If the specified entry exists, it is updated. Removing an entry triggers any associated change monitors. If the removed item was associated with a object or object, the reason for removal that is passed to the callbacks is contained in the property. diff --git a/xml/System.Runtime.Caching/ObjectCache.xml b/xml/System.Runtime.Caching/ObjectCache.xml index 849fc7fcbd3..0ce92e840a0 100644 --- a/xml/System.Runtime.Caching/ObjectCache.xml +++ b/xml/System.Runtime.Caching/ObjectCache.xml @@ -89,9 +89,9 @@ Note: is not a singleton, bu method overloads try to insert a cache entry into the cache, without overwriting or removing an existing cache entry that has the same key. The cache entry can be a typed object or a generic object. + The method overloads try to insert a cache entry into the cache, without overwriting or removing an existing cache entry that has the same key. The cache entry can be a typed object or a generic object. - The method overloads and the method overloads have one significant difference. When these methods insert a cache entry, if a matching entry is found in the cache, the method overloads return the existing cache entry, but the method overloads do not. Having these different method overloads enables callers to optimize their code based on whether they need the existing cache entry. In distributed caches, returning an existing value by using the method might be more expensive than returning a Boolean value by using method. + The method overloads and the method overloads have one significant difference. When these methods insert a cache entry, if a matching entry is found in the cache, the method overloads return the existing cache entry, but the method overloads do not. Having these different method overloads enables callers to optimize their code based on whether they need the existing cache entry. In distributed caches, returning an existing value by using the method might be more expensive than returning a Boolean value by using method. ]]> @@ -127,7 +127,7 @@ Note: is not a singleton, bu method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. + The method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. ]]> @@ -166,7 +166,7 @@ Note: is not a singleton, bu method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. + The method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. ]]> @@ -205,7 +205,7 @@ Note: is not a singleton, bu method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. + The method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. ]]> @@ -222,9 +222,9 @@ Note: is not a singleton, bu method overloads insert an entry into the cache. If a cache entry with a matching key already exists, they return the existing entry. The cache entry can be a object or a generic object. + The method overloads insert an entry into the cache. If a cache entry with a matching key already exists, they return the existing entry. The cache entry can be a object or a generic object. - There is one difference between the overloads and the overloads. When these overloaded methods try to insert a cache entry, if an existing entry is found that has a key that matches an existing inserted cache entry, the overloads return the existing cache entry. The overloads do not. + There is one difference between the overloads and the overloads. When these overloaded methods try to insert a cache entry, if an existing entry is found that has a key that matches an existing inserted cache entry, the overloads return the existing cache entry. The overloads do not. ]]> @@ -290,7 +290,7 @@ Note: is not a singleton, bu method overload returns an object value, not a object. + This method overload returns an object value, not a object. ]]> @@ -328,7 +328,7 @@ Note: is not a singleton, bu method returns an object value, not a object. + The method returns an object value, not a object. ]]> @@ -390,7 +390,7 @@ Note: is not a singleton, bu class overrides the base method, the cache implementation must create a object. This specialized change monitor notifies callers when there are changes to the cache entries that are specified in the `keys` parameter. For example, if a monitored item in the `keys` parameter is updated or removed from the cache, the change monitor created by this method triggers an event. + When a derived class overrides the base method, the cache implementation must create a object. This specialized change monitor notifies callers when there are changes to the cache entries that are specified in the `keys` parameter. For example, if a monitored item in the `keys` parameter is updated or removed from the cache, the change monitor created by this method triggers an event. If a cache implementation supports named cache regions, a string value can be specified as the `regionName` parameter. Otherwise, the parameter defaults to `null`. @@ -478,9 +478,9 @@ Note: is not a singleton, bu class. In that case, the method overload will not necessarily return all the information about cached data. However, the method overload enables custom caches to return more than just the cache value. + This method overload exists because some cache implementations might extend the class. In that case, the method overload will not necessarily return all the information about cached data. However, the method overload enables custom caches to return more than just the cache value. - The method is like the method, except that the method returns return the cache entry as a instance. + The method is like the method, except that the method returns return the cache entry as a instance. ]]> @@ -543,7 +543,7 @@ Note: is not a singleton, bu > [!NOTE] > Returning an enumerator is typically a more expensive operation than returning the entire cache entry. - This method is called by the explicit interface implementations that the class has for the and methods. + This method is called by the explicit interface implementations that the class has for the and methods. ]]> @@ -586,7 +586,7 @@ Note: is not a singleton, bu method overload is a performance optimization for distributed caches that support fetching multiple cache entries from the cache during a single network call. + The method overload is a performance optimization for distributed caches that support fetching multiple cache entries from the cache during a single network call. Although a caller can pass one or more keys to the method, there is no guarantee that all keys represent entries in the cache. Therefore, the returned dictionary might contain fewer items than the number of keys that were passed to the method. @@ -636,9 +636,9 @@ Note: is not a singleton, bu method overload is like the method overload, but lets you pass the named region by using optional parameter syntax that is supported by managed languages such as C#. + The method overload is like the method overload, but lets you pass the named region by using optional parameter syntax that is supported by managed languages such as C#. - This method is a virtual method because the class provides a default implementation that passes the `params` array to the method overload. + This method is a virtual method because the class provides a default implementation that passes the `params` array to the method overload. ]]> @@ -755,9 +755,9 @@ Note: is not a singleton, bu method. Internally, a cache implementation could set the absolute expiration of the specified value to the method. However this behavior is ultimately up to the cache implementation. + The behavior of the set accessor of this property is like the method. Internally, a cache implementation could set the absolute expiration of the specified value to the method. However this behavior is ultimately up to the cache implementation. - The behavior of get accessor is like calling the method and using `null` for the region name. + The behavior of get accessor is like calling the method and using `null` for the region name. ]]> @@ -870,7 +870,7 @@ Note: is not a singleton, bu overload methods is an insert-or-update operation. A cache entry is either inserted as a new entry if the specified entry does not exist, or the cache entry is updated with a new value if it already exists. + The typical behavior of the overload methods is an insert-or-update operation. A cache entry is either inserted as a new entry if the specified entry does not exist, or the cache entry is updated with a new value if it already exists. ]]> @@ -1049,7 +1049,7 @@ Note: is not a singleton, bu Developers can use this method to iterate through a generic collection of cache entries. - This is the default implementation that internally calls the method. + This is the default implementation that internally calls the method. ]]> diff --git a/xml/System.Runtime.Caching/SqlChangeMonitor.xml b/xml/System.Runtime.Caching/SqlChangeMonitor.xml index 608b168c430..e03f4d83af9 100644 --- a/xml/System.Runtime.Caching/SqlChangeMonitor.xml +++ b/xml/System.Runtime.Caching/SqlChangeMonitor.xml @@ -16,11 +16,11 @@ Provides change monitoring for SQL Server databases. This class cannot be inherited. - class wraps the ADO.NET class and adds change monitoring for SQL Server-based dependencies. Therefore, the class serves as a bridge between the ADO.NET object and the namespace. - + class wraps the ADO.NET class and adds change monitoring for SQL Server-based dependencies. Therefore, the class serves as a bridge between the ADO.NET object and the namespace. + ]]> @@ -44,13 +44,13 @@ An object that represents an ADO.NET object. Initializes a new instance of the class. - method binds the event of the object in `dependency` to the method handler. This enables the change monitor to receive notification of changes in SQL Server databases. - - When you invoke the constructor, you must pass a object as a parameter. When you create a object, you must pass a parameter to the constructor. The constructor for class lets you specify optional information for configuring the instance. - + method binds the event of the object in `dependency` to the method handler. This enables the change monitor to receive notification of changes in SQL Server databases. + + When you invoke the constructor, you must pass a object as a parameter. When you create a object, you must pass a parameter to the constructor. The constructor for class lets you specify optional information for configuring the instance. + ]]> @@ -106,11 +106,11 @@ Gets an identifier for a instance. An identifier for the change monitor. - class generates a GUID for this property. - + class generates a GUID for this property. + ]]> diff --git a/xml/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml b/xml/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml index 0788717d5bb..5b794b05284 100644 --- a/xml/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml +++ b/xml/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml @@ -74,7 +74,7 @@ ## Examples As the following example shows, you can determine whether a method is marked with [Async](/dotnet/visual-basic/language-reference/modifiers/async) or [async](/dotnet/csharp/language-reference/keywords/async) modifier. In the example, `IsAsyncMethod` performs the following steps: -- Obtains a object for the method name by using . +- Obtains a object for the method name by using . - Obtains a object for the attribute by using [GetType Operator](/dotnet/visual-basic/language-reference/operators/gettype-operator) or [typeof](/dotnet/csharp/language-reference/keywords/typeof). diff --git a/xml/System.Runtime.CompilerServices/CallConvCdecl.xml b/xml/System.Runtime.CompilerServices/CallConvCdecl.xml index 3154c78e1ae..93c71bb3944 100644 --- a/xml/System.Runtime.CompilerServices/CallConvCdecl.xml +++ b/xml/System.Runtime.CompilerServices/CallConvCdecl.xml @@ -77,7 +77,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/CallConvFastcall.xml b/xml/System.Runtime.CompilerServices/CallConvFastcall.xml index 7f966527e74..397083a232e 100644 --- a/xml/System.Runtime.CompilerServices/CallConvFastcall.xml +++ b/xml/System.Runtime.CompilerServices/CallConvFastcall.xml @@ -75,7 +75,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class like , , , and . +- Using methods in the class like , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/CallConvStdcall.xml b/xml/System.Runtime.CompilerServices/CallConvStdcall.xml index c41f5443b41..ef3f0d93291 100644 --- a/xml/System.Runtime.CompilerServices/CallConvStdcall.xml +++ b/xml/System.Runtime.CompilerServices/CallConvStdcall.xml @@ -75,7 +75,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/CallConvThiscall.xml b/xml/System.Runtime.CompilerServices/CallConvThiscall.xml index 45f03c276b8..e0dd490b0fc 100644 --- a/xml/System.Runtime.CompilerServices/CallConvThiscall.xml +++ b/xml/System.Runtime.CompilerServices/CallConvThiscall.xml @@ -75,7 +75,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2+CreateValueCallback.xml b/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2+CreateValueCallback.xml index 3d53d04d2b7..3e08c135ff4 100644 --- a/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2+CreateValueCallback.xml +++ b/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2+CreateValueCallback.xml @@ -71,21 +71,21 @@ Represents a method that creates a non-default value to add as part of a key/value pair to a object. An instance of a reference type that represents the value to attach to the specified key. - delegate encapsulates a callback method that is invoked by the method when the key passed to the method is not found in the object. The method passes the callback method the key that represents a managed object to which a property value is to be dynamically attached. The method is responsible for returning the property value to its caller, which, in turn, adds the key/value pair to the table. - - The method is used to return an instance of a reference type that can be attached to the specified key. It enables that instance to be initialized using non-default values. If the key is not found in the table, the method adds a key/value pair in which the value is initialized using default values. - - - -## Examples - The following example defines a `MainClass` class and a `MainInfo` class. `MainInfo` provides information about the `MainClass` instance. It also defines a static (`Shared` in Visual Basic) `CreateAttachedValue` method that can be assigned to the delegate and passed to the method. The example calls the method to add a `MainClass` object and its corresponding `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and a call to the method to retrieve the value that belongs to an existing key. - + delegate encapsulates a callback method that is invoked by the method when the key passed to the method is not found in the object. The method passes the callback method the key that represents a managed object to which a property value is to be dynamically attached. The method is responsible for returning the property value to its caller, which, in turn, adds the key/value pair to the table. + + The method is used to return an instance of a reference type that can be attached to the specified key. It enables that instance to be initialized using non-default values. If the key is not found in the table, the method adds a key/value pair in which the value is initialized using default values. + + + +## Examples + The following example defines a `MainClass` class and a `MainInfo` class. `MainInfo` provides information about the `MainClass` instance. It also defines a static (`Shared` in Visual Basic) `CreateAttachedValue` method that can be assigned to the delegate and passed to the method. The example calls the method to add a `MainClass` object and its corresponding `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and a call to the method to retrieve the value that belongs to an existing key. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml b/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml index c6d4e30ecfa..389c82ce934 100644 --- a/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml +++ b/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml @@ -110,27 +110,27 @@ class enables language compilers to attach arbitrary properties to managed objects at run time. A object is a dictionary that binds a managed object, which is represented by a key, to its attached property, which is represented by a value. The object's keys are the individual instances of the `TKey` class to which the property is attached, and its values are the property values that are assigned to the corresponding objects. + The class enables language compilers to attach arbitrary properties to managed objects at run time. A object is a dictionary that binds a managed object, which is represented by a key, to its attached property, which is represented by a value. The object's keys are the individual instances of the `TKey` class to which the property is attached, and its values are the property values that are assigned to the corresponding objects. - Keys must be unique; in other words, the class supports one attached value per managed object. Two keys are equal if passing them to the method returns `true`. + Keys must be unique; in other words, the class supports one attached value per managed object. Two keys are equal if passing them to the method returns `true`. > [!NOTE] -> You cannot control equality comparisons by overriding to explicitly set the hash code for a key. The class does not use the method to compute hash codes, and therefore does not invoke overrides. +> You cannot control equality comparisons by overriding to explicitly set the hash code for a key. The class does not use the method to compute hash codes, and therefore does not invoke overrides. - Although the class holds a collection of key/value pairs, it is best thought of as a table rather than a dictionary object. The class differs from a dictionary in several ways: + Although the class holds a collection of key/value pairs, it is best thought of as a table rather than a dictionary object. The class differs from a dictionary in several ways: - It does not persist keys. That is, a key is not kept alive only because it is a member of the collection. - It does not include all the methods (such as `GetEnumerator` or `Contains`) that a dictionary typically has. -- It does not implement the interface. +- It does not implement the interface. - The class differs from other collection objects in its management of the object lifetime of keys stored in the collection. Ordinarily, when an object is stored in a collection, its lifetime lasts until it is removed (and there are no additional references to the object) or until the collection object itself is destroyed. However, in the class, adding a key/value pair to the table does not ensure that the key will persist, even if it can be reached directly from a value stored in the table (for example, if the table contains one key, A, with a value V1, and a second key, B, with a value P2 that contains a reference to A). Instead, automatically removes the key/value entry as soon as no other references to a key exist outside the table. The example provides an illustration. + The class differs from other collection objects in its management of the object lifetime of keys stored in the collection. Ordinarily, when an object is stored in a collection, its lifetime lasts until it is removed (and there are no additional references to the object) or until the collection object itself is destroyed. However, in the class, adding a key/value pair to the table does not ensure that the key will persist, even if it can be reached directly from a value stored in the table (for example, if the table contains one key, A, with a value V1, and a second key, B, with a value P2 that contains a reference to A). Instead, automatically removes the key/value entry as soon as no other references to a key exist outside the table. The example provides an illustration. ## Examples - The following example illustrates that a key stored in the table does not persist after references to it outside the table are destroyed. The example defines two classes: `ManagedClass`, which represents the key in the table, and `ClassData`, which represents the key's value. The example instantiates three objects of each type. It also instantiates a object that represents the second `ManagedClass`, and then destroys the second `ManagedClass` instance. The attempt to retrieve the second `ManagedClass` object from the property indicates that no references to the object remain. + The following example illustrates that a key stored in the table does not persist after references to it outside the table are destroyed. The example defines two classes: `ManagedClass`, which represents the key in the table, and `ClassData`, which represents the key's value. The example instantiates three objects of each type. It also instantiates a object that represents the second `ManagedClass`, and then destroys the second `ManagedClass` instance. The attempt to retrieve the second `ManagedClass` object from the property indicates that no references to the object remain. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue/Overview/example1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue/Overview/example1.vb" id="Snippet1"::: @@ -188,9 +188,9 @@ constructor instantiates an empty table; that is, the table contains no key/value pairs. You can add key/value pairs by calling the , , or method. + The constructor instantiates an empty table; that is, the table contains no key/value pairs. You can add key/value pairs by calling the , , or method. - Every key in a object must be unique. Keys are not unique if they refer to the same object (that is, if passing them as arguments to the method returns `true`). + Every key in a object must be unique. Keys are not unique if they refer to the same object (that is, if passing them as arguments to the method returns `true`). ]]> @@ -253,14 +253,14 @@ object must be unique. Keys are not unique if they refer to the same object (that is, if passing them as arguments to the method returns `true`). + Every key in a object must be unique. Keys are not unique if they refer to the same object (that is, if passing them as arguments to the method returns `true`). If the key is garbage-collected during the addition operation, the existing key/value pair is removed and the new key/value pair is added without an exception being thrown. ## Examples - The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example then calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. + The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example then calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: @@ -403,7 +403,7 @@ when the current object is ready to be finalized. + The garbage collector calls when the current object is ready to be finalized. ]]> @@ -611,14 +611,14 @@ ## Remarks If `key` does not exist in the table, the method adds it, along with the object that is instantiated by calling the parameterless constructor of the class defined by the `TValue` generic type parameter. If the `TValue` class has no parameterless constructor, a is thrown. - This is the recommended method of retrieving an existing value or adding a new value to the table if the class of the table's value defines a parameterless constructor. If it does not define a parameterless constructor, you can instead call the method, which relies on a callback-provided method to instantiate the object representing the table's value + This is the recommended method of retrieving an existing value or adding a new value to the table if the class of the table's value defines a parameterless constructor. If it does not define a parameterless constructor, you can instead call the method, which relies on a callback-provided method to instantiate the object representing the table's value - To retrieve the value of an existing key without adding the key/value pair if the key is not found in the table, call the method. + To retrieve the value of an existing key without adding the key/value pair if the key is not found in the table, call the method. ## Examples - The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. + The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: @@ -696,16 +696,16 @@ Note: In the .NET for invokes the method that is defined by the `createValueCallback` parameter and passes it the key. A new value is bound to the key in the table and returned as a result. + If `key` does not exist in the table, invokes the method that is defined by the `createValueCallback` parameter and passes it the key. A new value is bound to the key in the table and returned as a result. - Use this method only when the class that represents the table's value does not define a parameterless constructor. If it does define a parameterless constructor, use the method instead. To retrieve the value of an existing key without adding the key/value pair if the key is not found in the table, call the method. + Use this method only when the class that represents the table's value does not define a parameterless constructor. If it does define a parameterless constructor, use the method instead. To retrieve the value of an existing key without adding the key/value pair if the key is not found in the table, call the method. If multiple threads try to create the same key, `createValueCallback` may be invoked multiple times with the same key. Only one of these calls will succeed, and its returned value will be added to the table. Which thread succeeds in creating the value is indeterminate. This rule permits the table to invoke `createValueCallback` outside the internal table lock to prevent deadlocks. ## Examples - The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. It also defines a static (`Shared` in Visual Basic) `CreateAttachedValue` method that can be assigned to the delegate and passed to the method. The example calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. + The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. It also defines a static (`Shared` in Visual Basic) `CreateAttachedValue` method that can be assigned to the delegate and passed to the method. The example calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: @@ -930,7 +930,7 @@ retrieved. Additionally, it may not return all entries that were present when th ## Remarks -This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. +This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The returned enumerator does not extend the lifetime of any object pairs in the table, other than the current one. It does not return entries that have already been collected or that were added after the enumerator was retrieved. Additionally, it may not return all entries that were present when the enumerator was retrieved, for example, entries that were collected or removed after the enumerator was retrieved but before they were enumerated. @@ -1053,7 +1053,7 @@ retrieved. Additionally, it may not return all entries that were present when th ## Examples - The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example calls the , , and methods to add key/value pairs to a table. In each case, the example calls the method to confirm that the key/value pair has been added to the table. + The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example calls the , , and methods to add key/value pairs to a table. In each case, the example calls the method to confirm that the key/value pair has been added to the table. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.CompilerServices/ContractHelper.xml b/xml/System.Runtime.CompilerServices/ContractHelper.xml index 85a9776949d..dd75a39b25d 100644 --- a/xml/System.Runtime.CompilerServices/ContractHelper.xml +++ b/xml/System.Runtime.CompilerServices/ContractHelper.xml @@ -112,11 +112,11 @@ Used by the binary rewriter to activate the default failure behavior. A null reference ( in Visual Basic) if the event was handled and should not trigger a failure; otherwise, returns the localized failure message. - method does not perform the failure behavior (an assert or throw) itself. If the failure is handled by the listeners, the method returns `null`. If the failure is not handled by the listeners, a localized failure message is returned. - + method does not perform the failure behavior (an assert or throw) itself. If the failure is handled by the listeners, the method returns `null`. If the failure is not handled by the listeners, a localized failure message is returned. + ]]> @@ -183,11 +183,11 @@ The inner exception that caused the current exception. Triggers the default failure behavior. - , which causes the **Assert** dialog box to be displayed. You can change that behavior to throw an exception instead of displaying the dialog box. - + , which causes the **Assert** dialog box to be displayed. You can change that behavior to throw an exception instead of displaying the dialog box. + ]]> diff --git a/xml/System.Runtime.CompilerServices/DisablePrivateReflectionAttribute.xml b/xml/System.Runtime.CompilerServices/DisablePrivateReflectionAttribute.xml index 38317ee672b..c9a30e74207 100644 --- a/xml/System.Runtime.CompilerServices/DisablePrivateReflectionAttribute.xml +++ b/xml/System.Runtime.CompilerServices/DisablePrivateReflectionAttribute.xml @@ -56,15 +56,15 @@ Indicates that any private members contained in an assembly's types are not available to reflection. - [!NOTE] > The .NET Framework, .NET Core, and .NET runtimes do not consistently enforce this attribute. Developers should not rely on this attribute to restrict access to an assembly's non-public members. - Ordinarily, reflection methods, such a or , can be used to get information about private members at runtime. When applies to an assembly, the attribute makes information about private members in that assembly's types unavailable to runtime reflection. - + Ordinarily, reflection methods, such a or , can be used to get information about private members at runtime. When applies to an assembly, the attribute makes information about private members in that assembly's types unavailable to runtime reflection. + ]]> diff --git a/xml/System.Runtime.CompilerServices/InlineArrayAttribute.xml b/xml/System.Runtime.CompilerServices/InlineArrayAttribute.xml index 067ec97c8a7..34b9b8fe1e4 100644 --- a/xml/System.Runtime.CompilerServices/InlineArrayAttribute.xml +++ b/xml/System.Runtime.CompilerServices/InlineArrayAttribute.xml @@ -36,7 +36,7 @@ This attribute can be used to annotate a `struct` type with a single field. The runtime replicates that field in the actual type layout as many times as is specified. > [!IMPORTANT] -> In .NET 9 and later versions, the default implementations of `Equals()` and `GetHashCode()` for types marked with this attribute throw . You must override both and if they will be used. +> In .NET 9 and later versions, the default implementations of `Equals()` and `GetHashCode()` for types marked with this attribute throw . You must override both and if they will be used. ]]> diff --git a/xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml b/xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml index 5b9f5e016a1..a732a507a6a 100644 --- a/xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml +++ b/xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml @@ -135,7 +135,7 @@ The following example provides the source code for the `Friend2` assembly. Note constructor defines a friend assembly, which is an assembly that has access to the internal and private protected types and members of the current assembly. + The constructor defines a friend assembly, which is an assembly that has access to the internal and private protected types and members of the current assembly. Both the current assembly and the friend assembly must be unsigned, or both must be signed with a strong name. (For more information about strong-named assemblies, see [Create and use strong-named assemblies](/dotnet/standard/assembly/create-use-strong-named).) If both are unsigned, the `assemblyName` argument consists of the name of the friend assembly, specified without a directory path or file extension. If both are signed, `assemblyName` consists of the name of the friend assembly without its directory path or file name extension, along with its full public key (but not its public key token). The other components of a strong name, such as those that provide culture, version, or processor architecture information, cannot be specified in the `assemblyName` argument. diff --git a/xml/System.Runtime.CompilerServices/IsBoxed.xml b/xml/System.Runtime.CompilerServices/IsBoxed.xml index fe85e41a92a..a7305580ee3 100644 --- a/xml/System.Runtime.CompilerServices/IsBoxed.xml +++ b/xml/System.Runtime.CompilerServices/IsBoxed.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsByValue.xml b/xml/System.Runtime.CompilerServices/IsByValue.xml index b5da56090e7..cb495d26aa2 100644 --- a/xml/System.Runtime.CompilerServices/IsByValue.xml +++ b/xml/System.Runtime.CompilerServices/IsByValue.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsConst.xml b/xml/System.Runtime.CompilerServices/IsConst.xml index 0297a6f3bc7..001b7180d3a 100644 --- a/xml/System.Runtime.CompilerServices/IsConst.xml +++ b/xml/System.Runtime.CompilerServices/IsConst.xml @@ -57,7 +57,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsCopyConstructed.xml b/xml/System.Runtime.CompilerServices/IsCopyConstructed.xml index 0505bddfcb9..b82d5b48556 100644 --- a/xml/System.Runtime.CompilerServices/IsCopyConstructed.xml +++ b/xml/System.Runtime.CompilerServices/IsCopyConstructed.xml @@ -63,7 +63,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsExplicitlyDereferenced.xml b/xml/System.Runtime.CompilerServices/IsExplicitlyDereferenced.xml index 07b6e39e873..2962276c293 100644 --- a/xml/System.Runtime.CompilerServices/IsExplicitlyDereferenced.xml +++ b/xml/System.Runtime.CompilerServices/IsExplicitlyDereferenced.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsImplicitlyDereferenced.xml b/xml/System.Runtime.CompilerServices/IsImplicitlyDereferenced.xml index ec5c230713c..836a1f8c297 100644 --- a/xml/System.Runtime.CompilerServices/IsImplicitlyDereferenced.xml +++ b/xml/System.Runtime.CompilerServices/IsImplicitlyDereferenced.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsJitIntrinsic.xml b/xml/System.Runtime.CompilerServices/IsJitIntrinsic.xml index 184918b0b0d..5d0f6bc1453 100644 --- a/xml/System.Runtime.CompilerServices/IsJitIntrinsic.xml +++ b/xml/System.Runtime.CompilerServices/IsJitIntrinsic.xml @@ -53,7 +53,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsLong.xml b/xml/System.Runtime.CompilerServices/IsLong.xml index a3d978463e7..2bfba86ff6f 100644 --- a/xml/System.Runtime.CompilerServices/IsLong.xml +++ b/xml/System.Runtime.CompilerServices/IsLong.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsPinned.xml b/xml/System.Runtime.CompilerServices/IsPinned.xml index 8333332c492..8b9654524fd 100644 --- a/xml/System.Runtime.CompilerServices/IsPinned.xml +++ b/xml/System.Runtime.CompilerServices/IsPinned.xml @@ -52,7 +52,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsSignUnspecifiedByte.xml b/xml/System.Runtime.CompilerServices/IsSignUnspecifiedByte.xml index 5b1e510ab79..54257e9a41b 100644 --- a/xml/System.Runtime.CompilerServices/IsSignUnspecifiedByte.xml +++ b/xml/System.Runtime.CompilerServices/IsSignUnspecifiedByte.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsUdtReturn.xml b/xml/System.Runtime.CompilerServices/IsUdtReturn.xml index c05d9480093..e201b9bb9fc 100644 --- a/xml/System.Runtime.CompilerServices/IsUdtReturn.xml +++ b/xml/System.Runtime.CompilerServices/IsUdtReturn.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsVolatile.xml b/xml/System.Runtime.CompilerServices/IsVolatile.xml index 5d23aa437c7..50b35d5cadf 100644 --- a/xml/System.Runtime.CompilerServices/IsVolatile.xml +++ b/xml/System.Runtime.CompilerServices/IsVolatile.xml @@ -72,7 +72,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml b/xml/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml index 595726c6d4f..d64ca510cdb 100644 --- a/xml/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml +++ b/xml/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml @@ -77,7 +77,7 @@ ## Examples The following example shows how to determine whether a method is an iterator method. In the example, `IsIteratorMethod` performs the following steps: -- Obtains a object for the method name by using . +- Obtains a object for the method name by using . - Obtains a object for the attribute by using [GetType Operator](/dotnet/visual-basic/language-reference/operators/gettype-operator). diff --git a/xml/System.Runtime.CompilerServices/MethodImplAttribute.xml b/xml/System.Runtime.CompilerServices/MethodImplAttribute.xml index e9f30bd3254..0390ecf2f92 100644 --- a/xml/System.Runtime.CompilerServices/MethodImplAttribute.xml +++ b/xml/System.Runtime.CompilerServices/MethodImplAttribute.xml @@ -71,7 +71,7 @@ ## Remarks You can apply this attribute to methods or constructors. - This attribute lets you customize the configuration of the method or constructor to which it applies by supplying a value to its class constructor. The members of the enumeration correspond to bit fields in the `CorMethodImpl` metadata table. This means that information on the attribute cannot be retrieved at run time by calling the method; instead, it is retrieved by calling either the `MethodInfo.GetMethodImplementationFlags` or the `ConstructorInfo.GetMethodImplementationFlags` method. + This attribute lets you customize the configuration of the method or constructor to which it applies by supplying a value to its class constructor. The members of the enumeration correspond to bit fields in the `CorMethodImpl` metadata table. This means that information on the attribute cannot be retrieved at run time by calling the method; instead, it is retrieved by calling either the `MethodInfo.GetMethodImplementationFlags` or the `ConstructorInfo.GetMethodImplementationFlags` method. @@ -81,7 +81,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/MethodImplAttribute/Overview/methodimplattribute1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/MethodImplAttribute/Overview/methodimplattribute1.vb" id="Snippet1"::: - The following example then calls the `MethodInfo.GetMethodImplementationFlags` method to determine which flags are set for the `GetCalendarName` method. It also demonstrates that this information is not retrieved by the method. + The following example then calls the `MethodInfo.GetMethodImplementationFlags` method to determine which flags are set for the `GetCalendarName` method. It also demonstrates that this information is not retrieved by the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/MethodImplAttribute/Overview/getmethodimplattribute1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/MethodImplAttribute/Overview/getmethodimplattribute1.vb" id="Snippet2"::: diff --git a/xml/System.Runtime.CompilerServices/RuntimeHelpers+CleanupCode.xml b/xml/System.Runtime.CompilerServices/RuntimeHelpers+CleanupCode.xml index 497ca8bc3a1..648a4173ed2 100644 --- a/xml/System.Runtime.CompilerServices/RuntimeHelpers+CleanupCode.xml +++ b/xml/System.Runtime.CompilerServices/RuntimeHelpers+CleanupCode.xml @@ -61,11 +61,11 @@ to express that an exception was thrown; otherwise, . Represents a method to run when an exception occurs. - delegate with the method. - + delegate with the method. + ]]> diff --git a/xml/System.Runtime.CompilerServices/RuntimeHelpers+TryCode.xml b/xml/System.Runtime.CompilerServices/RuntimeHelpers+TryCode.xml index 2247d71e8a8..7c32758d818 100644 --- a/xml/System.Runtime.CompilerServices/RuntimeHelpers+TryCode.xml +++ b/xml/System.Runtime.CompilerServices/RuntimeHelpers+TryCode.xml @@ -58,11 +58,11 @@ Data to pass to the delegate. Represents a delegate to code that should be run in a try block. - delegate with the method. - + delegate with the method. + ]]> diff --git a/xml/System.Runtime.CompilerServices/RuntimeHelpers.xml b/xml/System.Runtime.CompilerServices/RuntimeHelpers.xml index 75ab9258373..7b36f25293b 100644 --- a/xml/System.Runtime.CompilerServices/RuntimeHelpers.xml +++ b/xml/System.Runtime.CompilerServices/RuntimeHelpers.xml @@ -68,7 +68,7 @@ method. To reliably set a handle to a specified pre-existing handle, you must ensure that the allocation of the native handle and the subsequent recording of that handle within a object is atomic. Any failure between these operations (such as a thread abort or out-of-memory exception) will result in the native handle being leaked. You can use the method to make sure that the handle is not leaked. + The following example shows how to reliably set handles by using the method. To reliably set a handle to a specified pre-existing handle, you must ensure that the allocation of the native handle and the subsequent recording of that handle within a object is atomic. Any failure between these operations (such as a thread abort or out-of-memory exception) will result in the native handle being leaked. You can use the method to make sure that the handle is not leaked. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/Overview/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/Overview/sample.vb" id="Snippet1"::: @@ -301,14 +301,14 @@ This method is intended for compiler use rather than use directly in code. `T` m provides information about an artificially limited stack that preserves enough space for an exception to be raised and recovery action to be taken. The artificial stack limit is chosen by the common language runtime to ensure that enough space remains to throw an exception safely. + provides information about an artificially limited stack that preserves enough space for an exception to be raised and recovery action to be taken. The artificial stack limit is chosen by the common language runtime to ensure that enough space remains to throw an exception safely. This method is useful in situations where stack overflow might occur as a result of unbounded recursion. It is intended for use in compiler services scenarios, although it can also be used safely in other development scenarios. If the stack space is sufficient, the exception is not thrown, and most .NET types and members can still be called. > [!NOTE] -> This method is not part of the constrained execution region (CER) support, and should not be confused with the method. +> This method is not part of the constrained execution region (CER) support, and should not be confused with the method. ]]> @@ -377,7 +377,7 @@ This method is intended for compiler use rather than use directly in code. `T` m ## Examples - The following example demonstrates how to compare two objects by using the method. + The following example demonstrates how to compare two objects by using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/Equals/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/Equals/example.vb" id="Snippet1"::: @@ -586,14 +586,14 @@ This method is intended for compiler use rather than use directly in code. `T` m - If the value being assigned is an immutable value class, the method returns the object itself, instead of a copy of the class. - Compilers of dynamically typed languages can use this method to make sure that boxed value types work identically to unboxed value types. That is, boxed value types get cloned when you pass them around, and they are always passed by value. The compiler can call to assign a value type to an object or to pass a value type as a parameter of a type object. + Compilers of dynamically typed languages can use this method to make sure that boxed value types work identically to unboxed value types. That is, boxed value types get cloned when you pass them around, and they are always passed by value. The compiler can call to assign a value type to an object or to pass a value type as a parameter of a type object. This method is used by compilers. ## Examples - The following example demonstrates how to box a value class by using the method. + The following example demonstrates how to box a value class by using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/GetObjectValue/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/GetObjectValue/example.vb" id="Snippet1"::: @@ -942,16 +942,16 @@ This method is intended for compiler use rather than use directly in code. `T` m ## Remarks Compilers use this method to mark `catch`, `finally`, and `fault` blocks as constrained execution regions (CERs). Code that is marked as a constrained region must only call other code with strong reliability contracts. It should not allocate or make virtual calls to unprepared or unreliable methods unless it is prepared to handle failures. - Note that no intermediate language opcodes, except `NOP`, are allowed between a call to the method and the `try` block. For more information about CERs, see the classes in the namespace. + Note that no intermediate language opcodes, except `NOP`, are allowed between a call to the method and the `try` block. For more information about CERs, see the classes in the namespace. - CERs that are marked using the method do not work perfectly when a is generated from the `try` block. For more information, see the method. + CERs that are marked using the method do not work perfectly when a is generated from the `try` block. For more information, see the method. - The method calls the method. + The method calls the method. ## Examples - The following example shows how to reliably set handles by using the method. To reliably set a handle to a specified pre-existing handle, you must ensure that the allocation of the native handle and the subsequent recording of that handle within a object is atomic. Any failure between these operations (such as a thread abort or out-of-memory exception) will result in the native handle being leaked. You can use the method to make sure that the handle is not leaked. + The following example shows how to reliably set handles by using the method. To reliably set a handle to a specified pre-existing handle, you must ensure that the allocation of the native handle and the subsequent recording of that handle within a object is atomic. Any failure between these operations (such as a thread abort or out-of-memory exception) will result in the native handle being leaked. You can use the method to make sure that the handle is not leaked. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/Overview/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/Overview/sample.vb" id="Snippet1"::: @@ -1020,7 +1020,7 @@ This method is intended for compiler use rather than use directly in code. `T` m method. + Compilers should not call this method directly. Instead, define a CER by calling the method. ]]> @@ -1086,7 +1086,7 @@ This method is intended for compiler use rather than use directly in code. `T` m - Attribute the method by using the attribute. -- Call the method to dynamically prepare the delegate. +- Call the method to dynamically prepare the delegate. For more information, see the article [Keep Your Code Running with the Reliability Features of the .NET Framework](https://go.microsoft.com/fwlink/?LinkId=145491) in the MSDN Magazine. @@ -1212,7 +1212,7 @@ This method is intended for compiler use rather than use directly in code. `T` m method to handle virtual calls that are made inside a constrained execution region (CER). At JIT compilation time, the common language runtime does not usually have enough information about the target of a virtual call. Therefore, the runtime does not initially prepare that segment of the call graph. If the code that is using the CER has enough knowledge to determine the target at any point in time before the CER is actually entered, it can call to perform the same runtime preparation normally done for a CER rooted at the method specified as an argument. + Compilers use the method to handle virtual calls that are made inside a constrained execution region (CER). At JIT compilation time, the common language runtime does not usually have enough information about the target of a virtual call. Therefore, the runtime does not initially prepare that segment of the call graph. If the code that is using the CER has enough knowledge to determine the target at any point in time before the CER is actually entered, it can call to perform the same runtime preparation normally done for a CER rooted at the method specified as an argument. ]]> @@ -1272,9 +1272,9 @@ This method is intended for compiler use rather than use directly in code. `T` m method. The common language runtime cannot prepare constrained execution regions (CERs) rooted in a method that has generic type parameters (either a type parameter on the class containing the method or one on the method itself) when those type parameters are instantiated as reference types. + You can provide generics support for compilers by using the method. The common language runtime cannot prepare constrained execution regions (CERs) rooted in a method that has generic type parameters (either a type parameter on the class containing the method or one on the method itself) when those type parameters are instantiated as reference types. - You can use this overload to pass a specific instantiation (such as an array of types), specifying class type parameters first (if any), followed by method type parameters (if any). The runtime prepares that instantiation of the method. (This is necessary only if the instantiations you use contain at least one reference type parameter.) Thus, you can use a CER-style `try` clause in a generic method (or a nongeneric method on a generic class) and it will work reliably with instantiations of or other value types. To instantiate reference types such as , you must use an explicit method on the CER root method first. + You can use this overload to pass a specific instantiation (such as an array of types), specifying class type parameters first (if any), followed by method type parameters (if any). The runtime prepares that instantiation of the method. (This is necessary only if the instantiations you use contain at least one reference type parameter.) Thus, you can use a CER-style `try` clause in a generic method (or a nongeneric method on a generic class) and it will work reliably with instantiations of or other value types. To instantiate reference types such as , you must use an explicit method on the CER root method first. ]]> @@ -1340,7 +1340,7 @@ This method is intended for compiler use rather than use directly in code. `T` m This method is also used by compilers. - Instead of using the method, you should use a standard CER. That is, if you are planning to use a moderate amount of stack space, call the method immediately before your `try`/`finally` or `try`/`catch` block. If you are calling a recursive method or plan to use a lot of stack space, you must use the method. + Instead of using the method, you should use a standard CER. That is, if you are planning to use a moderate amount of stack space, call the method immediately before your `try`/`finally` or `try`/`catch` block. If you are calling a recursive method or plan to use a lot of stack space, you must use the method. ]]> diff --git a/xml/System.Runtime.CompilerServices/RuntimeWrappedException.xml b/xml/System.Runtime.CompilerServices/RuntimeWrappedException.xml index b0900b94e19..53939d306ae 100644 --- a/xml/System.Runtime.CompilerServices/RuntimeWrappedException.xml +++ b/xml/System.Runtime.CompilerServices/RuntimeWrappedException.xml @@ -168,7 +168,7 @@ method sets a object with all the exception object data targeted for serialization. During deserialization, the exception is reconstituted from the `SerializationInfo` transmitted over the stream. + The method sets a object with all the exception object data targeted for serialization. During deserialization, the exception is reconstituted from the `SerializationInfo` transmitted over the stream. ]]> diff --git a/xml/System.Runtime.CompilerServices/TupleElementNamesAttribute.xml b/xml/System.Runtime.CompilerServices/TupleElementNamesAttribute.xml index bd0e5c04b60..2cb6e43e81d 100644 --- a/xml/System.Runtime.CompilerServices/TupleElementNamesAttribute.xml +++ b/xml/System.Runtime.CompilerServices/TupleElementNamesAttribute.xml @@ -154,11 +154,11 @@ A string array that specifies, in a pre-order depth-first traversal of a type's construction, which value tuple occurrences are meant to carry element names. Initializes a new instance of the class. - `,` `)` might be intended to treat the first type argument as a tuple with element names and the second as a tuple without element names. In this case, the appropriate attribute specification should use a `transformNames` value of `{ "name1", "name2", null, null, null}`. - + `,` `)` might be intended to treat the first type argument as a tuple with element names and the second as a tuple without element names. In this case, the appropriate attribute specification should use a `transformNames` value of `{ "name1", "name2", null, null, null}`. + ]]> diff --git a/xml/System.Runtime.CompilerServices/Unsafe.xml b/xml/System.Runtime.CompilerServices/Unsafe.xml index 777af360b92..30dc9707265 100644 --- a/xml/System.Runtime.CompilerServices/Unsafe.xml +++ b/xml/System.Runtime.CompilerServices/Unsafe.xml @@ -62,7 +62,7 @@ This type is typically used by low-level library authors who want to write high- Consider the following example, which reverses the elements within a `Span`. > [!NOTE] -> These examples exist simply for demonstration purposes. In real-world applications, developers should instead use helper functions like , which are better optimized than even these examples. +> These examples exist simply for demonstration purposes. In real-world applications, developers should instead use helper functions like , which are better optimized than even these examples. ```csharp // A safe, verifiable way to reverse a Span. @@ -1033,7 +1033,7 @@ The caller is responsible for ensuring that the resulting managed pointer is pro This API is conceptually similar to C++'s `const_cast<>`. It is the caller's responsibility to ensure that no data is written to the referenced location. The runtime contains internal logic predicated on the assumption that readonly references truly are immutable, and callers who violate this invariant may trigger undefined behavior within the runtime. -`AsRef` is typically used for passing a readonly reference into methods like , which accept mutable managed pointers as arguments. Consider the following example. +`AsRef` is typically used for passing a readonly reference into methods like , which accept mutable managed pointers as arguments. Consider the following example. ```csharp int ComputeSumOfElements(ref int refToFirstElement, nint numElements) @@ -1458,7 +1458,7 @@ static void Copy(ref T destination, void* source) This API corresponds to the `cpblk` opcode. Both the `destination` and `source` pointers are assumed to be pointer-aligned. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.30 ("cpblk - copy data from memory to memory") for more information. > [!CAUTION] -> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. +> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. ]]> @@ -1518,7 +1518,7 @@ This API corresponds to the `cpblk` opcode. Both the `destination` and `source` This API corresponds to the `cpblk` opcode. Both the `destination` and `source` pointers are assumed to be pointer-aligned. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.30 ("cpblk - copy data from memory to memory") for more information. > [!CAUTION] -> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. +> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. ]]> @@ -1586,7 +1586,7 @@ This API corresponds to the `cpblk` opcode. Both the `destination` and `source` This API corresponds to the `unaligned.1 cpblk` opcode sequence. No alignment assumptions are made about the `destination` or `source` pointers. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.30 ("cpblk - copy data from memory to memory") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information. > [!CAUTION] -> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. +> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. ]]> @@ -1644,7 +1644,7 @@ This API corresponds to the `unaligned.1 cpblk` opcode sequence. No alignment as This API corresponds to the `unaligned.1 cpblk` opcode sequence. No alignment assumptions are made about the `destination` or `source` pointers. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.30 ("cpblk - copy data from memory to memory") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information. > [!CAUTION] -> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. +> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. ]]> @@ -1703,7 +1703,7 @@ This API corresponds to the `unaligned.1 cpblk` opcode sequence. No alignment as This API corresponds to the `initblk` opcode. The `startAddress` pointer is assumed to be pointer-aligned. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.36 ("initblk - initialize a block of memory to a value") for more information. > [!CAUTION] -> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. +> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. ]]> @@ -1763,7 +1763,7 @@ This API corresponds to the `initblk` opcode. The `startAddress` pointer is assu This API corresponds to the `initblk` opcode. The `startAddress` pointer is assumed to be pointer-aligned. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.36 ("initblk - initialize a block of memory to a value") for more information. > [!CAUTION] -> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. +> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. ]]> @@ -1822,7 +1822,7 @@ This API corresponds to the `initblk` opcode. The `startAddress` pointer is assu This API corresponds to the `unaligned.1 initblk` opcode sequence. No alignment assumption is made about the `startAddress` pointer. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.36 ("initblk - initialize a block of memory to a value") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information. > [!CAUTION] -> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. +> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. ]]> @@ -1880,7 +1880,7 @@ This API corresponds to the `unaligned.1 initblk` opcode sequence. No alignment This API corresponds to the `unaligned.1 initblk` opcode sequence. No alignment assumption is made about the `startAddress` pointer. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.36 ("initblk - initialize a block of memory to a value") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information. > [!CAUTION] -> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. +> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. ]]> @@ -2602,7 +2602,7 @@ The return value is guaranteed stable if `left` and `right` point to the same ma This API corresponds to the `sizeof` opcode. If `T` is a reference type, the return value is the size of the reference itself (equal to `sizeof(void*)`). See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.4.25 ("sizeof - load the size, in bytes, of a type") for more information. > [!CAUTION] -> This API returns the size of the _managed_ view of the type. For the size of the _unmanaged_ view of the type, such as needed for interop purposes, use . +> This API returns the size of the _managed_ view of the type. For the size of the _unmanaged_ view of the type, such as needed for interop purposes, use . ]]> diff --git a/xml/System.Runtime.ConstrainedExecution/Cer.xml b/xml/System.Runtime.ConstrainedExecution/Cer.xml index 4220a22222b..0273fd8e74d 100644 --- a/xml/System.Runtime.ConstrainedExecution/Cer.xml +++ b/xml/System.Runtime.ConstrainedExecution/Cer.xml @@ -55,31 +55,31 @@ Specifies a method's behavior when called within a constrained execution region. - enumeration specifies the behavior of a method, type, or assembly within a constrained execution region (CER). Use one of the three available values to indicate that the entity will succeed, has no knowledge of a CER, or might (deterministically) be able to report success or failure. - -A CER provides guarantees that the region of code will execute uninterrupted even if an asynchronous exception such as an aborted thread out-of-memory exception, or stack overflow is raised. - + +The enumeration specifies the behavior of a method, type, or assembly within a constrained execution region (CER). Use one of the three available values to indicate that the entity will succeed, has no knowledge of a CER, or might (deterministically) be able to report success or failure. + +A CER provides guarantees that the region of code will execute uninterrupted even if an asynchronous exception such as an aborted thread out-of-memory exception, or stack overflow is raised. + However, the `Cer.None` enumeration value indicates that the method, type, or assembly has no concept of a CER. It does not take advantage of CER guarantees. This implies the following: -- In the face of exceptional conditions the method might fail. - -- The method might or might not report that it failed (it is non-deterministic). - -- The method is not written with CERs in mind (which is the most likely scenario). - -If a method, type, or assembly is not explicitly marked to succeed, it is implicitly marked as `Cer.None`. +- In the face of exceptional conditions the method might fail. + +- The method might or might not report that it failed (it is non-deterministic). + +- The method is not written with CERs in mind (which is the most likely scenario). + +If a method, type, or assembly is not explicitly marked to succeed, it is implicitly marked as `Cer.None`. ## Examples -The following code example demonstrates the use of the enumeration when specifying a constrained execution region for a method. This code example is part of a larger example provided for the constructor. - +The following code example demonstrates the use of the enumeration when specifying a constrained execution region for a method. This code example is part of a larger example provided for the constructor. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.ConstrainedExecution/Cer/Overview/program.cs" id="Snippet3"::: -:::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet3"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet3"::: + ]]> diff --git a/xml/System.Runtime.ConstrainedExecution/Consistency.xml b/xml/System.Runtime.ConstrainedExecution/Consistency.xml index 76ec1e9e1a9..917f8b64895 100644 --- a/xml/System.Runtime.ConstrainedExecution/Consistency.xml +++ b/xml/System.Runtime.ConstrainedExecution/Consistency.xml @@ -55,19 +55,19 @@ Specifies a reliability contract. - enumeration is used as a parameter to the attribute to specify the reliability guarantee on a given method. - - - -## Examples - The following code example demonstrates the use of the enumeration when specifying a constrained execution region for a method. This code example is part of a larger example provided for the constructor. - + enumeration is used as a parameter to the attribute to specify the reliability guarantee on a given method. + + + +## Examples + The following code example demonstrates the use of the enumeration when specifying a constrained execution region for a method. This code example is part of a larger example provided for the constructor. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.ConstrainedExecution/Cer/Overview/program.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet3"::: + ]]> diff --git a/xml/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute.xml b/xml/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute.xml index ff08f89f062..fdcf2caba06 100644 --- a/xml/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute.xml +++ b/xml/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute.xml @@ -66,7 +66,7 @@ ## Examples The following code example demonstrates the use of the attribute to document the level of reliability of an assembly. - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute/ReliabilityContract.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute/Overview/FxCop.Reliability.ReliabilityContract.vb" id="Snippet1"::: @@ -122,7 +122,7 @@ constructor to create a constrained execution region and a `finally` block that is guaranteed to execute. + The following code example demonstrates the use of the constructor to create a constrained execution region and a `finally` block that is guaranteed to execute. :::code language="csharp" source="~/snippets/csharp/System.Runtime.ConstrainedExecution/Cer/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.DurableInstancing/InstanceStore.xml b/xml/System.Runtime.DurableInstancing/InstanceStore.xml index c93e5c59315..656dc459b70 100644 --- a/xml/System.Runtime.DurableInstancing/InstanceStore.xml +++ b/xml/System.Runtime.DurableInstancing/InstanceStore.xml @@ -16,16 +16,16 @@ Represents an instance store. - class. - - Persistence providers may call InstanceHandle.Free on handles passed to TryCommand, even after the command has finished executing. But persistence providers must not hold strong references to InstanceHandle or InstanceOwner objects, as this can prevent InstanceStore from being garbage collected. - + class. + + Persistence providers may call InstanceHandle.Free on handles passed to TryCommand, even after the command has finished executing. But persistence providers must not hold strong references to InstanceHandle or InstanceOwner objects, as this can prevent InstanceStore from being garbage collected. + > [!WARNING] -> Workflow definitions for persisted workflows cannot be changed. If a workflow definition is changed after it is persisted, the workflow runtime will crash when the workflow is reloaded. - +> Workflow definitions for persisted workflows cannot be changed. If a workflow definition is changed after it is persisted, the workflow runtime will crash when the workflow is reloaded. + ]]> @@ -78,11 +78,11 @@ Asynchronously executes persistence commands such as and . The state of the asynchronous operation. - method to execute a persistence command against an instance handle asynchronously. The host obtains the instance handle by invoking the method. The instance handle may be bound to entities that represent the context and subject of the command, such as an instance, instance owner, or instance lock. Only one command may be issued against an instance handle at a time. - + method to execute a persistence command against an instance handle asynchronously. The host obtains the instance handle by invoking the method. The instance handle may be bound to entities that represent the context and subject of the command, such as an instance, instance owner, or instance lock. Only one command may be issued against an instance handle at a time. + ]]> @@ -118,14 +118,14 @@ A persistence provider implements this method, which determines whether a particular persistence command can be executed. If the command can be executed, executes the command asynchronously. The state of the asynchronous operation. - [!WARNING] -> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. - +> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. + ]]> @@ -298,16 +298,16 @@ Gets or sets the default instance owner. The default instance owner. - [!WARNING] -> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. - +> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. + ]]> @@ -335,11 +335,11 @@ Ends the asynchronous operation. An InstanceView object representing the known state of the instance after the successful completion of the command. - @@ -367,13 +367,13 @@ Ends an asynchronous operation. A persistence provider implementation should return false if it doesn't support the command passed to the BeginTryCommand method. Otherwise it should return true or throw an exception. - [!WARNING] -> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. - +> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. + ]]> @@ -430,16 +430,16 @@ Executes a persistence command synchronously. Examples of persistence commands are: and . An InstanceView object representing the known state of the instance after the successful completion of the command. If Execute was called under a transaction, this state may include uncommitted data. Once the transaction is committed successfully, the data in the InstanceView object can be considered committed. - method to execute a persistence command against an instance handle, which the host obtains by invoking the method. The instance handle may be bound to entities that represent the context and subject of the command, such as an instance, instance owner, or instance lock. Only one command may be issued against an instance handle at a time. - + method to execute a persistence command against an instance handle, which the host obtains by invoking the method. The instance handle may be bound to entities that represent the context and subject of the command, such as an instance, instance owner, or instance lock. Only one command may be issued against an instance handle at a time. + > [!WARNING] -> If this method is executed with a , it will create an and bind it to the instance. This means that no other process will be able to access that workflow; if the process ends, the workflow cannot be recovered or executed. If such a workflow is executed again, a will be thrown. -> -> If is not used, the instance store will create a temporary that will be deleted at the end of the process. However, if the process ends before the workflow's final persistence point, this exception will be thrown, unless the period of time specified in the **HostLockRenewalPeriod** parameter has expired. - +> If this method is executed with a , it will create an and bind it to the instance. This means that no other process will be able to access that workflow; if the process ends, the workflow cannot be recovered or executed. If such a workflow is executed again, a will be thrown. +> +> If is not used, the instance store will create a temporary that will be deleted at the end of the process. However, if the process ends before the workflow's final persistence point, this exception will be thrown, unless the period of time specified in the **HostLockRenewalPeriod** parameter has expired. + ]]> @@ -489,11 +489,11 @@ Gets each InstanceOwner object that is bound to a valid instance handle or has not been garbage collected. The owner of the instance. - @@ -628,11 +628,11 @@ A persistence provider implements this method, which determines whether a particular persistence command can be executed and if the command can be executed executes it asynchronously. A persistence provider implementation should return if it doesn't support the command passed as a parameter; otherwise it should return or throw an exception. - to provide the results of the command. - + to provide the results of the command. + ]]> diff --git a/xml/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml b/xml/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml index 55364b22347..e96a71357b6 100644 --- a/xml/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml +++ b/xml/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml @@ -55,11 +55,11 @@ Represents an exception whose state is captured at a certain point in code. - object stores the stack trace information and Watson information that an exception contains at the point where it's captured. The exception can then be thrown at another time and possibly on another thread by calling the method. The exception is thrown as if it had flowed from the point where it was captured to the point where the method is called. +An object stores the stack trace information and Watson information that an exception contains at the point where it's captured. The exception can then be thrown at another time and possibly on another thread by calling the method. The exception is thrown as if it had flowed from the point where it was captured to the point where the method is called. For an example, see [Capture exceptions to rethrow later](/dotnet/standard/exceptions/best-practices-for-exceptions#capture-exceptions-to-rethrow-later). @@ -116,13 +116,13 @@ For an example, see [Capture exceptions to rethrow later](/dotnet/standard/excep Creates an object that represents the specified exception at the current point in code. An object that represents the specified exception at the current point in code. - object that's returned by this method at another time and possibly on another thread to rethrow the specified exception, as if the exception had flowed from the point where it was captured to the point where it's rethrown. - - If the exception is active when it's captured, the current stack trace information and Watson information that's contained in the exception is stored. If it's inactive, that is, if it has not been thrown, it doesn't have any stack trace or Watson information. - + object that's returned by this method at another time and possibly on another thread to rethrow the specified exception, as if the exception had flowed from the point where it was captured to the point where it's rethrown. + + If the exception is active when it's captured, the current stack trace information and Watson information that's contained in the exception is stored. If it's inactive, that is, if it has not been thrown, it doesn't have any stack trace or Watson information. + ]]> @@ -210,7 +210,7 @@ For an example, see [Capture exceptions to rethrow later](/dotnet/standard/excep ## Remarks This method populates the property from an arbitrary string value. The typical use case is the transmission of objects across processes with high fidelity, allowing preservation of the exception object's stack trace information. .NET does not attempt to parse the provided string value. - + The caller is responsible for canonicalizing line endings if required. can be used to canonicalize line endings. If the caller provides untrusted input to this API, this may result in the exception's stack trace containing embedded null characters, reserved HTML or JSON characters, or other unexpected values. Applications that display an exception's details to the user should always take care to encode the exception information at the point where it's displayed. @@ -263,11 +263,11 @@ If the caller provides untrusted input to this API, this may result in the excep Gets the exception that's represented by the current instance. The exception that's represented by the current instance. - object. It's not intended to be used by application code. Use the method to restore the state of the captured exception and throw it. - + object. It's not intended to be used by application code. Use the method to restore the state of the captured exception and throw it. + ]]> @@ -320,11 +320,11 @@ If the caller provides untrusted input to this API, this may result in the excep Throws the exception that's represented by the current object, after restoring the state that was saved when the exception was captured. - diff --git a/xml/System.Runtime.Hosting/ApplicationActivator.xml b/xml/System.Runtime.Hosting/ApplicationActivator.xml index d057f663783..47105bb2fc3 100644 --- a/xml/System.Runtime.Hosting/ApplicationActivator.xml +++ b/xml/System.Runtime.Hosting/ApplicationActivator.xml @@ -29,7 +29,7 @@ ## Remarks There is a single designated instance of the class in each to which all activation calls are routed. The for the current can provide its own custom for this purpose. If a custom is not provided, an instance of the default is created. - The following steps describe the behavior of the default method implementation: + The following steps describe the behavior of the default method implementation: 1. Checks if the of the add-in to be activated matches the of the current domain; if not, proceeds to step 2. Otherwise, executes the assembly and returns the result wrapped in an object handle. @@ -37,9 +37,9 @@ 1. Creates a new object using an object containing the activation context for the add-in. - 2. Calls the method to create a new domain using the object. + 2. Calls the method to create a new domain using the object. - 3. The method calls the method to acquire an object for the add-in. If the property returns `true`, the add-in is executed. If not, throws a indicating that execution permission could not be acquired. + 3. The method calls the method to acquire an object for the add-in. If the property returns `true`, the add-in is executed. If not, throws a indicating that execution permission could not be acquired. 4. If the add-in is trusted to run, then a new is created and configured for the of the add-in, and the add-in is loaded and executed. @@ -51,14 +51,14 @@ 1. The custom activator finds a domain that has the same as the add-in that is being activated. -2. If the has never been seen before in the process, the custom activator creates a new for this by calling the method directly, or delegating this activity to the in the base class. +2. If the has never been seen before in the process, the custom activator creates a new for this by calling the method directly, or delegating this activity to the in the base class. -3. If there is an existing domain with the same , then the activator can delegate the method call to the in the target domain. Note that this would be a cross-domain call to an that resides in the target . +3. If there is an existing domain with the same , then the activator can delegate the method call to the in the target domain. Note that this would be a cross-domain call to an that resides in the target . ## Examples - The following code example shows how to obtain an object from the current for a manifest-based application. + The following code example shows how to obtain an object from the current for a manifest-based application. :::code language="csharp" source="~/snippets/csharp/System.Runtime.Hosting/ActivationArguments/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Hosting/ActivationArguments/Overview/program.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.InteropServices.ComTypes/CONNECTDATA.xml b/xml/System.Runtime.InteropServices.ComTypes/CONNECTDATA.xml index eac2ce4d4b1..3d53087dab1 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/CONNECTDATA.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/CONNECTDATA.xml @@ -58,15 +58,15 @@ Describes a connection that exists to a given connection point. - method. - + method. + For more information, see [CONNECTDATA structure](/windows/win32/api/ocidl/ns-ocidl-connectdata). - - The common language runtime throws an exception when a COM method in native code returns an HRESULT. For more information, see [How to: Map HRESULTs and Exceptions](/dotnet/framework/interop/how-to-map-hresults-and-exceptions). - + + The common language runtime throws an exception when a COM method in native code returns an HRESULT. For more information, see [How to: Map HRESULTs and Exceptions](/dotnet/framework/interop/how-to-map-hresults-and-exceptions). + ]]> diff --git a/xml/System.Runtime.InteropServices.ComTypes/IAdviseSink.xml b/xml/System.Runtime.InteropServices.ComTypes/IAdviseSink.xml index 68b8285b303..ea6b084d522 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/IAdviseSink.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/IAdviseSink.xml @@ -63,15 +63,15 @@ Provides a managed definition of the interface. - @@ -120,13 +120,13 @@ Notifies all registered advisory sinks that the object has changed from the running state to the loaded state. This method is called by a server. - notification indicates that an object is making the transition from the running state to the loaded state, so its container can take appropriate measures to ensure orderly shutdown. For example, an object handler must release its pointer to the object. - + notification indicates that an object is making the transition from the running state to the loaded state, so its container can take appropriate measures to ensure orderly shutdown. For example, an object handler must release its pointer to the object. + For more information, see [IAdviseSink::OnClose method](/windows/win32/api/objidl/nf-objidl-iadvisesink-onclose). - + ]]> @@ -181,11 +181,11 @@ A , passed by reference, which defines the storage medium (global memory, disk file, storage object, stream object, Graphics Device Interface (GDI) object, or undefined) and ownership of that medium for the calling data object. Notifies all data objects currently registered advisory sinks that data in the object has changed. - @@ -237,11 +237,11 @@ A pointer to the interface on the new full moniker of the object. Notifies all registered advisory sinks that the object has been renamed. This method is called by a server. - @@ -290,11 +290,11 @@ Notifies all registered advisory sinks that the object has been saved. This method is called by a server. - @@ -348,11 +348,11 @@ The portion of the view that has changed. Currently, only -1 is valid. Notifies an object's registered advisory sinks that its view has changed. This method is called by a server. - diff --git a/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo.xml b/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo.xml index 4c43b09815f..b10c36172f3 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo.xml @@ -63,13 +63,13 @@ Provides the managed definition of the Component Automation ITypeInfo interface. - @@ -125,11 +125,11 @@ When this method returns, contains a reference to the member. This parameter is passed uninitialized. Retrieves the addresses of static functions or variables, such as those defined in a DLL. - @@ -194,11 +194,11 @@ When this method returns, contains a reference to the created object. This parameter is passed uninitialized. Creates a new instance of a type that describes a component class (coclass). - @@ -252,11 +252,11 @@ When this method returns, contains a reference to the index of the type description within the containing type library. This parameter is passed uninitialized. Retrieves the type library that contains this type description and its index within that type library. - @@ -316,11 +316,11 @@ If not , and the function is defined by an ordinal, then lpwOrdinal is set to point to the ordinal. Retrieves a description or specification of an entry point for a function in a DLL. - @@ -380,11 +380,11 @@ When this method returns, contains the fully qualified name of the Help file. This parameter is passed uninitialized. Retrieves the documentation string, the complete Help file name and path, and the context ID for the Help topic for a specified type description. - @@ -438,13 +438,13 @@ When this method returns, contains a reference to a structure that describes the specified function. This parameter is passed uninitialized. Retrieves the structure that contains information about a specified function. - method. - + method. + For more information, see [ITypeInfo::GetFuncDesc method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getfuncdesc). - + ]]> @@ -501,11 +501,11 @@ When this method returns, contains a reference to an array in which name mappings are placed. This parameter is passed uninitialized. Maps between member names and member IDs, and parameter names and parameter IDs. - @@ -559,11 +559,11 @@ When this method returns, contains a reference to the enumeration. This parameter is passed uninitialized. Retrieves the value for one implemented interface or base interface in a type description. - @@ -618,11 +618,11 @@ When this method returns, contains a reference to the string used in marshaling the fields of the structure described by the referenced type description, or returns if there is no information to return. This parameter is passed uninitialized. Retrieves marshaling information. - @@ -681,11 +681,11 @@ When this method returns, contains the number of names in the array. This parameter is passed uninitialized. Retrieves the variable with the specified member ID (or the name of the property or method and its parameters) that corresponds to the specified function ID. - @@ -739,11 +739,11 @@ When this method returns, contains the referenced type description. This parameter is passed uninitialized. Retrieves the referenced type descriptions if a type description references other type descriptions. - @@ -797,11 +797,11 @@ When this method returns, contains a reference to a handle for the implemented interface. This parameter is passed uninitialized. Retrieves the type description of the implemented interface types if a type description describes a COM class. - @@ -853,13 +853,13 @@ When this method returns, contains a reference to the structure that contains the attributes of this type description. This parameter is passed uninitialized. Retrieves a structure that contains the attributes of the type description. - method. - + method. + For more information, see [ITypeInfo::GetTypeAttr method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-gettypeattr). - + ]]> @@ -911,11 +911,11 @@ When this method returns, contains a reference to the interface of the containing type library. This parameter is passed uninitialized. Retrieves the interface for the type description, which enables a client compiler to bind to the type description's members. - @@ -969,13 +969,13 @@ When this method returns, contains a reference to the structure that describes the specified variable. This parameter is passed uninitialized. Retrieves a structure that describes the specified variable. - method. - + method. + For more information, see [ITypeInfo::GetVarDesc method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getvardesc). - + ]]> @@ -1039,22 +1039,22 @@ If returns , indicates the index within rgvarg of the argument with the incorrect type. If more than one argument returns an error, indicates only the first argument with an error. This parameter is passed uninitialized. Invokes a method, or accesses a property of an object, that implements the interface described by the type description. - method. - - Valid values for the `wFlags` parameter are: - -|Value|Description| -|-----------|-----------------| -|DISPATCH_METHOD|The member is accessed as a method. If there is ambiguity, both this flag and the `DISPATCH_PROPERTYGET` flag can be set.| -|DISPATCH_PROPERTYGET|The member is retrieved as a property or data member.| -|DISPATCH_PROPERTYPUT|The member is changed as a property or data member.| -|DISPATCH_PROPERTYPUTREF|The member is changed by using a reference assignment, rather than a value assignment. This value is valid only when the property accepts a reference to an object.| - + method. + + Valid values for the `wFlags` parameter are: + +|Value|Description| +|-----------|-----------------| +|DISPATCH_METHOD|The member is accessed as a method. If there is ambiguity, both this flag and the `DISPATCH_PROPERTYGET` flag can be set.| +|DISPATCH_PROPERTYGET|The member is retrieved as a property or data member.| +|DISPATCH_PROPERTYPUT|The member is changed as a property or data member.| +|DISPATCH_PROPERTYPUTREF|The member is changed by using a reference assignment, rather than a value assignment. This value is valid only when the property accepts a reference to an object.| + For more information, see [ITypeInfo::Invoke method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-invoke). - + ]]> @@ -1106,11 +1106,11 @@ A reference to the structure to release. Releases a structure previously returned by the method. - @@ -1162,11 +1162,11 @@ A reference to the structure to release. Releases a structure previously returned by the method. - @@ -1218,11 +1218,11 @@ A reference to the structure to release. Releases a structure previously returned by the method. - diff --git a/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo2.xml b/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo2.xml index 5f3ad7067a4..101eb243a05 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo2.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo2.xml @@ -902,7 +902,7 @@ method. + The values of the `ppFuncDesc` parameter can be accessed through the method. For more information, see [ITypeInfo::GetFuncDesc method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getfuncdesc). @@ -1506,7 +1506,7 @@ method. + The values of the `ppTypeAttr` parameter can be accessed through the method. For more information, see [ITypeInfo::GetTypeAttr method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-gettypeattr). @@ -1786,7 +1786,7 @@ method. + The values of the `ppVarDesc` parameter can be accessed through the method. For more information, see [ITypeInfo::GetVarDesc method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getvardesc). @@ -1910,7 +1910,7 @@ method. + The values of the `pDispParams` parameter can be accessed through the method. Valid values for `wFlags` are: diff --git a/xml/System.Runtime.InteropServices.ComTypes/ITypeLib.xml b/xml/System.Runtime.InteropServices.ComTypes/ITypeLib.xml index 3f16db57ccb..9371e0d95e8 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/ITypeLib.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/ITypeLib.xml @@ -63,13 +63,13 @@ Provides the managed definition of the interface. - @@ -127,20 +127,20 @@ A hash value to speed up the search, computed by the function. If is 0, a value is computed. When this method returns, contains an array of pointers to the type descriptions that contain the name specified in . This parameter is passed uninitialized. An array of the 's of the found items; [i] is the that indexes into the type description specified by [i]. Cannot be . - On entry, indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. - + On entry, indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. + On exit, indicates the number of instances that were found. If the and values of are identical, there might be more type descriptions that contain the name. Finds occurrences of a type description in a type library. - method passes "abc" as the `szNameBuf` parameter, `szNameBuf` becomes "aBc" when the method returns. - + method passes "abc" as the `szNameBuf` parameter, `szNameBuf` becomes "aBc" when the method returns. + For more information, see [ITypeLib::FindName method](/windows/win32/api/oaidl/nf-oaidl-itypelib-findname). - + ]]> @@ -200,11 +200,11 @@ When this method returns, contains a string that represents the fully qualified name of the Help file. This parameter is passed uninitialized. Retrieves the library's documentation string, the complete Help file name and path, and the context identifier for the library Help topic in the Help file. - @@ -256,13 +256,13 @@ When this method returns, contains a structure that contains the library's attributes. This parameter is passed uninitialized. Retrieves the structure that contains the library's attributes. - method. - + method. + For more information, see [ITypeLib::GetLibAttr method](/windows/win32/api/oaidl/nf-oaidl-itypelib-getlibattr). - + ]]> @@ -314,11 +314,11 @@ When this method returns, contains an instance of a instance for this . This parameter is passed uninitialized. Enables a client compiler to bind to a library's types, variables, constants, and global functions. - @@ -372,11 +372,11 @@ When this method returns, contains an describing the type referenced by . This parameter is passed uninitialized. Retrieves the specified type description in the library. - @@ -426,11 +426,11 @@ Returns the number of type descriptions in the type library. The number of type descriptions in the type library. - @@ -484,11 +484,11 @@ When this method returns, contains the requested interface. This parameter is passed uninitialized. Retrieves the type description that corresponds to the specified GUID. - @@ -542,11 +542,11 @@ When this method returns, contains a reference to the enumeration for the type description. This parameter is passed uninitialized. Retrieves the type of a type description. - @@ -602,13 +602,13 @@ if was found in the type library; otherwise, . - method passes "abc" as the `szNameBuf` parameter, `szNameBuf` becomes "aBc" when the method returns. - + method passes "abc" as the `szNameBuf` parameter, `szNameBuf` becomes "aBc" when the method returns. + For more information, see [ITypeLib::IsName method](/windows/win32/api/oaidl/nf-oaidl-itypelib-isname). - + ]]> @@ -660,11 +660,11 @@ The structure to release. Releases the structure originally obtained from the method. - diff --git a/xml/System.Runtime.InteropServices.ComTypes/ITypeLib2.xml b/xml/System.Runtime.InteropServices.ComTypes/ITypeLib2.xml index 830a5ffdfbf..ec49ee0070b 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/ITypeLib2.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/ITypeLib2.xml @@ -67,13 +67,13 @@ Provides a managed definition of the interface. - @@ -134,18 +134,18 @@ A hash value to speed up the search, computed by the function. If is 0, a value is computed. When this method returns, contains an array of pointers to the type descriptions that contain the name specified in . This parameter is passed uninitialized. When this method returns, contains an array of the s of the found items; [i] is the that indexes into the type description specified by [i]. This parameter cannot be . This parameter is passed uninitialized. - On entry, a value, passed by reference, that indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. - + On entry, a value, passed by reference, that indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. + On exit, indicates the number of instances that were found. If the and values of are identical, there might be more type descriptions that contain the name. Finds occurrences of a type description in a type library. - @@ -308,11 +308,11 @@ When this method returns, contains a string that specifies the fully qualified name of the Help file. This parameter is passed uninitialized. Retrieves the library's documentation string, the complete Help file name and path, and the context identifier for the library Help topic in the Help file. - @@ -428,13 +428,13 @@ When this method returns, contains a structure that contains the library's attributes. This parameter is passed uninitialized. Retrieves the structure that contains the library's attributes. - method. - + method. + For more information, see [ITypeLib::GetLibAttr method](/windows/win32/api/oaidl/nf-oaidl-itypelib-getlibattr). - + ]]> @@ -488,11 +488,11 @@ When this method returns, contains a pointer to a change in the count of unique names. This parameter is passed uninitialized. Returns statistics about a type library that are required for efficient sizing of hash tables. - @@ -547,11 +547,11 @@ When this method returns, contains an instance for this . This parameter is passed uninitialized. Enables a client compiler to bind to a library's types, variables, constants, and global functions. - @@ -608,11 +608,11 @@ When this method returns, contains an describing the type referenced by . This parameter is passed uninitialized. Retrieves the specified type description in the library. - @@ -665,11 +665,11 @@ Returns the number of type descriptions in the type library. The number of type descriptions in the type library. - @@ -726,11 +726,11 @@ When this method returns, contains the requested interface. This parameter is passed uninitialized. Retrieves the type description that corresponds to the specified GUID. - @@ -787,11 +787,11 @@ When this method returns, contains a reference to the enumeration for the type description. This parameter is passed uninitialized. Retrieves the type of a type description. - @@ -850,11 +850,11 @@ if was found in the type library; otherwise, . - @@ -909,11 +909,11 @@ The structure to release. Releases the structure originally obtained from the method. - diff --git a/xml/System.Runtime.InteropServices.CustomMarshalers/EnumerableToDispatchMarshaler.xml b/xml/System.Runtime.InteropServices.CustomMarshalers/EnumerableToDispatchMarshaler.xml index d8aebe1496f..4fa33827e55 100644 --- a/xml/System.Runtime.InteropServices.CustomMarshalers/EnumerableToDispatchMarshaler.xml +++ b/xml/System.Runtime.InteropServices.CustomMarshalers/EnumerableToDispatchMarshaler.xml @@ -23,11 +23,11 @@ Marshals the COM interface to the .NET Framework interface, and vice versa. - and marshals to `IDispatch` when a member with a DISPID of -4 exists. When you use the Type Library Importer (Tlbimp.exe) to create a class that implements , the CLR uses this custom marshaler automatically to bridge COM enumerators and .NET enumerators. Calling results in `IDispatch.Invoke` being called with a DISPID of -4, and vice versa. - + and marshals to `IDispatch` when a member with a DISPID of -4 exists. When you use the Type Library Importer (Tlbimp.exe) to create a class that implements , the CLR uses this custom marshaler automatically to bridge COM enumerators and .NET enumerators. Calling results in `IDispatch.Invoke` being called with a DISPID of -4, and vice versa. + ]]> @@ -49,7 +49,7 @@ [!NOTE] > This member is removed in the .NET Framework version 2.0 and subsequent versions. @@ -89,11 +89,11 @@ The managed object to be destroyed. Performs necessary cleanup of the managed data when it is no longer needed. - method. - + method. + ]]> @@ -129,11 +129,11 @@ A pointer to the unmanaged data to be destroyed. Performs necessary cleanup of the unmanaged data when it is no longer needed. - method. - + method. + ]]> @@ -164,11 +164,11 @@ Returns an instance of the custom marshaler. An instance of the custom marshaler. - interface definition. - + interface definition. + ]]> @@ -202,11 +202,11 @@ Returns the size in bytes of the unmanaged data to be marshaled. -1 to indicate the type this marshaler handles is not a value type. - @@ -243,11 +243,11 @@ Marshals an object from managed code to unmanaged code. A pointer to the unmanaged object. - @@ -286,11 +286,11 @@ Marshals an object from unmanaged code to managed code. A managed object. - diff --git a/xml/System.Runtime.InteropServices.CustomMarshalers/EnumeratorToEnumVariantMarshaler.xml b/xml/System.Runtime.InteropServices.CustomMarshalers/EnumeratorToEnumVariantMarshaler.xml index b48aa2e9ccb..047753319a1 100644 --- a/xml/System.Runtime.InteropServices.CustomMarshalers/EnumeratorToEnumVariantMarshaler.xml +++ b/xml/System.Runtime.InteropServices.CustomMarshalers/EnumeratorToEnumVariantMarshaler.xml @@ -23,11 +23,11 @@ Marshals the COM interface to the .NET Framework interface, and vice versa. - and marshals to `IEnumVARIANT`. The CLR automatically uses this class to bridge COM enumerators and .NET enumerators. The type returned by the method in the imported COM class uses `EnumeratorToEnumVariantMarshaler` to map the calls to the `IEnumVARIANT` interface pointer returned by the COM object's member with a DISPID of -4. - + and marshals to `IEnumVARIANT`. The CLR automatically uses this class to bridge COM enumerators and .NET enumerators. The type returned by the method in the imported COM class uses `EnumeratorToEnumVariantMarshaler` to map the calls to the `IEnumVARIANT` interface pointer returned by the COM object's member with a DISPID of -4. + ]]> @@ -49,7 +49,7 @@ [!NOTE] > This member is removed in the .NET Framework version 2.0 and subsequent versions. @@ -89,11 +89,11 @@ The managed object to be destroyed. Performs necessary cleanup of the managed data when it is no longer needed. - method. - + method. + ]]> @@ -129,11 +129,11 @@ A pointer to the unmanaged data to be destroyed. Performs necessary cleanup of the unmanaged data when it is no longer needed. - method. - + method. + ]]> @@ -164,11 +164,11 @@ Returns an instance of the custom marshaler. An instance of the custom marshaler. - interface definition. - + interface definition. + ]]> @@ -202,11 +202,11 @@ Returns the size in bytes of the unmanaged data to be marshaled. -1 to indicate the type this marshaler handles is not a value type. - @@ -243,11 +243,11 @@ Marshals an object from managed code to unmanaged code. A pointer to the unmanaged object. - @@ -286,11 +286,11 @@ Marshals an object from unmanaged code to managed code. A managed object. - diff --git a/xml/System.Runtime.InteropServices.CustomMarshalers/ExpandoToDispatchExMarshaler.xml b/xml/System.Runtime.InteropServices.CustomMarshalers/ExpandoToDispatchExMarshaler.xml index 98fb1613cda..bddf6a9310b 100644 --- a/xml/System.Runtime.InteropServices.CustomMarshalers/ExpandoToDispatchExMarshaler.xml +++ b/xml/System.Runtime.InteropServices.CustomMarshalers/ExpandoToDispatchExMarshaler.xml @@ -23,15 +23,15 @@ Marshals the COM interface to either the .NET Framework interface, or to the interface, and vice versa. - @@ -53,7 +53,7 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef [!NOTE] > This member is removed in the .NET Framework version 2.0 and subsequent versions. @@ -93,11 +93,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef The managed object to be destroyed. Performs necessary cleanup of the managed data when it is no longer needed. - method. - + method. + ]]> @@ -133,11 +133,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef A pointer to the unmanaged data to be destroyed. Performs necessary cleanup of the unmanaged data when it is no longer needed. - method. - + method. + ]]> @@ -168,11 +168,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef Returns an instance of the custom marshaler. An instance of the custom marshaler. - interface definition. - + interface definition. + ]]> @@ -208,11 +208,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef Returns the size in bytes of the unmanaged data to be marshaled. -1 to indicate the type this marshaler handles is not a value type. - @@ -249,11 +249,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef Marshals an object from managed code to unmanaged code. A pointer to the unmanaged object. - @@ -292,11 +292,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef Marshals an object from unmanaged code to managed code. A managed object. - diff --git a/xml/System.Runtime.InteropServices.CustomMarshalers/TypeToTypeInfoMarshaler.xml b/xml/System.Runtime.InteropServices.CustomMarshalers/TypeToTypeInfoMarshaler.xml index 3423bb155f7..1f680efad9b 100644 --- a/xml/System.Runtime.InteropServices.CustomMarshalers/TypeToTypeInfoMarshaler.xml +++ b/xml/System.Runtime.InteropServices.CustomMarshalers/TypeToTypeInfoMarshaler.xml @@ -23,15 +23,15 @@ Marshals the unmanaged interface to the managed class, and marshals the managed class to the unmanaged interface. - instance exposed for an `ITypeInfo` interface is based on the metadata that would appear in an imported assembly. - - The Type Library Importer (Tlbimp.exe) marks `ITypeInfo` parameters with the appropriate with the enumeration member when converting signatures that use `ITypeInfo` parameters to signatures that use parameters. - - The same conversion functionality can be accomplished without the custom marshaler, by calling and . - + instance exposed for an `ITypeInfo` interface is based on the metadata that would appear in an imported assembly. + + The Type Library Importer (Tlbimp.exe) marks `ITypeInfo` parameters with the appropriate with the enumeration member when converting signatures that use `ITypeInfo` parameters to signatures that use parameters. + + The same conversion functionality can be accomplished without the custom marshaler, by calling and . + ]]> @@ -53,7 +53,7 @@ [!NOTE] > This member is removed in the .NET Framework version 2.0 and subsequent versions. @@ -93,11 +93,11 @@ The managed object to be destroyed. Performs necessary cleanup of the managed data when it is no longer needed. - method. - + method. + ]]> @@ -133,11 +133,11 @@ A pointer to the unmanaged data to be destroyed. Performs necessary cleanup of the unmanaged data when it is no longer needed. - method. - + method. + ]]> @@ -168,11 +168,11 @@ Returns an instance of the custom marshaler. An instance of the custom marshaler. - interface definition. - + interface definition. + ]]> @@ -206,11 +206,11 @@ Returns the size in bytes of the unmanaged data to be marshaled. -1 to indicate the type this marshaler handles is not a value type. - @@ -247,11 +247,11 @@ Marshals an object from managed code to unmanaged code. A pointer to the unmanaged object. - @@ -290,11 +290,11 @@ Marshals an object from unmanaged code to managed code. A managed object. - diff --git a/xml/System.Runtime.InteropServices.Marshalling/ReadOnlySpanMarshaller`2.xml b/xml/System.Runtime.InteropServices.Marshalling/ReadOnlySpanMarshaller`2.xml index 86cb1c20af8..a98f288578f 100644 --- a/xml/System.Runtime.InteropServices.Marshalling/ReadOnlySpanMarshaller`2.xml +++ b/xml/System.Runtime.InteropServices.Marshalling/ReadOnlySpanMarshaller`2.xml @@ -71,7 +71,7 @@ ## Remarks -A marshalled with this marshaller will match the semantics of . +A marshalled with this marshaller will match the semantics of . In particular, this marshaller will pass a non-`null` value for a zero-length span if the span was constructed with a non-`null` value. ]]> diff --git a/xml/System.Runtime.InteropServices.Marshalling/SpanMarshaller`2.xml b/xml/System.Runtime.InteropServices.Marshalling/SpanMarshaller`2.xml index 53906a6ed03..68016a9b607 100644 --- a/xml/System.Runtime.InteropServices.Marshalling/SpanMarshaller`2.xml +++ b/xml/System.Runtime.InteropServices.Marshalling/SpanMarshaller`2.xml @@ -67,7 +67,7 @@ ## Remarks -A marshalled with this marshaller will match the semantics of . +A marshalled with this marshaller will match the semantics of . In particular, this marshaller will pass a non-`null` value for a zero-length span if the span was constructed with a non-`null` value. ]]> diff --git a/xml/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml b/xml/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml index db740241627..2fa49620a6c 100644 --- a/xml/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml +++ b/xml/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml @@ -39,7 +39,7 @@ ## Remarks Use this type when you need to manage the addition and removal of events manually. - An instance of this table stores the delegates that represent the event handlers that have been added to an event. To raise the event, invoke the delegate that is returned by the property, if it is not `null`. An instance of this table is required for each event. + An instance of this table stores the delegates that represent the event handlers that have been added to an event. To raise the event, invoke the delegate that is returned by the property, if it is not `null`. An instance of this table is required for each event. ]]> @@ -138,7 +138,7 @@ method to initialize an event registration token table in scenarios where any of several threads can create the table. If this method is called on multiple threads at the same time, the same event registration token table is returned on all threads. + Use the method to initialize an event registration token table in scenarios where any of several threads can create the table. If this method is called on multiple threads at the same time, the same event registration token table is returned on all threads. ]]> diff --git a/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml b/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml index 1acab8c0b64..62b520faefd 100644 --- a/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml +++ b/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml @@ -341,7 +341,7 @@ method to release the [HSTRING](https://go.microsoft.com/fwlink/p/?LinkId=246451) when you are done using it. + Use the method to release the [HSTRING](https://go.microsoft.com/fwlink/p/?LinkId=246451) when you are done using it. ]]> diff --git a/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml b/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml index 38fb933880a..3fe3211aa5f 100644 --- a/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml +++ b/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml @@ -17,14 +17,14 @@ Provides an event for resolving reflection-only type requests for types that are provided by Windows Metadata files, and methods for performing the resolution. - [!NOTE] -> Sub-namespaces don't imply containment. That is, namespace A.B isn't contained in namespace A. - +> Sub-namespaces don't imply containment. That is, namespace A.B isn't contained in namespace A. + ]]> @@ -89,16 +89,16 @@ Occurs when the resolution of a Windows Metadata file fails in the reflection-only context. - event for managed assemblies. - - See the class. - + event for managed assemblies. + + See the class. + > [!IMPORTANT] -> The event handler for this event should not throw exceptions. - +> The event handler for this event should not throw exceptions. + ]]> @@ -145,11 +145,11 @@ Locates the Windows Metadata files for the specified namespace, given the specified locations to search. An enumerable list of strings that represent the Windows Metadata files that define . - method overload and specifying `null` for the `windowsSdkFilePath` parameter. - + method overload and specifying `null` for the `windowsSdkFilePath` parameter. + ]]> The operating system version does not support the Windows Runtime. @@ -190,11 +190,11 @@ Locates the Windows Metadata files for the specified namespace, given the specified locations to search. An enumerable list of strings that represent the Windows Metadata files that define . - The operating system version does not support the Windows Runtime. diff --git a/xml/System.Runtime.InteropServices/ArrayWithOffset.xml b/xml/System.Runtime.InteropServices/ArrayWithOffset.xml index d62ec1078f1..597addcaa1d 100644 --- a/xml/System.Runtime.InteropServices/ArrayWithOffset.xml +++ b/xml/System.Runtime.InteropServices/ArrayWithOffset.xml @@ -80,11 +80,11 @@ Encapsulates an array and an offset within the specified array. - @@ -472,7 +472,7 @@ if the value of is the same as the value of ; otherwise, . - .]]> + .]]> @@ -527,7 +527,7 @@ if the value of is not the same as the value of ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Runtime.InteropServices/COMException.xml b/xml/System.Runtime.InteropServices/COMException.xml index 3e4f6788f85..eb884081099 100644 --- a/xml/System.Runtime.InteropServices/COMException.xml +++ b/xml/System.Runtime.InteropServices/COMException.xml @@ -139,8 +139,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -199,8 +199,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||`message`| +||`null`| +||`message`| ]]> @@ -333,8 +333,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> @@ -399,8 +399,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||`message`| +||`null`| +||`message`| ]]> diff --git a/xml/System.Runtime.InteropServices/CONNECTDATA.xml b/xml/System.Runtime.InteropServices/CONNECTDATA.xml index f201141d87f..e52e1006c59 100644 --- a/xml/System.Runtime.InteropServices/CONNECTDATA.xml +++ b/xml/System.Runtime.InteropServices/CONNECTDATA.xml @@ -29,13 +29,13 @@ Use instead. - method. - - For more information about `CONNECTDATA`, see the MSDN Library. - + method. + + For more information about `CONNECTDATA`, see the MSDN Library. + ]]> diff --git a/xml/System.Runtime.InteropServices/CollectionsMarshal.xml b/xml/System.Runtime.InteropServices/CollectionsMarshal.xml index 026035f958b..41310c50635 100644 --- a/xml/System.Runtime.InteropServices/CollectionsMarshal.xml +++ b/xml/System.Runtime.InteropServices/CollectionsMarshal.xml @@ -289,7 +289,7 @@ Items should not be added to or removed from the while the ref `TValue` is in use. -The ref `null` can be detected by calling . +The ref `null` can be detected by calling . ]]> diff --git a/xml/System.Runtime.InteropServices/ComAwareEventInfo.xml b/xml/System.Runtime.InteropServices/ComAwareEventInfo.xml index 43e9c23b048..8f8df06c9a0 100644 --- a/xml/System.Runtime.InteropServices/ComAwareEventInfo.xml +++ b/xml/System.Runtime.InteropServices/ComAwareEventInfo.xml @@ -75,11 +75,11 @@ and methods instead of using regular add handler and remove handler methods for events. This occurs if the interface that the corresponding event is defined on needs to be embedded. + Normally, compilers will automatically embed calls to the and methods instead of using regular add handler and remove handler methods for events. This occurs if the interface that the corresponding event is defined on needs to be embedded. You can specify this by embedding the entire assembly that contains the interface by using the **/link** option on the compilers or by setting the **Embed Interop Types** property to `True` in Visual Studio. - The type derives from the class and overrides the and methods. + The type derives from the class and overrides the and methods. ]]> @@ -196,11 +196,11 @@ method except that it allows you to attach events to COM objects. + This method is similar to the method except that it allows you to attach events to COM objects. - If `target` is a COM object, this method adds a delegate to an event by using the method. + If `target` is a COM object, this method adds a delegate to an event by using the method. - facilitates registering COM event sinks that forward calls to corresponding managed delegates. It requires the following information: + facilitates registering COM event sinks that forward calls to corresponding managed delegates. It requires the following information: - The target object itself (`target`). @@ -210,7 +210,7 @@ - The delegate that would be invoked when the COM object triggers the corresponding event (`handler`). - looks up the corresponding COM source interface (specified as the first parameter of the constructor). It then looks up a method on the source interface whose name is identical to the event name. The value of `GuidAttribute` on the source interface is the GUID that is passed to ; the value of `DispIDAttribute` on the method is the DispID value that is passed to . + looks up the corresponding COM source interface (specified as the first parameter of the constructor). It then looks up a method on the source interface whose name is identical to the event name. The value of `GuidAttribute` on the source interface is the GUID that is passed to ; the value of `DispIDAttribute` on the method is the DispID value that is passed to . ]]> @@ -368,7 +368,7 @@ method. + This method calls the method. ]]> @@ -432,7 +432,7 @@ method of the underlying object. + This method calls the method of the underlying object. ]]> @@ -944,11 +944,11 @@ method, except that it allows you to detach events from COM objects. + This method is similar to the method, except that it allows you to detach events from COM objects. - If `target` is a COM object, this method releases a delegate to an event by using the method. + If `target` is a COM object, this method releases a delegate to an event by using the method. - facilitates unregistering COM event sinks that forward calls to corresponding managed delegates. It requires the following information: + facilitates unregistering COM event sinks that forward calls to corresponding managed delegates. It requires the following information: - The target object itself (`target`). @@ -958,7 +958,7 @@ - The delegate that would be invoked when the COM object triggers the corresponding event (`handler`). - looks up the corresponding COM source interface (specified as the first parameter of the constructor). It then it looks up a method on the source interface whose name is identical to the event name. The value of `GuidAttribute` on the source interface is the GUID that is passed to ; the value of `DispIDAttribute` on the method is the DispID value that is passed to . + looks up the corresponding COM source interface (specified as the first parameter of the constructor). It then it looks up a method on the source interface whose name is identical to the event name. The value of `GuidAttribute` on the source interface is the GUID that is passed to ; the value of `DispIDAttribute` on the method is the DispID value that is passed to . ]]> diff --git a/xml/System.Runtime.InteropServices/ComRegisterFunctionAttribute.xml b/xml/System.Runtime.InteropServices/ComRegisterFunctionAttribute.xml index d93e0ea77d1..49c845384d8 100644 --- a/xml/System.Runtime.InteropServices/ComRegisterFunctionAttribute.xml +++ b/xml/System.Runtime.InteropServices/ComRegisterFunctionAttribute.xml @@ -63,7 +63,7 @@ `ComRegisterFunctionAttribute` enables you to add arbitrary registration code to accommodate the requirements of COM clients. For example, you can update the registry using registration functions from the namespace. If you provide a registration method, you should also apply to an unregistration method, which reverses the operations done in the registration method. -**.NET Framework:** The common language runtime calls the method with this attribute when its containing assembly is registered (directly or indirectly) with the [Regasm.exe (Assembly Registration) tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) or through the method. +**.NET Framework:** The common language runtime calls the method with this attribute when its containing assembly is registered (directly or indirectly) with the [Regasm.exe (Assembly Registration) tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) or through the method. **.NET Core:** The common language runtime calls the method with this attribute when its containing assembly's COM host is registered via the [RegSvr32.exe tool](https://learn.microsoft.com/windows-server/administration/windows-commands/regsvr32). diff --git a/xml/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.xml b/xml/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.xml index a4bae374968..3bf7db1965f 100644 --- a/xml/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.xml +++ b/xml/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.xml @@ -56,24 +56,24 @@ Specifies the method to call when you unregister an assembly for use from COM; this allows for the execution of user-written code during the unregistration process. - to provide a registration method, you should also provide an unregistration method to reverse the operations done in the registration method. You can have only one unregistration method for a class. -**.NET Framework:** The common language runtime calls the method with this attribute when its containing assembly is unregistered (directly or indirectly) with the [Regasm.exe (Assembly Registration) tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) or through the method. - - **.NET Core:** The common language runtime calls the method with this attribute when its containing assembly's COM host is unregistered via the [RegSvr32.exe tool](https://learn.microsoft.com/windows-server/administration/windows-commands/regsvr32). - -## Examples - The following example demonstrates applying and to methods with the appropriate signature. +**.NET Framework:** The common language runtime calls the method with this attribute when its containing assembly is unregistered (directly or indirectly) with the [Regasm.exe (Assembly Registration) tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) or through the method. + **.NET Core:** The common language runtime calls the method with this attribute when its containing assembly's COM host is unregistered via the [RegSvr32.exe tool](https://learn.microsoft.com/windows-server/administration/windows-commands/regsvr32). + +## Examples + The following example demonstrates applying and to methods with the appropriate signature. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic ComRegisterFunctionAttribute Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/ComRegisterFunctionAttribute/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/ComRegisterFunctionAttribute/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/ComRegisterFunctionAttribute/Overview/source.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.InteropServices/CriticalHandle.xml b/xml/System.Runtime.InteropServices/CriticalHandle.xml index 12745706098..89230102cde 100644 --- a/xml/System.Runtime.InteropServices/CriticalHandle.xml +++ b/xml/System.Runtime.InteropServices/CriticalHandle.xml @@ -99,7 +99,7 @@ ## Remarks The class is similar to the class, except that implements reference counting. You can use instead of to address performance considerations when you can provide the necessary synchronization more efficiently yourself. - Because the class does not perform reference counting, it does not provide protection from handle recycling security attacks. Because the reference counting algorithm implicitly serializes operations, a certain amount of thread safety is also lost. If you call the or method while an operation that is using the handle is outstanding on another thread, or if you call or from two threads at the same time, the results are non-deterministic. The class still provides the guaranteed critical finalization provided by the class. + Because the class does not perform reference counting, it does not provide protection from handle recycling security attacks. Because the reference counting algorithm implicitly serializes operations, a certain amount of thread safety is also lost. If you call the or method while an operation that is using the handle is outstanding on another thread, or if you call or from two threads at the same time, the results are non-deterministic. The class still provides the guaranteed critical finalization provided by the class. ]]> @@ -223,11 +223,11 @@ or method allows the resources to be freed. Unlike the class, this will always happen immediately since there is no reference count to indicate that other threads are using this handle. Therefore, you must employ a synchronization mechanism to ensure it is safe to call the method. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. + Calling the or method allows the resources to be freed. Unlike the class, this will always happen immediately since there is no reference count to indicate that other threads are using this handle. Therefore, you must employ a synchronization mechanism to ensure it is safe to call the method. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. - Call the or method when you are finished using the object. The method leaves the object in an unusable state. + Call the or method when you are finished using the object. The method leaves the object in an unusable state. - **Note** Always call or before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. + **Note** Always call or before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. ]]> @@ -306,11 +306,11 @@ or method allows the resources to be freed. Unlike the class, this will always happen immediately since there is no reference count to indicate that other threads are using this handle. Therefore, you must employ a synchronization mechanism to ensure it is safe to call the method. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. + Calling the or method allows the resources to be freed. Unlike the class, this will always happen immediately since there is no reference count to indicate that other threads are using this handle. Therefore, you must employ a synchronization mechanism to ensure it is safe to call the method. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. - Call the or method when you are finished using the object. The method leaves the object in an unusable state. + Call the or method when you are finished using the object. The method leaves the object in an unusable state. - **Note** Always call the or method before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. + **Note** Always call the or method before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. ]]> @@ -381,7 +381,7 @@ method with the `disposing` parameter set to `false`. + You should never explicitly call the method with the `disposing` parameter set to `false`. ]]> @@ -448,7 +448,7 @@ method is the destructor for the class. Application code should not call this method directly. + The method is the destructor for the class. Application code should not call this method directly. ]]> @@ -569,11 +569,11 @@ method returns a value indicating whether the object's handle is no longer associated with a native resource. This differs from the definition of the property, which computes whether a given handle is always considered invalid. The method returns a `true` value in the following cases: + The method returns a value indicating whether the object's handle is no longer associated with a native resource. This differs from the definition of the property, which computes whether a given handle is always considered invalid. The method returns a `true` value in the following cases: -- The method was called. +- The method was called. -- The method or method was called and there are no references to the object on other threads. +- The method or method was called and there are no references to the object on other threads. ]]> @@ -706,13 +706,13 @@ method is guaranteed to be called only once, provided that you employ proper synchronization mechanisms to ensure that only one call to the or method is made. The method will not be called if the or property is `true`. Implement this method in your derived classes to execute any code that is required to free the handle. Because one of the functions of is to guarantee prevention of resource leaks, the code in your implementation of must never fail. The garbage collector calls after normal finalizers have been run for objects that were garbage collected at the same time, and guarantees the resources to invoke it and that it will not be interrupted while it is in progress. This method will be prepared as a constrained execution region (CER) at instance construction time (along with all the methods in its statically determinable call graph). Although this prevents thread abort interrupts, you must still be careful not to introduce any fault paths in your overridden method. In particular, apply the attribute to any methods you call from . In most cases this code should be: + The method is guaranteed to be called only once, provided that you employ proper synchronization mechanisms to ensure that only one call to the or method is made. The method will not be called if the or property is `true`. Implement this method in your derived classes to execute any code that is required to free the handle. Because one of the functions of is to guarantee prevention of resource leaks, the code in your implementation of must never fail. The garbage collector calls after normal finalizers have been run for objects that were garbage collected at the same time, and guarantees the resources to invoke it and that it will not be interrupted while it is in progress. This method will be prepared as a constrained execution region (CER) at instance construction time (along with all the methods in its statically determinable call graph). Although this prevents thread abort interrupts, you must still be careful not to introduce any fault paths in your overridden method. In particular, apply the attribute to any methods you call from . In most cases this code should be: `ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)` Additionally, for simple cleanup (for example, calling the Windows API `CloseHandle` on a file handle) you can check the return value for the single platform invoke call. For complex cleanup, you may have a lot of program logic and many method calls, some of which might fail. You must ensure that your program logic has fallback code for each of those cases. - If the method returns `false` for any reason, it generates a [releaseHandleFailed](/dotnet/framework/debug-trace-profile/releasehandlefailed-mda) Managed Debugging Assistant. + If the method returns `false` for any reason, it generates a [releaseHandleFailed](/dotnet/framework/debug-trace-profile/releasehandlefailed-mda) Managed Debugging Assistant. ]]> @@ -780,7 +780,7 @@ method only if you need to support a pre-existing handle (for example, if the handle is returned in a structure) because the .NET Framework COM interop infrastructure does not support marshaling handles in a structure. + Use the method only if you need to support a pre-existing handle (for example, if the handle is returned in a structure) because the .NET Framework COM interop infrastructure does not support marshaling handles in a structure. ]]> @@ -843,9 +843,9 @@ method only when you know that your handle is invalid and you want to mark it as such. Doing so does not change the value of the field; it only marks the handle as invalid. The handle might then contain a potentially stale value. The effect of this call is that no attempt is made to free the resources. + Call the method only when you know that your handle is invalid and you want to mark it as such. Doing so does not change the value of the field; it only marks the handle as invalid. The handle might then contain a potentially stale value. The effect of this call is that no attempt is made to free the resources. - As with the method, use only if you need to support a pre-existing handle. + As with the method, use only if you need to support a pre-existing handle. ]]> diff --git a/xml/System.Runtime.InteropServices/DllImportAttribute.xml b/xml/System.Runtime.InteropServices/DllImportAttribute.xml index 5f9094e804c..e161f8eca62 100644 --- a/xml/System.Runtime.InteropServices/DllImportAttribute.xml +++ b/xml/System.Runtime.InteropServices/DllImportAttribute.xml @@ -622,11 +622,11 @@ For additional information about using the platform invoke service to access fun `true` to indicate that the callee will set an error via `SetLastError` on Windows or `errno` on other platforms; otherwise, `false`. The default is `false`. If this field is set to `true`, the runtime marshaler calls `GetLastError` or `errno` and caches the value returned to prevent it from being overwritten by other API calls. - You can retrieve the error code by calling on .NET 6.0 and above - or on .NET 5 and below or .NET Framework. + You can retrieve the error code by calling on .NET 6.0 and above + or on .NET 5 and below or .NET Framework. On .NET, the error information is cleared (set to `0`) before invoking the callee when this field is set to `true`. On .NET Framework, the error information is not cleared. - This means that error information returned by and + This means that error information returned by and on .NET represents only the error information from the last p/invoke with set to `true`. On .NET Framework, the error information can persist from one p/invoke to the next. diff --git a/xml/System.Runtime.InteropServices/ExporterEventKind.xml b/xml/System.Runtime.InteropServices/ExporterEventKind.xml index d17d0855b9b..49ee13ab78d 100644 --- a/xml/System.Runtime.InteropServices/ExporterEventKind.xml +++ b/xml/System.Runtime.InteropServices/ExporterEventKind.xml @@ -28,11 +28,11 @@ Describes the callbacks that the type library exporter makes when exporting a type library. - method of an object which implements the interface. The value passed identifies the specific kind of event being reported. - + method of an object which implements the interface. The value passed identifies the specific kind of event being reported. + ]]> diff --git a/xml/System.Runtime.InteropServices/ExtensibleClassFactory.xml b/xml/System.Runtime.InteropServices/ExtensibleClassFactory.xml index a5c8136fa88..45e808af046 100644 --- a/xml/System.Runtime.InteropServices/ExtensibleClassFactory.xml +++ b/xml/System.Runtime.InteropServices/ExtensibleClassFactory.xml @@ -25,20 +25,20 @@ Enables customization of managed objects that extend from unmanaged objects during creation. - method must be called in the `static` initializer of the class that is extending the RCW. Only one object creation callback is permitted per object type. When the extensible RCW is activated, the callback is registered. When the underlying COM object needs to be created, the callback is called to provide a reference to the object. The callback must return an `IUnknown` interface pointer for the base object. - - - -## Examples - Registers a `delegate` that will be called whenever an instance of a managed type that extends from an unmanaged type needs to allocate the aggregated unmanaged object. This `delegate` is expected to allocate and aggregate the unmanaged object and is called in place of a `CoCreateInstance`. This routine must be called in the context of the `static` initializer for the class for which the callbacks will be made. - + method must be called in the `static` initializer of the class that is extending the RCW. Only one object creation callback is permitted per object type. When the extensible RCW is activated, the callback is registered. When the underlying COM object needs to be created, the callback is called to provide a reference to the object. The callback must return an `IUnknown` interface pointer for the base object. + + + +## Examples + Registers a `delegate` that will be called whenever an instance of a managed type that extends from an unmanaged type needs to allocate the aggregated unmanaged object. This `delegate` is expected to allocate and aggregate the unmanaged object and is called in place of a `CoCreateInstance`. This routine must be called in the context of the `static` initializer for the class for which the callbacks will be made. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic ExtensibleClassFactory Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/ExtensibleClassFactory/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/ExtensibleClassFactory/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/ExtensibleClassFactory/Overview/source.vb" id="Snippet1"::: + ]]> @@ -73,13 +73,13 @@ A that is called in place of . Registers a that is called when an instance of a managed type, that extends from an unmanaged type, needs to allocate the aggregated unmanaged object. - diff --git a/xml/System.Runtime.InteropServices/ExternalException.xml b/xml/System.Runtime.InteropServices/ExternalException.xml index 8c8e0837c4f..d1a571874ad 100644 --- a/xml/System.Runtime.InteropServices/ExternalException.xml +++ b/xml/System.Runtime.InteropServices/ExternalException.xml @@ -68,7 +68,7 @@ `ExternalException` uses the HRESULT E_FAIL, which has the value 0x80004005. - `ExternalException` uses the default implementation, which supports reference equality. + `ExternalException` uses the default implementation, which supports reference equality. For a list of initial values for an instance of `ExternalException`, see the `ExternalException` constructors. @@ -131,8 +131,8 @@ |Property|Value| |--------------|-----------| -||A null reference (`Nothing` in Visual Basic).| -||A localized error message string.| +||A null reference (`Nothing` in Visual Basic).| +||A localized error message string.| ]]> @@ -186,8 +186,8 @@ |Property|Value| |--------------|-----------| -||A null reference (`Nothing` in Visual Basic).| -||The error message string.| +||A null reference (`Nothing` in Visual Basic).| +||The error message string.| ]]> @@ -312,8 +312,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> @@ -371,9 +371,9 @@ |Property|Value| |--------------|-----------| -||The HRESULT of the error.| -||A null reference (`Nothing` in Visual Basic).| -||The error message string.| +||The HRESULT of the error.| +||A null reference (`Nothing` in Visual Basic).| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/GCHandle.xml b/xml/System.Runtime.InteropServices/GCHandle.xml index 387cf7c8fc2..346c2002251 100644 --- a/xml/System.Runtime.InteropServices/GCHandle.xml +++ b/xml/System.Runtime.InteropServices/GCHandle.xml @@ -83,23 +83,23 @@ Provides a way to access a managed object from unmanaged memory. - structure is used with the enumeration to create a handle corresponding to any managed object. This handle can be one of four types: `Weak`, `WeakTrackResurrection`, `Normal`, or `Pinned`. When the handle has been allocated, you can use it to prevent the managed object from being collected by the garbage collector when an unmanaged client holds the only reference. Without such a handle, the object can be collected by the garbage collector before completing its work on behalf of the unmanaged client. - - You can also use to create a pinned object that returns a memory address to prevent the garbage collector from moving the object in memory. - - When the handle goes out of scope you must explicitly release it by calling the method; otherwise, memory leaks may occur. When you free a pinned handle, the associated object will be unpinned and will become eligible for garbage collection, if there are no other references to it. - - - -## Examples - The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. - + structure is used with the enumeration to create a handle corresponding to any managed object. This handle can be one of four types: `Weak`, `WeakTrackResurrection`, `Normal`, or `Pinned`. When the handle has been allocated, you can use it to prevent the managed object from being collected by the garbage collector when an unmanaged client holds the only reference. Without such a handle, the object can be collected by the garbage collector before completing its work on behalf of the unmanaged client. + + You can also use to create a pinned object that returns a memory address to prevent the garbage collector from moving the object in memory. + + When the handle goes out of scope you must explicitly release it by calling the method; otherwise, memory leaks may occur. When you free a pinned handle, the associated object will be unpinned and will become eligible for garbage collection, if there are no other references to it. + + + +## Examples + The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> @@ -168,13 +168,13 @@ Retrieves the address of object data in a handle. The address of the pinned data object. - The handle is any type other than . @@ -254,19 +254,19 @@ Allocates a handle for the specified object. A new that protects the object from garbage collection. This must be released with when it is no longer needed. - handles are opaque, which means that you cannot resolve the address of the object it contains through the handle. - - - -## Examples - The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. - + handles are opaque, which means that you cannot resolve the address of the object it contains through the handle. + + + +## Examples + The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> @@ -404,11 +404,11 @@ if the specified object is equal to the current object; otherwise, . - objects are equal if they point to the same memory handle. - + objects are equal if they point to the same memory handle. + ]]> @@ -516,19 +516,19 @@ Releases a . - is called only once. - - - -## Examples - The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. - + is called only once. + + + +## Examples + The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> The handle was freed or never initialized. @@ -591,14 +591,14 @@ Returns a new object created from a handle to a managed object. A new object that corresponds to the value parameter. - object. The unmanaged function passes the type back to the caller as a parameter of the callback function. - + object. The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> The value of the parameter is . @@ -659,11 +659,11 @@ Returns an identifier for the current object. An identifier for the current object. - method returns an integer representation of the internal memory handle encapsulated by the structure. - + method returns an integer representation of the internal memory handle encapsulated by the structure. + ]]> @@ -723,11 +723,11 @@ if the handle is allocated; otherwise, . - was called on this , or if this is not initialized, the handle is not allocated and this property returns `false`. - + ]]> @@ -787,7 +787,7 @@ if the and parameters are equal; otherwise, . - .]]> + .]]> @@ -863,11 +863,11 @@ A is stored using an internal integer representation. The stored object using an internal integer representation. - from an integer value. - + from an integer value. + ]]> @@ -925,11 +925,11 @@ A is stored using an internal integer representation. The integer value. - . - + . + ]]> @@ -989,7 +989,7 @@ if the and parameters are not equal; otherwise, . - .]]> + .]]> @@ -1056,14 +1056,14 @@ Gets or sets the object this handle represents. The object this handle represents. - . The unmanaged function passes the type back to the caller as a parameter of the callback function. - + . The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> The handle was freed, or never initialized. @@ -1121,14 +1121,14 @@ Returns the internal integer representation of a object. An object that represents a object. - object. The unmanaged function passes the type back to the caller as a parameter of the callback function. - + object. The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.InteropServices/HandleRef.xml b/xml/System.Runtime.InteropServices/HandleRef.xml index 514800acd2c..a07655dfe71 100644 --- a/xml/System.Runtime.InteropServices/HandleRef.xml +++ b/xml/System.Runtime.InteropServices/HandleRef.xml @@ -70,7 +70,7 @@ If you use platform invoke to call a managed object, and the object is not referenced elsewhere after the platform invoke call, it is possible for the garbage collector to finalize the managed object. This action releases the resource and invalidates the handle, causing the platform invoke call to fail. Wrapping a handle with guarantees that the managed object is not garbage collected until the platform invoke call completes. For a description of platform invoke services, see [Consuming Unmanaged DLL Functions](/dotnet/framework/interop/consuming-unmanaged-dll-functions). - The value type, like , is a special type recognized by the interop marshaler. A normal, nonpinned also prevents untimely garbage collection, yet provides better performance. Although using to keep an object alive for the duration of a platform invoke call is preferred, you can also use the method for the same purpose. + The value type, like , is a special type recognized by the interop marshaler. A normal, nonpinned also prevents untimely garbage collection, yet provides better performance. Although using to keep an object alive for the duration of a platform invoke call is preferred, you can also use the method for the same purpose. The constructor takes two parameters: an representing the wrapper, and an representing the unmanaged handle. The interop marshaler passes only the handle to unmanaged code, and guarantees that the wrapper (passed as the first parameter to the constructor of the `HandleRef`) remains alive for the duration of the call. diff --git a/xml/System.Runtime.InteropServices/ICustomFactory.xml b/xml/System.Runtime.InteropServices/ICustomFactory.xml index d8f9150d8de..0c4f03c3bb6 100644 --- a/xml/System.Runtime.InteropServices/ICustomFactory.xml +++ b/xml/System.Runtime.InteropServices/ICustomFactory.xml @@ -50,11 +50,11 @@ Enables users to write activation code for managed objects that extend . - class with the . When the class is activated, the proxy's method is called by the common language runtime to activate the class. - + class with the . When the class is activated, the proxy's method is called by the common language runtime to activate the class. + ]]> @@ -103,11 +103,11 @@ Creates a new instance of the specified type. A associated with the specified type. - diff --git a/xml/System.Runtime.InteropServices/IRegistrationServices.xml b/xml/System.Runtime.InteropServices/IRegistrationServices.xml index 165b40f51a1..c0c3e6331e5 100644 --- a/xml/System.Runtime.InteropServices/IRegistrationServices.xml +++ b/xml/System.Runtime.InteropServices/IRegistrationServices.xml @@ -26,11 +26,11 @@ Provides a set of services for registering and unregistering managed assemblies for use from COM. - @@ -159,29 +159,29 @@ if contains types that were successfully registered; otherwise if the assembly contains no eligible types. - to get an assembly. - + to get an assembly. + ]]> is . - The full name of is . - - -or- - - A method marked with is not . - - -or- - - There is more than one method marked with at a given level of the hierarchy. - - -or- - + The full name of is . + + -or- + + A method marked with is not . + + -or- + + There is more than one method marked with at a given level of the hierarchy. + + -or- + The signature of the method marked with is not valid. @@ -217,11 +217,11 @@ GUID used to register the specified type. Registers the specified type with COM using the specified GUID. - @@ -320,27 +320,27 @@ if contains types that were successfully unregistered; otherwise if the assembly contains no eligible types. - . This method also calls any unregistration functions found in the assembly. - + . This method also calls any unregistration functions found in the assembly. + ]]> is . - The full name of is . - - -or- - - A method marked with is not . - - -or- - - There is more than one method marked with at a given level of the hierarchy. - - -or- - + The full name of is . + + -or- + + A method marked with is not . + + -or- + + There is more than one method marked with at a given level of the hierarchy. + + -or- + The signature of the method marked with is not valid. diff --git a/xml/System.Runtime.InteropServices/ITypeLibExporterNameProvider.xml b/xml/System.Runtime.InteropServices/ITypeLibExporterNameProvider.xml index d22cbd93a4f..9ef34249ead 100644 --- a/xml/System.Runtime.InteropServices/ITypeLibExporterNameProvider.xml +++ b/xml/System.Runtime.InteropServices/ITypeLibExporterNameProvider.xml @@ -30,11 +30,11 @@ Provides control over the casing of names when exported to a type library. - . You then pass this object as the last parameter to . - + . You then pass this object as the last parameter to . + ]]> @@ -61,11 +61,11 @@ Returns a list of names to control the casing of. An array of strings, where each element contains the name of a type to control casing for. - diff --git a/xml/System.Runtime.InteropServices/ImporterEventKind.xml b/xml/System.Runtime.InteropServices/ImporterEventKind.xml index 2b8da0306d0..48c75221e2b 100644 --- a/xml/System.Runtime.InteropServices/ImporterEventKind.xml +++ b/xml/System.Runtime.InteropServices/ImporterEventKind.xml @@ -28,11 +28,11 @@ Describes the callbacks that the type library importer makes when importing a type library. - method of an object which implements the interface. The value passed identifies the specific kind of event being reported. - + method of an object which implements the interface. The value passed identifies the specific kind of event being reported. + ]]> diff --git a/xml/System.Runtime.InteropServices/InvalidComObjectException.xml b/xml/System.Runtime.InteropServices/InvalidComObjectException.xml index a257f801e87..8a355487b1e 100644 --- a/xml/System.Runtime.InteropServices/InvalidComObjectException.xml +++ b/xml/System.Runtime.InteropServices/InvalidComObjectException.xml @@ -76,7 +76,7 @@ . + An `InvalidComObjectException` is thrown when an invalid COM object is used. This happens when the `__ComObject` type is used directly, without having a backing class factory. For more information, see . `InvalidComObjectException` uses the HRESULT COR_E_INVALIDCOMOBJECT, which has the value 0x80131527. @@ -148,8 +148,8 @@ |Property Type|Value| |-------------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -208,8 +208,8 @@ |Property Type|Value| |-------------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]> @@ -341,8 +341,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]>
diff --git a/xml/System.Runtime.InteropServices/InvalidOleVariantTypeException.xml b/xml/System.Runtime.InteropServices/InvalidOleVariantTypeException.xml index a86aeca2fe7..dec18e7471c 100644 --- a/xml/System.Runtime.InteropServices/InvalidOleVariantTypeException.xml +++ b/xml/System.Runtime.InteropServices/InvalidOleVariantTypeException.xml @@ -146,8 +146,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]>
@@ -206,8 +206,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]>
@@ -339,8 +339,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/Marshal.xml b/xml/System.Runtime.InteropServices/Marshal.xml index 68ce79adab6..47d52a67bc2 100644 --- a/xml/System.Runtime.InteropServices/Marshal.xml +++ b/xml/System.Runtime.InteropServices/Marshal.xml @@ -70,7 +70,7 @@ class are essential to working with unmanaged code. Most methods defined in this class are typically used by developers who want to provide a bridge between the managed and unmanaged programming models. For example, the method copies ANSI characters from a specified string (in the managed heap) to a buffer in the unmanaged heap. It also allocates the target heap of the right size. + The `static` methods defined on the class are essential to working with unmanaged code. Most methods defined in this class are typically used by developers who want to provide a bridge between the managed and unmanaged programming models. For example, the method copies ANSI characters from a specified string (in the managed heap) to a buffer in the unmanaged heap. It also allocates the target heap of the right size. The common language runtime provides specific marshaling capabilities. For details on marshaling behavior, see [Interop Marshaling](/dotnet/framework/interop/interop-marshaling). @@ -151,9 +151,9 @@ , you must decrement the reference count by using a method such as . Do not rely on the return value of , as it can sometimes be unstable. + The common language runtime manages the reference count of a COM object for you, making it unnecessary to use this method directly. In rare cases, such as testing a custom marshaler, you might find it necessary to manipulate an object's lifetime manually. After calling , you must decrement the reference count by using a method such as . Do not rely on the return value of , as it can sometimes be unstable. - You can call , , or to obtain an value that represents an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer. You can also use these methods and the method on managed objects to obtain the COM interfaces represented by the managed object's COM callable wrapper. If you are not familiar with the details of this wrapper type, see [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). + You can call , , or to obtain an value that represents an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer. You can also use these methods and the method on managed objects to obtain the COM interfaces represented by the managed object's COM callable wrapper. If you are not familiar with the details of this wrapper type, see [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). ]]> @@ -223,7 +223,7 @@ is one of two memory allocation API methods in the class. ( is the other.) The initial memory content returned is undefined, and the allocated memory can be larger than the requested number of bytes. This method exposes the COM [CoTaskMemAlloc](https://go.microsoft.com/fwlink/?LinkId=148626) function, which is referred to as the COM task memory allocator. + is one of two memory allocation API methods in the class. ( is the other.) The initial memory content returned is undefined, and the allocated memory can be larger than the requested number of bytes. This method exposes the COM [CoTaskMemAlloc](https://go.microsoft.com/fwlink/?LinkId=148626) function, which is referred to as the COM task memory allocator. ]]> @@ -309,16 +309,16 @@ ## Remarks > [!IMPORTANT] -> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. +> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. - is one of two memory allocation methods in the class. ( is the other.) This method exposes the Win32 [LocalAlloc](https://go.microsoft.com/fwlink/?LinkId=148628) function from Kernel32.dll. + is one of two memory allocation methods in the class. ( is the other.) This method exposes the Win32 [LocalAlloc](https://go.microsoft.com/fwlink/?LinkId=148628) function from Kernel32.dll. - When calls `LocalAlloc`, it passes a `LMEM_FIXED` flag, which causes the allocated memory to be locked in place. Also, the allocated memory is not zero-filled. + When calls `LocalAlloc`, it passes a `LMEM_FIXED` flag, which causes the allocated memory to be locked in place. Also, the allocated memory is not zero-filled. ## Examples - The following example demonstrates calling the method. This code example is part of a larger example provided for the class. + The following example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Marshal/cpp/marshal.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/Overview/Marshal.cs" id="Snippet4"::: @@ -394,13 +394,13 @@ ## Remarks > [!IMPORTANT] -> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. +> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. - is one of two memory allocation methods in the class. ( is the other.) This method exposes the Win32 [LocalAlloc](https://go.microsoft.com/fwlink/?LinkID=148628) function from Kernel32.dll. + is one of two memory allocation methods in the class. ( is the other.) This method exposes the Win32 [LocalAlloc](https://go.microsoft.com/fwlink/?LinkID=148628) function from Kernel32.dll. - When calls `LocalAlloc`, it passes a `LMEM_FIXED` flag, which causes the allocated memory to be locked in place. Also, the allocated memory is not zero-filled. + When calls `LocalAlloc`, it passes a `LMEM_FIXED` flag, which causes the allocated memory to be locked in place. Also, the allocated memory is not zero-filled. - For example code, see and . + For example code, see and . ]]> @@ -465,7 +465,7 @@ ## Remarks If there are a lot of references between managed and native code with deep dependency graphs it can take a long time for all the objects to clean up. Each time a GC runs it will free up some number of RCWs, which will in turn release the underlying COM objects. Those COM objects will then release their managed references and make more objects available for cleanup the next time a GC runs, which starts the process over again. - The method provides a way for the application to determine how many cycles of GC.Collect and GC.WaitForPendingFinalizers need to happen in order to clean everything up. + The method provides a way for the application to determine how many cycles of GC.Collect and GC.WaitForPendingFinalizers need to happen in order to clean everything up. ]]> @@ -532,7 +532,7 @@ exposes the COM `BindToMoniker` method, which produces an object that you can cast to any COM interface you require. This method provides the same functionality as the `GetObject` method in Visual Basic 6.0 and Visual Basic 2005. + exposes the COM `BindToMoniker` method, which produces an object that you can cast to any COM interface you require. This method provides the same functionality as the `GetObject` method in Visual Basic 6.0 and Visual Basic 2005. ]]> @@ -598,7 +598,7 @@ is used for object pooling functionality and should never be called by user code directly. + is used for object pooling functionality and should never be called by user code directly. ]]> @@ -657,9 +657,9 @@ To solve this problem: -1. Use the method to turn off automatic cleanup of RCWs, and the message pumping that occurs, on a per-thread basis. This allows developers to opt out of automatic clean-up, and the corresponding message pumping. +1. Use the method to turn off automatic cleanup of RCWs, and the message pumping that occurs, on a per-thread basis. This allows developers to opt out of automatic clean-up, and the corresponding message pumping. -2. Use the method to notify the runtime to clean up all RCWs that are allocated in the current context. This companion method allows developers to precisely control when the runtime performs cleanup in the current context. +2. Use the method to notify the runtime to clean up all RCWs that are allocated in the current context. This companion method allows developers to precisely control when the runtime performs cleanup in the current context. ]]> @@ -747,7 +747,7 @@ ## Examples - The following example copies an array to unmanaged memory by using the overload, and then copies the unmanaged array back to managed memory by using the overload. + The following example copies an array to unmanaged memory by using the overload, and then copies the unmanaged array back to managed memory by using the overload. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/Copy/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/Copy/sample.vb" id="Snippet1"::: @@ -1707,7 +1707,7 @@ method. + Unmanaged, C-style arrays do not contain bounds information, which prevents the `startIndex` and `length` parameters from being validated. Therefore, the unmanaged data that corresponds to the `source` parameter populates the managed array regardless of its usefulness. You must initialize the managed array with the appropriate size before calling the method. ]]> @@ -2001,7 +2001,7 @@ method aggregates the inner managed pointer of a managed object with the specified outer pointer, and then returns an inner [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) pointer of the managed object. + The method aggregates the inner managed pointer of a managed object with the specified outer pointer, and then returns an inner [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) pointer of the managed object. ]]> @@ -2076,7 +2076,7 @@ method aggregates the inner managed pointer of a managed object of a specified type with the specified outer pointer, and returns an inner [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) pointer of the managed object. + The method aggregates the inner managed pointer of a managed object of a specified type with the specified outer pointer, and returns an inner [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) pointer of the managed object. ]]> @@ -2164,7 +2164,7 @@ converts one COM class type, typically the base `__ComObject` type, to another COM class type. The input COM object, represented by parameter `o`, is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper). + converts one COM class type, typically the base `__ComObject` type, to another COM class type. The input COM object, represented by parameter `o`, is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper). Both the `t` and `o` parameters must be classes whose signatures are attributed with . The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool applies this attribute for you when it imports a type library. If you create the RCW manually in source code, you should apply this attribute to the managed signature that represents the original coclass to signify its COM origins. @@ -2262,7 +2262,7 @@ converts a COM object of type `T` to the `TWrapper` COM class type. The input COM object, represented by parameter `o`, is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper). + converts a COM object of type `T` to the `TWrapper` COM class type. The input COM object, represented by parameter `o`, is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper). Both the `T` generic type parameter and the `o` parameter must be classes whose signatures are attributed with the attribute. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool applies this attribute for you when it imports a type library. If you create the RCW manually in source code, you should apply this attribute to the managed signature that represents the original coclass to signify its COM origins. @@ -2358,11 +2358,11 @@ method uses this method to prevent memory leaks when reusing memory occupied by a structure. + You can use this method to free reference-type fields, such as strings, of an unmanaged structure. Unlike its fields, a structure can be a value type or a reference type. Value-type structures that contain value-type fields (all blittable) have no references whose memory must be freed. The method uses this method to prevent memory leaks when reusing memory occupied by a structure. - calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkId=148633) function, which, in turn, frees an allocated string. + calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkId=148633) function, which, in turn, frees an allocated string. - In addition to , the class provides two other memory-deallocation methods: and . + In addition to , the class provides two other memory-deallocation methods: and . ]]> @@ -2433,9 +2433,9 @@ method uses this method to prevent memory leaks when reusing memory occupied by a structure. + You can use this method to free reference type fields, such as strings, of an unmanaged structure. Unlike its fields, a structure can be a value type or a reference type. Value type structures that contain value type fields (all blittable) have no references whose memory must be freed. The method uses this method to prevent memory leaks when reusing memory occupied by a structure. - calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkId=148633) function, which, in turn, frees an allocated string. + calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkId=148633) function, which, in turn, frees an allocated string. ]]> @@ -2504,7 +2504,7 @@ method releases the managed reference to a COM object. Calling this method is equivalent to calling the method in a loop until it returns 0 (zero). + The method releases the managed reference to a COM object. Calling this method is equivalent to calling the method in a loop until it returns 0 (zero). When the reference count on the COM object becomes 0, the COM object is usually freed, although this depends on the COM object's implementation and is beyond the control of the runtime. However, the RCW can still exist, waiting to be garbage-collected. @@ -2577,7 +2577,7 @@ and , you can use this method to deallocate memory. calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkID=148633) function, which frees memory allocated by any of the following unmanaged methods: `SysAllocString`, `SysAllocStringByteLen`, `SysAllocStringLen`, `SysReAllocString`, `SysReAllocStringLen`. You can call unmanaged methods such as these with platform invoke. For details, see [Consuming Unmanaged DLL Functions](/dotnet/framework/interop/consuming-unmanaged-dll-functions). + Like and , you can use this method to deallocate memory. calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkID=148633) function, which frees memory allocated by any of the following unmanaged methods: `SysAllocString`, `SysAllocStringByteLen`, `SysAllocStringLen`, `SysReAllocString`, `SysReAllocStringLen`. You can call unmanaged methods such as these with platform invoke. For details, see [Consuming Unmanaged DLL Functions](/dotnet/framework/interop/consuming-unmanaged-dll-functions). ]]> @@ -2642,11 +2642,11 @@ to free any memory allocated by , , or any equivalent unmanaged method. If the `ptr` parameter is `IntPtr.Zero`, the method does nothing. + You can use to free any memory allocated by , , or any equivalent unmanaged method. If the `ptr` parameter is `IntPtr.Zero`, the method does nothing. - exposes the COM [CoTaskMemFree](https://go.microsoft.com/fwlink/?LinkId=148638) function, which frees all bytes so that you can no longer use the memory that the `ptr` parameter points to. + exposes the COM [CoTaskMemFree](https://go.microsoft.com/fwlink/?LinkId=148638) function, which frees all bytes so that you can no longer use the memory that the `ptr` parameter points to. - In addition to , the class provides two other memory-deallocation methods: and . + In addition to , the class provides two other memory-deallocation methods: and . ]]> @@ -2718,18 +2718,18 @@ ## Remarks > [!IMPORTANT] -> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. +> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. - You can use to free any memory from the global heap allocated by , , or any equivalent unmanaged API method. If the `hglobal` parameter is the method does nothing. + You can use to free any memory from the global heap allocated by , , or any equivalent unmanaged API method. If the `hglobal` parameter is the method does nothing. - exposes the [LocalFree](https://go.microsoft.com/fwlink/?LinkId=148640) function from Kernel32.DLL, which frees all bytes so that you can no longer use the memory pointed to by `hglobal`. + exposes the [LocalFree](https://go.microsoft.com/fwlink/?LinkId=148640) function from Kernel32.DLL, which frees all bytes so that you can no longer use the memory pointed to by `hglobal`. - In addition to , the class provides two other memory-deallocation API methods: and . + In addition to , the class provides two other memory-deallocation API methods: and . ## Examples - The following example demonstrates calling the method. This code example is part of a larger example provided for the class. + The following example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Marshal/cpp/marshal.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/Overview/Marshal.cs" id="Snippet4"::: @@ -2798,7 +2798,7 @@ provides the same functionality as the property. + If the type has a GUID in the metadata, it is returned. Otherwise, a GUID is automatically generated. You can use this method to programmatically determine the COM GUID for any managed type, including COM-invisible types. Class interfaces are the only exception because they do not correspond to a managed type. provides the same functionality as the property. ]]> @@ -2917,7 +2917,7 @@ twice. The first call tries to retrieve a reference to an instance of Microsoft Word (an instance of the `Word.Application` object). The second call tries to retrieve a reference to an instance of Microsoft Excel (an instance of an `Excel.Application` object). +The example calls twice. The first call tries to retrieve a reference to an instance of Microsoft Word (an instance of the `Word.Application` object). The second call tries to retrieve a reference to an instance of Microsoft Excel (an instance of an `Excel.Application` object). The code retrieves a reference to an instance of Microsoft Word successfully. However, because Microsoft Excel is not running, the attempt to retrieve the second object raises a . @@ -3014,11 +3014,11 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho to decrement the reference count once you have finished with the pointer. You must adhere to the rules defined by COM when using raw COM interface pointers. + This method returns an interface pointer that represents the requested interface on the specified object. It is particularly useful if you have an unmanaged method that expects to be passed an interface pointer. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. You must adhere to the rules defined by COM when using raw COM interface pointers. - is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Although less common, you can use this method on a managed object to obtain a pointer to the object's COM callable wrapper. For example, you can use on a managed object that is exported to COM to obtain an interface pointer for . You cannot obtain a pointer to a class interface since a class interface lacks the corresponding type to pass to the second parameter (`t`). Instead, use to invoke the members on the default interface of the COM callable wrapper, which is usually an auto-dispatch class interface. + is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Although less common, you can use this method on a managed object to obtain a pointer to the object's COM callable wrapper. For example, you can use on a managed object that is exported to COM to obtain an interface pointer for . You cannot obtain a pointer to a class interface since a class interface lacks the corresponding type to pass to the second parameter (`t`). Instead, use to invoke the members on the default interface of the COM callable wrapper, which is usually an auto-dispatch class interface. - The method overload allows query interface customization by default. To specify whether to apply query interface customization, use the method overload. + The method overload allows query interface customization by default. To specify whether to apply query interface customization, use the method overload. For additional information, see the [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper) and [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper) articles. @@ -3118,7 +3118,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho lets you specify whether to apply query interface customization. Use the overload to apply query interface customization by default. + lets you specify whether to apply query interface customization. Use the overload to apply query interface customization by default. ]]> @@ -3217,11 +3217,11 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho method to decrement the reference count when you have finished with the pointer. You must adhere to the rules defined by COM when using raw COM interface pointers. + This method returns an interface pointer that represents the `TInterface` interface on the specified object. It is particularly useful if you have an unmanaged method that expects to be passed an interface pointer. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use the method to decrement the reference count when you have finished with the pointer. You must adhere to the rules defined by COM when using raw COM interface pointers. - is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. You can also use this method on a managed object to obtain a pointer to the object's COM callable wrapper, although this is less common. For example, you can use on a managed object that is exported to COM to obtain an interface pointer for . + is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. You can also use this method on a managed object to obtain a pointer to the object's COM callable wrapper, although this is less common. For example, you can use on a managed object that is exported to COM to obtain an interface pointer for . - The method overload allows query interface customization by default. To specify whether to apply query interface customization, use the method overload. + The method overload allows query interface customization by default. To specify whether to apply query interface customization, use the method overload. For additional information, see the [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper) and [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper) articles. @@ -3281,7 +3281,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho except that it returns `null` if the caller is not in the same context as the object. It is particularly useful if you have an unmanaged method that expects to be passed an interface pointer. + This method is the same as except that it returns `null` if the caller is not in the same context as the object. It is particularly useful if you have an unmanaged method that expects to be passed an interface pointer. ]]> @@ -3371,7 +3371,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho retrieves. adds data to the hash table. You should never have to call either method from your code. + All COM objects wrapped in a [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper) have an associated hash table, which retrieves. adds data to the hash table. You should never have to call either method from your code. ]]> @@ -3430,9 +3430,9 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho provides the opposite functionality of . + The zero-based slot number returned by this method accounts for three [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) and possibly four [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) methods, making the value of the first available slot either 3 or 7. provides the opposite functionality of . - You can use this method to retrieve slot numbers for members of interfaces that are not visible from COM and for members of private interfaces. The slot numbers returned correspond to the v-table numbers that would be reserved if the type was exposed to COM. COM-invisible members actually occupy a slot in an exposed v-table, even though the COM client cannot use the slot. You cannot use on a class interface by passing from a class. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). + You can use this method to retrieve slot numbers for members of interfaces that are not visible from COM and for members of private interfaces. The slot numbers returned correspond to the v-table numbers that would be reserved if the type was exposed to COM. COM-invisible members actually occupy a slot in an exposed v-table, even though the COM client cannot use the slot. You cannot use on a class interface by passing from a class. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). ]]> @@ -3517,11 +3517,11 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho and methods to marshal delegates in both directions. With , `ptr` is imported as a . A can be obtained for a managed delegate by calling and passed as a parameter; it can then be called from inside the unmanaged method. Note that the parameter marshaler can also marshal function pointers to delegates. + You can use the and methods to marshal delegates in both directions. With , `ptr` is imported as a . A can be obtained for a managed delegate by calling and passed as a parameter; it can then be called from inside the unmanaged method. Note that the parameter marshaler can also marshal function pointers to delegates. `ptr` is converted to a delegate that invokes the unmanaged method using [the default platform calling convention](/dotnet/standard/native-interop/calling-conventions#platform-default-calling-convention). You can set the calling convention by applying the to the delegate. - The method has the following restrictions: + The method has the following restrictions: - Generics are not supported in interop scenarios. - You can use this method only for pure unmanaged function pointers. @@ -3605,11 +3605,11 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho and methods to marshal delegates in both directions. + You can use the and methods to marshal delegates in both directions. `ptr` is converted to a delegate that invokes the unmanaged method using [the default platform calling convention](/dotnet/standard/native-interop/calling-conventions#platform-default-calling-convention). You can set the calling convention by applying the to the delegate. - The method has the following restrictions: + The method has the following restrictions: - Generics are not supported in interop scenarios. - You can use this method only for pure unmanaged function pointers. @@ -3675,7 +3675,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho and in conjunction with to pass slots within a specified range. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). + This method returns the zero-based, v-table number for an interface or a class. When used on a class, the slot number returned refers to the class interface for the class. If the class interface is auto-dispatch, this method always returns -1 to indicate that the dispatch-only interface does not expose a v-table to managed clients. You can use and in conjunction with to pass slots within a specified range. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). ]]> @@ -3746,7 +3746,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho is exposed for compiler support of structured exception handling (SEH) only. If this method is called before an exception is thrown, it returns 0x0. + is exposed for compiler support of structured exception handling (SEH) only. If this method is called before an exception is thrown, it returns 0x0. ]]> @@ -3824,7 +3824,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho method to get an based on an HRESULT without having to call the method and catch the exception. + Use the method to get an based on an HRESULT without having to call the method and catch the exception. The current [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface is used to construct the exception. @@ -3896,7 +3896,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho method to get an based on an HRESULT without having to call the method and catch the exception (thus avoiding the corresponding performance overhead). The `errorInfo` parameter supplies additional information about the error, such as its textual description and the globally unique identifier (GUID) for the interface that defined the error. + Use the method to get an based on an HRESULT without having to call the method and catch the exception (thus avoiding the corresponding performance overhead). The `errorInfo` parameter supplies additional information about the error, such as its textual description and the globally unique identifier (GUID) for the interface that defined the error. Use this method overload if you have custom error information that you have to supply in the conversion. @@ -4002,7 +4002,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho is exposed for compiler support of structured exception handling (SEH) only. + is exposed for compiler support of structured exception handling (SEH) only. ]]> @@ -4079,7 +4079,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho ## Remarks The delegate `d` is converted to a function pointer that can be passed to unmanaged code using [the default platform calling convention](/dotnet/standard/native-interop/calling-conventions#platform-default-calling-convention). You can set the calling convention by applying the to the delegate. - You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code. Use to prevent the delegate from being collected before the native call completes: + You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code. Use to prevent the delegate from being collected before the native call completes: ```csharp var callback = new MyNativeCallback(MyManagedMethod); @@ -4088,7 +4088,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho GC.KeepAlive(callback); // Prevent collection — fnPtr does not root the delegate. ``` - A P/Invoke that marshals a delegate handles the on the user's behalf: + A P/Invoke that marshals a delegate handles the on the user's behalf: ```csharp var callback = new MyNativeCallback(MyManagedMethod); @@ -4171,7 +4171,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho ## Remarks The delegate `d` is converted to a function pointer that can be passed to unmanaged code by using [the default platform calling convention](/dotnet/standard/native-interop/calling-conventions#platform-default-calling-convention). You can set the calling convention by applying the to the delegate. - You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code. Use to prevent the delegate from being collected before the native call completes: + You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code. Use to prevent the delegate from being collected before the native call completes: ```csharp var callback = new MyNativeCallback(MyManagedMethod); @@ -4180,7 +4180,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho GC.KeepAlive(callback); // Prevent collection — fnPtr does not root the delegate. ``` -A P/Invoke that marshals a delegate handles the on the user's behalf: +A P/Invoke that marshals a delegate handles the on the user's behalf: ```csharp var callback = new MyNativeCallback(MyManagedMethod); @@ -4321,9 +4321,9 @@ A P/Invoke that marshals a delegate handles the on t also sets up an [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface for the exception that can be obtained by calling the COM GetErrorInfoNEEDGUID function. You can use this function to return an HRESULT value on a managed class implementation of a COM interface where you apply the attribute. Have the attributed method catch all exceptions and use the method to return the appropriate HRESULT value. Allowing an exception to propagate outside the method produces incorrect behavior. (In fact, the common language runtime fails to pass an exception to a COM client that calls such a method through a v-table.) + also sets up an [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface for the exception that can be obtained by calling the COM GetErrorInfoNEEDGUID function. You can use this function to return an HRESULT value on a managed class implementation of a COM interface where you apply the attribute. Have the attributed method catch all exceptions and use the method to return the appropriate HRESULT value. Allowing an exception to propagate outside the method produces incorrect behavior. (In fact, the common language runtime fails to pass an exception to a COM client that calls such a method through a v-table.) - Note that the method sets the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread. This can cause unexpected results for methods like the methods that default to using the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) of the current thread if it is set. + Note that the method sets the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread. This can cause unexpected results for methods like the methods that default to using the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) of the current thread if it is set. ]]> @@ -4392,7 +4392,7 @@ A P/Invoke that marshals a delegate handles the on t The target function must have had the `setLastError` metadata flag set. For example, the `SetLastError` field of the must be `true`. The process for setting this flag depends on the source language used: C# and C++ are `false` by default, but the `Declare` statement in Visual Basic is `true`. ## Examples - The following example demonstrates how to retrieve an HRESULT corresponding to a Win32 error code using the method. + The following example demonstrates how to retrieve an HRESULT corresponding to a Win32 error code using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetHRForLastWin32Error/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetHRForLastWin32Error/example.vb" id="Snippet1"::: @@ -4458,7 +4458,7 @@ A P/Invoke that marshals a delegate handles the on t is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. + In managed code, you seldom work directly with the `IDispatch` interface. However, is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. You can also use this method on a managed object to obtain an interface pointer to the COM callable wrapper for the object. For additional information, see [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). @@ -4509,7 +4509,7 @@ A P/Invoke that marshals a delegate handles the on t except that it returns `null` if the caller is not in the same context as the object. + This method is the same as except that it returns `null` if the caller is not in the same context as the object. ]]> @@ -4561,12 +4561,12 @@ A P/Invoke that marshals a delegate handles the on t causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. You can apply the to replace standard interop marshaling behavior with this custom marshaler. + This method returns a pointer to an `ITypeInfo` implementation that is based on the original type. Calling an object with causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. You can apply the to replace standard interop marshaling behavior with this custom marshaler. ## Examples - The following example demonstrates how to retrieve a pointer to the `ITypeInfo` interface for a type using the method. + The following example demonstrates how to retrieve a pointer to the `ITypeInfo` interface for a type using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetITypeInfoForType/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetITypeInfoForType/example.vb" id="Snippet1"::: @@ -4646,14 +4646,14 @@ A P/Invoke that marshals a delegate handles the on t is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. This method provides the opposite functionality of the method. + In managed code, you seldom work directly with the `IUnknown` interface. However, is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. This method provides the opposite functionality of the method. You can also use this method on a managed object to obtain an interface pointer to the [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper) for the object. ## Examples - The following example demonstrates how to retrieve an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface for a managed object using the method. + The following example demonstrates how to retrieve an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface for a managed object using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetIUnknownForObject/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetIUnknownForObject/example.vb" id="Snippet1"::: @@ -4703,12 +4703,12 @@ A P/Invoke that marshals a delegate handles the on t except that it returns `null` if the caller is not in the same context as the object. + This method is the same as except that it returns `null` if the caller is not in the same context as the object. ## Examples - The following example demonstrates how to retrieve an `IUnknown` interface for a managed object using the method. + The following example demonstrates how to retrieve an `IUnknown` interface for a managed object using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetIUnknownForObjectInContext/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetIUnknownForObjectInContext/example.vb" id="Snippet1"::: @@ -4761,16 +4761,16 @@ set to `true` or by a call to . +platform invoke usage, use . -This method is functionally equivalent to . It is -named to better reflect the intent of the API and its cross-platform nature. -should be preferred over . +This method is functionally equivalent to . It is +named to better reflect the intent of the API and its cross-platform nature. +should be preferred over . ## Examples The following example defines a p/invoke with -set to `true` and demonstrates using to get the last p/invoke error. +set to `true` and demonstrates using to get the last p/invoke error. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetLastPInvokeError/GetLastPInvokeError.cs" id="Snippet1"::: @@ -4848,7 +4848,7 @@ set to `true` and demonstrates using . +platform invoke usage. To get the last platform invoke error, use . ]]> @@ -4914,13 +4914,13 @@ platform invoke usage. To get the last platform invoke error, use exposes the Win32 [GetLastError](/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror) function from Kernel32.DLL. This method exists because it is not reliable to make a direct platform invoke call to `GetLastError` to obtain this information. If you want to access this error code, you must call instead of writing your own platform invoke definition for `GetLastError` and calling it. The common language runtime can make internal calls to APIs that overwrite the `GetLastError` maintained by the operating system. +On Windows systems, exposes the Win32 [GetLastError](/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror) function from Kernel32.DLL. This method exists because it is not reliable to make a direct platform invoke call to `GetLastError` to obtain this information. If you want to access this error code, you must call instead of writing your own platform invoke definition for `GetLastError` and calling it. The common language runtime can make internal calls to APIs that overwrite the `GetLastError` maintained by the operating system. You can use this method to obtain error codes only if you apply the to the method signature and set the field to `true`. The process for this varies depending upon the source language used: C# and C++ are `false` by default, but the `Declare` statement in Visual Basic is `true`. There is a difference in the behavior of the `GetLastWin32Error` method on .NET Core and .NET Framework when is `true`. On .NET Framework, the `GetLastWin32Error` method can retain error information from one P/Invoke call to the next. On .NET Core, error information is cleared before P/Invoke call, and the `GetLastWin32Error` represents only error information from the last method call. -On .NET 6 and later versions, this method is functionally equivalent to , which is named to better reflect the intent of the API and its cross-platform nature. should be preferred over . +On .NET 6 and later versions, this method is functionally equivalent to , which is named to better reflect the intent of the API and its cross-platform nature. should be preferred over . ## Examples The following example calls the `GetLastWin32Error` method. The example first demonstrates calling the method with no error present and then demonstrates calling the method with an error present. @@ -4981,7 +4981,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is exposed for compiler support only. + is exposed for compiler support only. ]]> @@ -5033,7 +5033,7 @@ On .NET 6 and later versions, this method is functionally equivalent to , , or object. The return value depends on the type of managed member that exists in the given COM slot (hence the generalized return type from which all three derive). - The zero-based slot number that is returned by this method accounts for three [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) and possibly four [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) methods, making the value of the first available slot either 3 or 7. provides the opposite functionality of . You can use and in conjunction with to pass slots within a specified range. + The zero-based slot number that is returned by this method accounts for three [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) and possibly four [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) methods, making the value of the first available slot either 3 or 7. provides the opposite functionality of . You can use and in conjunction with to pass slots within a specified range. The `memberType` parameter is important only on return. It contains the type of the COM member (a regular method or a property accessor) that corresponds to the returned object. @@ -5278,7 +5278,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is a [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper), which the common language runtime manages as it does any other managed object. The type of this wrapper is often a base `System.__ComObject` type, which is a hidden type used when the wrapper type is ambiguous. You can still make late-bound calls to such a base type as long as the COM object implements the [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) interface. Likewise, you can cast the returned object to an appropriate COM interface. + The `pUnk` parameter represents an `IUnknown` interface pointer; however, because all COM interfaces derive directly or indirectly from `IUnknown`, you can pass any COM interface to this method. The object returned by is a [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper), which the common language runtime manages as it does any other managed object. The type of this wrapper is often a base `System.__ComObject` type, which is a hidden type used when the wrapper type is ambiguous. You can still make late-bound calls to such a base type as long as the COM object implements the [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) interface. Likewise, you can cast the returned object to an appropriate COM interface. For an object to be wrapped with a specific managed class type (and not a generic wrapper type), you must adhere to the following requirements: @@ -5286,7 +5286,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method. + Alternatively, you can avoid these requirements and still get an object that is wrapped with a specific managed class type by using the method. ]]> @@ -5368,11 +5368,11 @@ On .NET 6 and later versions, this method is functionally equivalent to returns a managed object that corresponds to a raw pointer to an unmanaged VARIANT type. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. + returns a managed object that corresponds to a raw pointer to an unmanaged VARIANT type. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. - provides the opposite functionality of . + provides the opposite functionality of . - When the VARIANT type is VT_ERROR, returns an object of type `Int32` instead of `UInt32`. + When the VARIANT type is VT_ERROR, returns an object of type `Int32` instead of `UInt32`. ]]> @@ -5457,9 +5457,9 @@ On .NET 6 and later versions, this method is functionally equivalent to returns a managed object of type `T` that corresponds to a raw pointer to an unmanaged VARIANT type. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. + returns a managed object of type `T` that corresponds to a raw pointer to an unmanaged VARIANT type. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. - provides the opposite functionality of . + provides the opposite functionality of . ]]> @@ -5542,7 +5542,7 @@ On .NET 6 and later versions, this method is functionally equivalent to returns an array of managed objects that corresponds to a raw pointer to a C-style array of unmanaged VARIANT types. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. The method returns an empty array when the `cVars` parameter is 0. + returns an array of managed objects that corresponds to a raw pointer to a C-style array of unmanaged VARIANT types. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. The method returns an empty array when the `cVars` parameter is 0. The object array (the return value) gets garbage collected as usual. The unmanaged input array or individual VARIANTs in the input array are not freed. Therefore it is your responsibility to free them as appropriate. @@ -5634,7 +5634,7 @@ On .NET 6 and later versions, this method is functionally equivalent to returns an array of `T` that corresponds to a raw pointer to a C-style array of unmanaged VARIANT types. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. The method returns an empty array when the `cVars` parameter is 0. + returns an array of `T` that corresponds to a raw pointer to a C-style array of unmanaged VARIANT types. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. The method returns an empty array when the `cVars` parameter is 0. The returned array is garbage-collected as usual. The unmanaged input array or individual VARIANTs in the input array are not freed. Therefore, it is your responsibility to free them as appropriate. @@ -5741,7 +5741,7 @@ On .NET 6 and later versions, this method is functionally equivalent to and in conjunction with to pass slots within a specified range. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). + This method returns the zero-based v-table number for an interface or a class. When used on a class, the slot number that is returned refers to the class interface for the class. If the class interface is auto-dispatch, this method always returns -1 to indicate that the dispatch-only interface does not expose a v-table to managed clients. You can use and in conjunction with to pass slots within a specified range. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). ]]> @@ -5863,7 +5863,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper), which the common language runtime manages as it does any other managed object. + If an object has already been obtained for the `pUnk` parameter, `t` is ignored and the existing object is returned. `pUnk` represents an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer; however, because all COM interfaces derive directly or indirectly from `IUnknown`, you can pass any COM interface to this method. The object returned by is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper), which the common language runtime manages as it does any other managed object. ]]> @@ -5916,7 +5916,7 @@ On .NET 6 and later versions, this method is functionally equivalent to returns a instance that is based on the original type. You can apply the to replace standard interop marshaling behavior with this custom marshaler. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool uses the custom marshaler to translate `ITypeInfo` parameters to parameters. However, if you obtain an `ITypeInfo` interface by some means other than Tlbimp.exe, you can use to manually perform the same translation. + returns a instance that is based on the original type. You can apply the to replace standard interop marshaling behavior with this custom marshaler. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool uses the custom marshaler to translate `ITypeInfo` parameters to parameters. However, if you obtain an `ITypeInfo` interface by some means other than Tlbimp.exe, you can use to manually perform the same translation. ]]> @@ -6060,7 +6060,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method and passing -1 for its first parameter. + You can also retrieve the name of the type represented by an `ITypeInfo` by calling the method and passing -1 for its first parameter. ]]> @@ -6112,7 +6112,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method and passing -1 for its first parameter. + You can also retrieve the name of the type represented by an `ITypeInfo` object by calling the method and passing -1 for its first parameter. ]]> @@ -6168,7 +6168,7 @@ On .NET 6 and later versions, this method is functionally equivalent to extracts the LIBID directly from an existing type library. This action differs from that of the method, which calculates what the LIBID should be based on the current assembly. + extracts the LIBID directly from an existing type library. This action differs from that of the method, which calculates what the LIBID should be based on the current assembly. For more information about library identifiers, see [Exported Assembly Conversion](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/t1ztw645(v=vs.100)). @@ -6222,7 +6222,7 @@ On .NET 6 and later versions, this method is functionally equivalent to extracts the LIBID directly from an existing type library. This action differs from that of the method, which calculates what the LIBID should be based on the current assembly. + extracts the LIBID directly from an existing type library. This action differs from that of the method, which calculates what the LIBID should be based on the current assembly. For more information about library identifiers, see [Exported Assembly Conversion](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/t1ztw645(v=vs.100)). @@ -6272,7 +6272,7 @@ On .NET 6 and later versions, this method is functionally equivalent to at the assembly level, or it can be generated automatically. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool calculates a LIBID value based on the identity of the assembly. returns the LIBID that is associated with the , if the attribute is applied. Otherwise, returns the calculated value. Alternatively, you can use the method to extract the actual LIBID from an existing type library. + When assemblies are exported to type libraries, the type library is assigned a LIBID. You can set the LIBID explicitly by applying the at the assembly level, or it can be generated automatically. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool calculates a LIBID value based on the identity of the assembly. returns the LIBID that is associated with the , if the attribute is applied. Otherwise, returns the calculated value. Alternatively, you can use the method to extract the actual LIBID from an existing type library. See the [Exported Assembly Conversion](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/t1ztw645(v=vs.100)) topic for more information about library identifiers. @@ -6426,7 +6426,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method and passing -1 for its first parameter. + You can also retrieve the type library name by calling the method and passing -1 for its first parameter. ]]> @@ -6480,7 +6480,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method and passing -1 for its first parameter. + You can also retrieve the type library name by calling the method and passing -1 for its first parameter. ]]> @@ -6603,7 +6603,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method ensures that you receive a unique RCW, because it does not match an `IUnknown` pointer to an existing object. Use this method when you have to create a unique RCW that is not impacted by other code that calls the method. + The method ensures that you receive a unique RCW, because it does not match an `IUnknown` pointer to an existing object. Use this method when you have to create a unique RCW that is not impacted by other code that calls the method. ]]> @@ -6657,7 +6657,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is exposed for compiler support only. + is exposed for compiler support only. ]]> @@ -6760,9 +6760,9 @@ On .NET 6 and later versions, this method is functionally equivalent to returns `true` if the class type of the instance is attributed with or if it derives directly or indirectly from a class attributed with . The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool applies this attribute for you when it imports a type library. + returns `true` if the class type of the instance is attributed with or if it derives directly or indirectly from a class attributed with . The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool applies this attribute for you when it imports a type library. - Two other methods also determine whether a specified object represents a COM object, but the requirements for returning `true` differ from this method's requirements. returns `true` if the class (or interface) is attributed with directly; it does not return `true` for derived types. returns `true` if the type is attributed with or derives from a type with the same GUID. + Two other methods also determine whether a specified object represents a COM object, but the requirements for returning `true` differ from this method's requirements. returns `true` if the class (or interface) is attributed with directly; it does not return `true` for derived types. returns `true` if the type is attributed with or derives from a type with the same GUID. ]]> @@ -6824,7 +6824,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables you to check for COM visibility in one step. Types that are not visible cannot be used from COM. A type is visible if it is `public` and not hidden with the . + enables you to check for COM visibility in one step. Types that are not visible cannot be used from COM. A type is visible if it is `public` and not hidden with the . ]]> @@ -6871,7 +6871,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method returns the stack size (in bytes) needed to represent the parameters of a method signature in unmanaged memory. + The method returns the stack size (in bytes) needed to represent the parameters of a method signature in unmanaged memory. Note that the return value of this method is platform-dependent. For example, a signature with a single integer parameter returns a value of 4 on 32-bit platforms and a value of 8 on 64-bit platforms. @@ -6949,10 +6949,10 @@ On .NET 6 and later versions, this method is functionally equivalent to provides the offset in terms of the unmanaged structure layout, which does not necessarily correspond to the offset of the managed structure layout. Marshaling the structure can transform the layout and alter the offset. The `t` parameter can be a value type or a formatted reference type (with either a sequential or explicit layout). You can obtain the size of the entire layout by using the method. For additional information, see [Default Marshaling for Value Types](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0t2cwe11(v=vs.100)). + provides the offset in terms of the unmanaged structure layout, which does not necessarily correspond to the offset of the managed structure layout. Marshaling the structure can transform the layout and alter the offset. The `t` parameter can be a value type or a formatted reference type (with either a sequential or explicit layout). You can obtain the size of the entire layout by using the method. For additional information, see [Default Marshaling for Value Types](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0t2cwe11(v=vs.100)). > [!NOTE] -> Beginning with the .NET Framework version 2.0, may expose private fields. +> Beginning with the .NET Framework version 2.0, may expose private fields. ]]> @@ -7023,10 +7023,10 @@ On .NET 6 and later versions, this method is functionally equivalent to provides the offset in terms of the unmanaged structure layout, which does not necessarily correspond to the offset of the managed structure layout. Marshaling the structure can transform the layout and alter the offset. The `T` generic type parameter can be a value type or a formatted reference type (with either a sequential or explicit layout). You can obtain the size of the entire layout by using the method. For additional information, see [Default Marshaling for Value Types](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0t2cwe11(v=vs.100)). + provides the offset in terms of the unmanaged structure layout, which does not necessarily correspond to the offset of the managed structure layout. Marshaling the structure can transform the layout and alter the offset. The `T` generic type parameter can be a value type or a formatted reference type (with either a sequential or explicit layout). You can obtain the size of the entire layout by using the method. For additional information, see [Default Marshaling for Value Types](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0t2cwe11(v=vs.100)). > [!NOTE] -> Beginning with the .NET Framework version 2.0, may expose private fields. +> Beginning with the .NET Framework version 2.0, may expose private fields. ]]> @@ -7095,7 +7095,7 @@ On .NET 6 and later versions, this method is functionally equivalent to on a method outside of platform invoke has no effect. To execute setup tasks on all platform invoke methods in a type, use . + Calling on a method outside of platform invoke has no effect. To execute setup tasks on all platform invoke methods in a type, use . ]]> @@ -7157,7 +7157,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method invokes on every method for a given type. executes one-time method setup tasks without calling each method. You can use only for platform invoke calls. + The method invokes on every method for a given type. executes one-time method setup tasks without calling each method. You can use only for platform invoke calls. ]]> @@ -7238,12 +7238,12 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. ## Examples - The following example uses the method to create a managed string from an unmanaged `char` array. + The following example uses the method to create a managed string from an unmanaged `char` array. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.PtrToStringAnsi-IntPtr/cpp/sample.cpp" id="Snippet1"::: @@ -7313,12 +7313,12 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. ## Examples - The following example uses the method to create a managed string from an unmanaged`char` array. + The following example uses the method to create a managed string from an unmanaged`char` array. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.PtrToStringAnsi-IntPtr-int/cpp/sample.cpp" id="Snippet1"::: @@ -7398,9 +7398,9 @@ On .NET 6 and later versions, this method is functionally equivalent to . Otherwise, this method calls . + If the current platform is Unicode, each ANSI character is widened to a Unicode character and this method calls . Otherwise, this method calls . - is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. provides the opposite functionality of the and methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. provides the opposite functionality of the and methods. ]]> @@ -7470,9 +7470,9 @@ On .NET 6 and later versions, this method is functionally equivalent to ; on ANSI platforms, it calls . No transformations are done before these methods are called. + On Unicode platforms, this method calls ; on ANSI platforms, it calls . No transformations are done before these methods are called. - is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. provides the opposite functionality of and . + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. provides the opposite functionality of and . ]]> @@ -7544,7 +7544,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the method. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the method. ]]> @@ -7626,7 +7626,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. This API reflects the Windows definition of Unicode, which is a UTF-16 2-byte encoding. On many non-Windows platforms, the `wchar_t` data-type is 4-bytes, not 2-bytes. Consult your compiler to confirm if `wchar_t` can be used or `char16_t` should be used instead. @@ -7696,7 +7696,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. This API reflects the Windows definition of Unicode, which is a UTF-16 2-byte encoding. On many non-Windows platforms, the `wchar_t` data-type is 4-bytes, not 2-bytes. Consult your compiler to confirm if `wchar_t` can be used or `char16_t` should be used instead. @@ -7756,7 +7756,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the methods. + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the methods. ]]> @@ -7813,7 +7813,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the methods. ]]> @@ -7909,7 +7909,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You cannot use this overload method with value types. + is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You cannot use this overload method with value types. If the `ptr` parameter equals , `null` will be returned. ]]> @@ -8003,7 +8003,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You can pass a value type to this overload method. In this case, the returned object is a boxed instance. + is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You can pass a value type to this overload method. In this case, the returned object is a boxed instance. If the `ptr` parameter equals , `null` will be returned. ]]> @@ -8088,7 +8088,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as values. You can pass a value type to this method overload. + is often necessary in COM interop and platform invoke when structure parameters are represented as values. You can pass a value type to this method overload. If the `ptr` parameter equals and `T` is a reference type, `null` is returned. If `ptr` equals and `T` is a value type, a is thrown. ]]> @@ -8172,7 +8172,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as values. You cannot use this method overload with value types. + is often necessary in COM interop and platform invoke when structure parameters are represented as values. You cannot use this method overload with value types. If the `ptr` parameter equals and `T` is a reference type, `null` is returned. If `ptr` equals and `T` is a value type, a is thrown. ]]> @@ -8259,7 +8259,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method exposes the [IUnknown::QueryInterface](https://go.microsoft.com/fwlink/?LinkID=144867) method of a COM object, which attempts to obtain a specific interface pointer. Using `QueryInterface` on a COM object is the same as performing a cast operation in managed code. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. To obtain an value that represents a [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer, you can call , , or . + The method exposes the [IUnknown::QueryInterface](https://go.microsoft.com/fwlink/?LinkID=144867) method of a COM object, which attempts to obtain a specific interface pointer. Using `QueryInterface` on a COM object is the same as performing a cast operation in managed code. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. To obtain an value that represents a [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer, you can call , , or . ]]> @@ -8343,7 +8343,7 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -8355,7 +8355,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method to read the value of an unmanaged character. + The following example demonstrates how to use the method to read the value of an unmanaged character. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadByte/cpp/sample.cpp" id="Snippet1"::: @@ -8435,19 +8435,19 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet3"::: - The following example demonstrates how to use the method to read the value of an unmanaged character. + The following example demonstrates how to use the method to read the value of an unmanaged character. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadByte-IntPtr-int/cpp/sample.cpp" id="Snippet1"::: @@ -8534,7 +8534,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -8618,19 +8618,19 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int16` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int16` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: - The following example demonstrates how to use the method to read the value of an unmanaged `short` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `short` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt16/cpp/sample.cpp" id="Snippet1"::: @@ -8710,19 +8710,19 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: - The following example demonstrates how to use the method to read the value of an unmanaged `short` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `short` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt16-IntPtr-Int/cpp/sample.cpp" id="Snippet1"::: @@ -8810,7 +8810,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -8898,19 +8898,19 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int32` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int32` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet5"::: - The following example demonstrates how to use the method to read the value of an unmanaged `int` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `int` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt32/cpp/sample.cpp" id="Snippet1"::: @@ -8994,19 +8994,19 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet5"::: - The following example demonstrates how to use the method to read the value of an unmanaged `int` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `int` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt32-IntPtr-Int/cpp/sample.cpp" id="Snippet1"::: @@ -9098,7 +9098,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -9186,19 +9186,19 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int64` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int64` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet6"::: - The following example demonstrates how to use the method to read the value of an unmanaged `__int64` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `__int64` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt64/cpp/sample.cpp" id="Snippet1"::: @@ -9282,19 +9282,19 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet6"::: - The following example demonstrates how to use the method to read the value of an unmanaged `__int64` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `__int64` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt64-IntPtr-Int/cpp/sample.cpp" id="Snippet1"::: @@ -9386,7 +9386,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -9474,14 +9474,14 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet2"::: @@ -9565,14 +9565,14 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet2"::: @@ -9661,7 +9661,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -9733,7 +9733,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is one of two memory reallocation methods in the class. ( is the other.) The beginning of the reallocated memory content is the same as the original content; however, the entire memory block can be in a different location. This method exposes the COM [CoTaskMemRealloc](https://go.microsoft.com/fwlink/?LinkId=148778) function, which is referred to as the COM task memory allocator. + is one of two memory reallocation methods in the class. ( is the other.) The beginning of the reallocated memory content is the same as the original content; however, the entire memory block can be in a different location. This method exposes the COM [CoTaskMemRealloc](https://go.microsoft.com/fwlink/?LinkId=148778) function, which is referred to as the COM task memory allocator. ]]> @@ -9803,9 +9803,9 @@ On .NET 6 and later versions, this method is functionally equivalent to [!IMPORTANT] -> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. +> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET 6 or earlier, use on all platforms to allocate native memory. - is one of two memory reallocation API methods in the class. ( is the other.) + is one of two memory reallocation API methods in the class. ( is the other.) This method exposes the Win32 [GlobalReAlloc](https://go.microsoft.com/fwlink/?LinkId=148780) function from Kernel32.dll. The returned pointer can differ from the original. If it is different, the contents of the original memory block have been copied to the new block, and the original memory block has been freed. @@ -9883,14 +9883,14 @@ On .NET 6 and later versions, this method is functionally equivalent to should call . Calling after the reference count has reached zero causes undefined behavior. + The common language runtime manages the reference count of a COM object for you, making it unnecessary to use this method directly. Use this value only for testing purposes. In rare cases, such as testing a custom marshaler, you might find it necessary to manipulate an object's lifetime manually. Only programs that call should call . Calling after the reference count has reached zero causes undefined behavior. - You can call , , or to obtain an value that represents a [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer to release. You can also use these methods and the method on managed objects to release the COM interfaces represented by the managed object's [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). + You can call , , or to obtain an value that represents a [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer to release. You can also use these methods and the method on managed objects to release the COM interfaces represented by the managed object's [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). ## Examples - The following example demonstrates how to retrieve an `IUnknown` interface for a managed object using the method. The example then releases the interface pointer by calling the method. + The following example demonstrates how to retrieve an `IUnknown` interface for a managed object using the method. The example then releases the interface pointer by calling the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetIUnknownForObject/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetIUnknownForObject/example.vb" id="Snippet1"::: @@ -9970,17 +9970,17 @@ On .NET 6 and later versions, this method is functionally equivalent to method decrements the reference count of an RCW. When the reference count reaches zero, the runtime releases all its references on the unmanaged COM object, and throws a if you attempt to use the object further. If the same COM interface is passed more than one time from unmanaged to managed code, the reference count on the wrapper is incremented every time, and calling returns the number of remaining references. + The RCW has a reference count that is incremented every time a COM interface pointer is mapped to it. The method decrements the reference count of an RCW. When the reference count reaches zero, the runtime releases all its references on the unmanaged COM object, and throws a if you attempt to use the object further. If the same COM interface is passed more than one time from unmanaged to managed code, the reference count on the wrapper is incremented every time, and calling returns the number of remaining references. - This method enables you to force an RCW reference count release so that it occurs precisely when you want it to. However, improper use of may cause your application to fail, or may cause an access violation. + This method enables you to force an RCW reference count release so that it occurs precisely when you want it to. However, improper use of may cause your application to fail, or may cause an access violation. - Consider a scenario in which managed code in an application domain is holding onto an RCW that represents a COM component. If you call the method on the RCW, the managed code will be unable to access the RCW and will raise an exception. + Consider a scenario in which managed code in an application domain is holding onto an RCW that represents a COM component. If you call the method on the RCW, the managed code will be unable to access the RCW and will raise an exception. A more serious error may occur if a call to the RCW is executing when the RCW is released. In this case, there is a good chance that the thread making the call will cause an access violation. However, process memory may become corrupted, and the process may continue to run until it fails for reasons that are very difficult to debug. - This risk is compounded when the COM component that is being used is a singleton, for the following reason: The CLR activates COM components by calling the COM [CoCreateInstance](https://go.microsoft.com/fwlink/?LinkID=142894) function, which returns the same interface pointer every time it is called for singleton COM components. Thus, separate and independent pieces of managed code in an application domain can be using the same RCW for a singleton COM component, and if either one calls the method on the COM component, the other will be broken. + This risk is compounded when the COM component that is being used is a singleton, for the following reason: The CLR activates COM components by calling the COM [CoCreateInstance](https://go.microsoft.com/fwlink/?LinkID=142894) function, which returns the same interface pointer every time it is called for singleton COM components. Thus, separate and independent pieces of managed code in an application domain can be using the same RCW for a singleton COM component, and if either one calls the method on the COM component, the other will be broken. - Therefore, use the only if it is absolutely required. If you want to call this method to ensure that a COM component is released at a determined time, consider using the method instead. will release the underlying COM component regardless of how many times it has re-entered the CLR. The internal reference count of the RCW is incremented by one every time the COM component re-enters the CLR. Therefore, you could call the method in a loop until the value returned is zero. This achieves the same result as the method. + Therefore, use the only if it is absolutely required. If you want to call this method to ensure that a COM component is released at a determined time, consider using the method instead. will release the underlying COM component regardless of how many times it has re-entered the CLR. The internal reference count of the RCW is incremented by one every time the COM component re-enters the CLR. Therefore, you could call the method in a loop until the value returned is zero. This achieves the same result as the method. ]]> @@ -10087,7 +10087,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the `BSTR` when finished by calling the method. + The method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the `BSTR` when finished by calling the method. ]]> @@ -10151,12 +10151,12 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . The characters of the string are copied as ANSI characters. + The method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . The characters of the string are copied as ANSI characters. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemAnsi/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemAnsi/sample.vb" id="Snippet1"::: @@ -10223,12 +10223,12 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. The characters of the string are copied as Unicode characters. + The method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. The characters of the string are copied as Unicode characters. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemUnicode/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemUnicode/sample.vb" id="Snippet1"::: @@ -10295,12 +10295,12 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. + The method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocAnsi/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocAnsi/sample.vb" id="Snippet1"::: @@ -10367,12 +10367,12 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. + The method is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. ## Examples - The following example demonstrates how to use the method with the unmanaged `LogonUser` function to perform impersonation with the class. The example then uses the method to zero out and free the unmanaged string reference. + The following example demonstrates how to use the method with the unmanaged `LogonUser` function to perform impersonation with the class. The example then uses the method to zero out and free the unmanaged string reference. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocUnicode/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocUnicode/sample.vb" id="Snippet1"::: @@ -10452,7 +10452,7 @@ On .NET 6 and later versions, this method is functionally equivalent to adds data. retrieves data from the hash table. You should never have to call either method from your code. + All COM objects wrapped in a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper) have an associated hash table, to which adds data. retrieves data from the hash table. You should never have to call either method from your code. ]]> @@ -10508,7 +10508,7 @@ On .NET 6 and later versions, this method is functionally equivalent to . +The last platform invoke error is stored per-thread and can be retrieved using . ]]> @@ -10645,7 +10645,7 @@ The system error is based on the current operating system—that is, `errno` The size returned is the size of the unmanaged object. The unmanaged and managed sizes of an object can differ. For character types, the size is affected by the value applied to that class. - You can use the method to determine how much unmanaged memory to allocate using the and methods. + You can use the method to determine how much unmanaged memory to allocate using the and methods. ]]> @@ -10855,7 +10855,7 @@ The system error is based on the current operating system—that is, `errno` The size returned is the size of the unmanaged object. The unmanaged and managed sizes of an object can differ. For character types, the size is affected by the value applied to that class. - You can use the method to determine how much unmanaged memory to allocate by using the and methods. + You can use the method to determine how much unmanaged memory to allocate by using the and methods. ]]> @@ -10921,7 +10921,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the `BSTR` when finished by calling . This method provides the opposite functionality of . + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the `BSTR` when finished by calling . This method provides the opposite functionality of . ]]> @@ -10990,7 +10990,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as ANSI characters. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as ANSI characters. ]]> @@ -11054,7 +11054,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as Unicode characters. @@ -11124,7 +11124,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as Unicode characters. + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as Unicode characters. This API reflects the Windows definition of Unicode, which is a UTF-16 2-byte encoding. On many non-Windows platforms, the `wchar_t` data-type is 4-bytes, not 2-bytes. Consult your compiler to confirm if `wchar_t` can be used or `char16_t` should be used instead. @@ -11186,7 +11186,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string including a null terminator, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as UTF-8 characters. + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string including a null terminator, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as UTF-8 characters. ]]> @@ -11256,7 +11256,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . provides the opposite functionality of . + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . provides the opposite functionality of . This method copies embedded null characters, and includes a terminating null character. @@ -11330,7 +11330,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . This method copies embedded null characters, and includes a terminating null character. @@ -11406,7 +11406,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . This method copies embedded null characters, and includes a terminating null character. @@ -11504,20 +11504,20 @@ The system error is based on the current operating system—that is, `errno` A formatted class is a reference type whose layout is specified by the attribute, as either or . - copies the contents of `structure` to the pre-allocated block of memory that the `ptr` parameter points to. If `structure` contains reference types that marshal to COM interface pointers (interfaces, classes without layout, and ), the managed objects are kept alive with reference counts. All other reference types (for example, strings and arrays) are marshaled to copies. To release these managed or unmanaged objects, you must call the method before you free the memory block. + copies the contents of `structure` to the pre-allocated block of memory that the `ptr` parameter points to. If `structure` contains reference types that marshal to COM interface pointers (interfaces, classes without layout, and ), the managed objects are kept alive with reference counts. All other reference types (for example, strings and arrays) are marshaled to copies. To release these managed or unmanaged objects, you must call the method before you free the memory block. - If you use the method to copy a different instance to the memory block at a later time, specify `true` for `fDeleteOld` to remove reference counts for reference types in the previous instance. Otherwise, the managed reference types and unmanaged copies are effectively leaked. + If you use the method to copy a different instance to the memory block at a later time, specify `true` for `fDeleteOld` to remove reference counts for reference types in the previous instance. Otherwise, the managed reference types and unmanaged copies are effectively leaked. - The overall pattern for using is as follows: + The overall pattern for using is as follows: -1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear. +1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear. > [!IMPORTANT] > Specify `true` for `fDeleteOld` only if the block contains valid data. 2. If you copy a different instance to the memory block, and the object contains reference types, `fDeleteOld` must be `true` to free reference types in the old contents. -3. If the object contains reference types, you must call the method before you free the memory block. +3. If the object contains reference types, you must call the method before you free the memory block. > [!NOTE] > To pin an existing structure instead of copying it, use the type to create a pinned handle for the structure. For details on how to pin, see [Copying and Pinning](/dotnet/framework/interop/copying-and-pinning). @@ -11615,20 +11615,20 @@ The system error is based on the current operating system—that is, `errno` ## Remarks A formatted class is a reference type whose layout is specified by the attribute, as either or . - copies the contents of `structure` to the pre-allocated block of memory that the `ptr` parameter points to. If `structure` contains reference types that marshal to COM interface pointers (interfaces, classes without layout, and ), the managed objects are kept alive with reference counts. All other reference types (for example, strings and arrays) are marshaled to copies. To release these managed or unmanaged objects, you must call the method before you free the memory block. + copies the contents of `structure` to the pre-allocated block of memory that the `ptr` parameter points to. If `structure` contains reference types that marshal to COM interface pointers (interfaces, classes without layout, and ), the managed objects are kept alive with reference counts. All other reference types (for example, strings and arrays) are marshaled to copies. To release these managed or unmanaged objects, you must call the method before you free the memory block. - If you use the method to copy a different instance to the memory block at a later time, specify `true` for `fDeleteOld` to remove reference counts for reference types in the previous instance. Otherwise, the managed reference types and unmanaged copies are effectively leaked. + If you use the method to copy a different instance to the memory block at a later time, specify `true` for `fDeleteOld` to remove reference counts for reference types in the previous instance. Otherwise, the managed reference types and unmanaged copies are effectively leaked. - The overall pattern for using is as follows: + The overall pattern for using is as follows: -1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear. +1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear. > [!IMPORTANT] > Specify `true` for `fDeleteOld` only if the block contains valid data. 2. If you copy a different instance to the memory block, and the object contains reference types, `fDeleteOld` must be `true` to free reference types in the old contents. -3. If the object contains reference types, you must call the method before you free the memory block. +3. If the object contains reference types, you must call the method before you free the memory block. > [!NOTE] > To pin an existing structure instead of copying it, use the type to create a pinned handle for the structure. For details on how to pin, see [Copying and Pinning](/dotnet/framework/interop/copying-and-pinning). @@ -11833,13 +11833,13 @@ The system error is based on the current operating system—that is, `errno` ## Remarks This method creates an exception object for the specified failure HRESULT. If the HRESULT is 0 or positive (a success code), the method returns without creating or throwing an exception. - Note that the method returns an exception based on the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread if one is set. When this happens, the `errorCode` parameter is ignored. + Note that the method returns an exception based on the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread if one is set. When this happens, the `errorCode` parameter is ignored. - Some failure HRESULTs map to defined exceptions, whereas others do not. If the HRESULT maps to a defined exception, creates an instance of the exception and throws it. Otherwise, it creates an instance of , initializes the error code field with the HRESULT, and throws that exception. When is invoked, it attempts to retrieve extra information regarding the error by using the unmanaged [GetErrorInfo](/windows/win32/api/oleauto/nf-oleauto-geterrorinfo) function. + Some failure HRESULTs map to defined exceptions, whereas others do not. If the HRESULT maps to a defined exception, creates an instance of the exception and throws it. Otherwise, it creates an instance of , initializes the error code field with the HRESULT, and throws that exception. When is invoked, it attempts to retrieve extra information regarding the error by using the unmanaged [GetErrorInfo](/windows/win32/api/oleauto/nf-oleauto-geterrorinfo) function. For the mapping from each HRESULT to its comparable exception class in the .NET Framework, see [How to: Map HRESULTs and Exceptions](/dotnet/framework/interop/how-to-map-hresults-and-exceptions). - Occasionally, might return an exception from a previous COM call. In this case, you can use the following workaround and pass `IntPtr(-1)` as the second parameter (`errorInfo`): + Occasionally, might return an exception from a previous COM call. In this case, you can use the following workaround and pass `IntPtr(-1)` as the second parameter (`errorInfo`): ```csharp public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) @@ -11911,11 +11911,11 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) ## Remarks This method creates an exception object for the specified failure HRESULT. If the HRESULT is 0 or positive (a success code), the method returns without creating or throwing an exception. - The method releases the `errorInfo` parameter, decreasing the COM reference count of the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface. + The method releases the `errorInfo` parameter, decreasing the COM reference count of the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface. - Note that the method returns an exception based on the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread if one is set. When this happens, the `errorCode` parameter is ignored. + Note that the method returns an exception based on the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread if one is set. When this happens, the `errorCode` parameter is ignored. - Some failure HRESULTs map to defined exceptions, whereas others do not. If the HRESULT maps to a defined exception, creates an instance of the exception and throws it. Otherwise, it creates an instance of , initializes the error code field with the HRESULT, and throws that exception. The `errorInfo` parameter is used to retrieve extra information regarding the error. + Some failure HRESULTs map to defined exceptions, whereas others do not. If the HRESULT maps to a defined exception, creates an instance of the exception and throws it. Otherwise, it creates an instance of , initializes the error code field with the HRESULT, and throws that exception. The `errorInfo` parameter is used to retrieve extra information regarding the error. For the mapping from each HRESULT to its comparable exception class in the .NET Framework, see [How to: Map HRESULTs and Exceptions](/dotnet/framework/interop/how-to-map-hresults-and-exceptions). @@ -12191,7 +12191,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. @@ -12278,12 +12278,12 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet3"::: @@ -12372,7 +12372,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. ]]> @@ -12455,14 +12455,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: @@ -12541,14 +12541,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: @@ -12629,14 +12629,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: @@ -12710,14 +12710,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: @@ -12803,7 +12803,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -12893,7 +12893,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -12978,14 +12978,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet5"::: @@ -13067,14 +13067,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet5"::: @@ -13164,7 +13164,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -13249,14 +13249,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet6"::: @@ -13338,14 +13338,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet6"::: @@ -13435,7 +13435,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -13520,14 +13520,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet2"::: @@ -13610,14 +13610,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) ## Remarks This method writes a 32 bit integer on 32 bit systems, and a 64 bit integer on 64 bit systems. - enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet2"::: @@ -13703,7 +13703,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -13771,7 +13771,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first sets the contents of the BSTR to zero, and then frees the BSTR. + The method first sets the contents of the BSTR to zero, and then frees the BSTR. ]]> @@ -13833,12 +13833,12 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemAnsi/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemAnsi/sample.vb" id="Snippet1"::: @@ -13903,7 +13903,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ]]> @@ -13957,7 +13957,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ]]> @@ -14019,12 +14019,12 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocAnsi/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocAnsi/sample.vb" id="Snippet1"::: @@ -14089,12 +14089,12 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ## Examples - The following example demonstrates how to use the method with the unmanaged `LogonUser` function to perform impersonation with the class. The example then uses the method to zero out and free the unmanaged string reference. + The following example demonstrates how to use the method with the unmanaged `LogonUser` function to perform impersonation with the class. The example then uses the method to zero out and free the unmanaged string reference. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocUnicode/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocUnicode/sample.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.InteropServices/MarshalDirectiveException.xml b/xml/System.Runtime.InteropServices/MarshalDirectiveException.xml index 7f253f7b4d1..303e888acb6 100644 --- a/xml/System.Runtime.InteropServices/MarshalDirectiveException.xml +++ b/xml/System.Runtime.InteropServices/MarshalDirectiveException.xml @@ -146,8 +146,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -206,8 +206,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]> @@ -337,8 +337,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/MemoryMarshal.xml b/xml/System.Runtime.InteropServices/MemoryMarshal.xml index f9a698ca6ec..3c95382a47d 100644 --- a/xml/System.Runtime.InteropServices/MemoryMarshal.xml +++ b/xml/System.Runtime.InteropServices/MemoryMarshal.xml @@ -251,7 +251,7 @@ ## Remarks > [!CAUTION] -> This method must be used with extreme caution. is used to represent immutable data and other memory that is not meant to be written to. instances created by this method should not be written to. The purpose of this method is to allow variables typed as but only used for reading to store a . +> This method must be used with extreme caution. is used to represent immutable data and other memory that is not meant to be written to. instances created by this method should not be written to. The purpose of this method is to allow variables typed as but only used for reading to store a . ]]> @@ -615,7 +615,7 @@ This method is supported only on platforms that support misaligned memory access ## Remarks -The array must already be pinned before this method is called, and that array must not be unpinned while the buffer that it returns is still in use. Calling this method on an unpinned array could result in memory corruption. +The array must already be pinned before this method is called, and that array must not be unpinned while the buffer that it returns is still in use. Calling this method on an unpinned array could result in memory corruption. ]]> @@ -1268,7 +1268,7 @@ If the span is empty, this method returns a reference to the location where the ## Remarks -This method allows a read-only memory buffer to be used in existing APIs that require a parameter of type . +This method allows a read-only memory buffer to be used in existing APIs that require a parameter of type . ]]> @@ -1342,7 +1342,7 @@ This method allows a read-only memory buffer to be used in existing APIs that re ## Remarks > [!CAUTION] -> is used to represent immutable data. instances returned by this method should not be written to, and the wrapped array instance should only be passed to methods which treat the array contents as read-only. +> is used to represent immutable data. instances returned by this method should not be written to, and the wrapped array instance should only be passed to methods which treat the array contents as read-only. ]]> diff --git a/xml/System.Runtime.InteropServices/NFloat.xml b/xml/System.Runtime.InteropServices/NFloat.xml index 8c46eef3dec..5b8046aa9b5 100644 --- a/xml/System.Runtime.InteropServices/NFloat.xml +++ b/xml/System.Runtime.InteropServices/NFloat.xml @@ -2091,7 +2091,7 @@ This computes `cos(x * Ï€)`. This method correctly handles floating-point values and so `2.0` will return `true` while `2.2` will return `false`. -A return value of `false` does not imply that will return `true`. A number with a fractional portion, for example, `3.3`, is not even or odd. +A return value of `false` does not imply that will return `true`. A number with a fractional portion, for example, `3.3`, is not even or odd. ]]> @@ -2375,7 +2375,7 @@ This method correctly handles floating-point values and so `2.0` and `3.0` will This method correctly handles floating-point values and so `3.0` will return `true` while `3.3` will return `false`. -A return value of `false` does not imply that will return `true`. A number with a fractional portion, for example, `3.3`, is not even or odd. +A return value of `false` does not imply that will return `true`. A number with a fractional portion, for example, `3.3`, is not even or odd. ]]> @@ -2417,7 +2417,7 @@ A return value of `false` does not imply that will return `true`. A complex number, `a + bi` for non-zero `b`, is not positive or negative +A return value of `false` does not imply that will return `true`. A complex number, `a + bi` for non-zero `b`, is not positive or negative ]]> @@ -2880,7 +2880,7 @@ This function checks values against the extended real number line, thus returns ## Remarks -For , this method matches the IEEE 754:2019 `maximum` function. This requires NaN inputs to be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For , this method matches the IEEE 754:2019 `maximum` function. This requires NaN inputs to be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -2924,7 +2924,7 @@ For , this method matches the IEEE 754:20 ## Remarks -For , this method matches the IEEE 754:2019 `maximumMagnitude` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For , this method matches the IEEE 754:2019 `maximumMagnitude` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -2968,7 +2968,7 @@ For , this method matches the IEEE ## Remarks -For this method matches the IEEE 754:2019 `maximumMagnitudeNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For this method matches the IEEE 754:2019 `maximumMagnitudeNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3044,7 +3044,7 @@ For this method matches the IEEE ## Remarks -For this method matches the IEEE 754:2019 `maximumNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For this method matches the IEEE 754:2019 `maximumNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3116,7 +3116,7 @@ For this method matches the IEEE 754:201 ## Remarks -For , this method matches the IEEE 754:2019 `minimum` function. This requires NaN inputs to be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For , this method matches the IEEE 754:2019 `minimum` function. This requires NaN inputs to be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3160,7 +3160,7 @@ For , this method matches the IEEE 754:20 ## Remarks -For , this method matches the IEEE 754:2019 `minimumMagnitude` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For , this method matches the IEEE 754:2019 `minimumMagnitude` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3204,7 +3204,7 @@ For , this method matches the IEEE ## Remarks -For this method matches the IEEE 754:2019 `minimumMagnitudeNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For this method matches the IEEE 754:2019 `minimumMagnitudeNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3280,7 +3280,7 @@ For this method matches the IEEE ## Remarks -For this method matches the IEEE 754:2019 `minimumNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For this method matches the IEEE 754:2019 `minimumNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> diff --git a/xml/System.Runtime.InteropServices/NativeLibrary.xml b/xml/System.Runtime.InteropServices/NativeLibrary.xml index 54e787a4014..bf6a5bd58b4 100644 --- a/xml/System.Runtime.InteropServices/NativeLibrary.xml +++ b/xml/System.Runtime.InteropServices/NativeLibrary.xml @@ -211,7 +211,7 @@ Calling this method with an invalid `handle` parameter other than on the calling assembly, if any are present, are used. This method does not invoke the resolver registered using -method. Starting with .NET 5, this method does invoke the method and the event. +method. Starting with .NET 5, this method does invoke the method and the event. ]]> diff --git a/xml/System.Runtime.InteropServices/OSPlatform.xml b/xml/System.Runtime.InteropServices/OSPlatform.xml index cac4a5a2212..08336a85922 100644 --- a/xml/System.Runtime.InteropServices/OSPlatform.xml +++ b/xml/System.Runtime.InteropServices/OSPlatform.xml @@ -112,18 +112,18 @@ Creates a new instance. An object that represents the operating system. - method with the following strings is equivalent to retrieving the object from the corresponding static property: - -|osPlatform string|OSPlatform property| -|-----------------------|-------------------------| + method with the following strings is equivalent to retrieving the object from the corresponding static property: + +|osPlatform string|OSPlatform property| +|-----------------------|-------------------------| |"FREEBSD"|| -|"LINUX"|| -|"OSX"|| -|"WINDOWS"|| - +|"LINUX"|| +|"OSX"|| +|"WINDOWS"|| + ]]> @@ -199,11 +199,11 @@ if is a instance and its name is the same as the current object. - object is the `osPlatform` string passed to the method. The names of the objects returned by the static properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. - + object is the `osPlatform` string passed to the method. The names of the objects returned by the static properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. + ]]> @@ -258,11 +258,11 @@ if the current instance and are equal; otherwise, . - instances are equal if they have the same name. The name of an object is the `osPlatform` string passed to the method. The names of the objects returned by the static OSPlatform properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. - + instances are equal if they have the same name. The name of an object is the `osPlatform` string passed to the method. The names of the objects returned by the static OSPlatform properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. + ]]> @@ -440,11 +440,11 @@ if and are equal; otherwise, . - instances are equal if they have the same name. The name of an object is the `osPlatform` string passed to the method. The names of the objects returned by the static OSPlatform properties are "FREEBSD", "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. - + instances are equal if they have the same name. The name of an object is the `osPlatform` string passed to the method. The names of the objects returned by the static OSPlatform properties are "FREEBSD", "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. + ]]> @@ -587,11 +587,11 @@ Returns the string representation of this instance. A string that represents this instance. - object is the `osPlatform` string passed to the method. The names of the OSPlatform objects returned by the static OSPlatform properties are "FREEBSD", "LINUX", "OSX", and "WINDOWS". - + object is the `osPlatform` string passed to the method. The names of the OSPlatform objects returned by the static OSPlatform properties are "FREEBSD", "LINUX", "OSX", and "WINDOWS". + ]]> diff --git a/xml/System.Runtime.InteropServices/RegistrationClassContext.xml b/xml/System.Runtime.InteropServices/RegistrationClassContext.xml index ebb7a3147ab..2cdf672a662 100644 --- a/xml/System.Runtime.InteropServices/RegistrationClassContext.xml +++ b/xml/System.Runtime.InteropServices/RegistrationClassContext.xml @@ -23,13 +23,13 @@ Specifies the set of execution contexts in which a class object will be made available for requests to construct instances. - enumeration are used in the `classContext` parameter of the method. These values are the same as those defined in the COM **CLSCTX** enumeration, which is used as the `dwClsContext` parameter in calls to the COM API `CoRegisterClassObject`. - - For more information about `CoRegisterClassObject` and the **CLSCTX** enumeration, see the MSDN library. - + enumeration are used in the `classContext` parameter of the method. These values are the same as those defined in the COM **CLSCTX** enumeration, which is used as the `dwClsContext` parameter in calls to the COM API `CoRegisterClassObject`. + + For more information about `CoRegisterClassObject` and the **CLSCTX** enumeration, see the MSDN library. + ]]> diff --git a/xml/System.Runtime.InteropServices/RegistrationConnectionType.xml b/xml/System.Runtime.InteropServices/RegistrationConnectionType.xml index 1ccf50b51e1..30215e9dd85 100644 --- a/xml/System.Runtime.InteropServices/RegistrationConnectionType.xml +++ b/xml/System.Runtime.InteropServices/RegistrationConnectionType.xml @@ -23,13 +23,13 @@ Defines the types of connections to a class object. - enumeration are used in the `flags` parameter of the method. These values are the same as those defined in the COM **REGCLS** enumeration, which is used as the `flags` parameter in calls to the COM API `CoRegisterClassObject`. - - For more information about `CoRegisterClassObject` and the **REGCLS** enumeration, see the MSDN library. - + enumeration are used in the `flags` parameter of the method. These values are the same as those defined in the COM **REGCLS** enumeration, which is used as the `flags` parameter in calls to the COM API `CoRegisterClassObject`. + + For more information about `CoRegisterClassObject` and the **REGCLS** enumeration, see the MSDN library. + ]]> diff --git a/xml/System.Runtime.InteropServices/RegistrationServices.xml b/xml/System.Runtime.InteropServices/RegistrationServices.xml index ae84c4c8510..adc91b7dc5a 100644 --- a/xml/System.Runtime.InteropServices/RegistrationServices.xml +++ b/xml/System.Runtime.InteropServices/RegistrationServices.xml @@ -43,13 +43,13 @@ You can use the following methods to assist you in preparing a registration file: -- +- -- +- -- +- -- +- Although these methods help in gathering information to be used in a registration file, they do not actually produce a registration file. Instead, you can use the [Regasm.exe (Assembly Registration Tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) tool with the `/regfile` option to perform this task. methods cannot export and register a type library. To export and register a type library, you can use the [Regasm.exe (Assembly Registration Tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) tool and the [Tlbexp.exe (Type Library Exporter)](/dotnet/framework/tools/tlbexp-exe-type-library-exporter) tool. @@ -219,7 +219,7 @@ ## Remarks `RegisterAssembly` adds the appropriate registry entries for the types in the specified assembly. This method also calls any registration functions found in the assembly. - Use to get an assembly. + Use to get an assembly. ]]> @@ -296,9 +296,9 @@ method is not atomic and can cause unpredictable results when used in a multithreaded context. + This method is equivalent to calling `CoRegisterClassObject` in COM. The method is not atomic and can cause unpredictable results when used in a multithreaded context. - In version 2.0 and later, use the method to unregister a type in COM. + In version 2.0 and later, use the method to unregister a type in COM. Note that using platform invoke to call the unmanaged `CoRegisterClassObject` and `CoDisconnectObject` methods for registration and unregistration of COM objects is not supported. @@ -350,9 +350,9 @@ method is not atomic and can cause unpredictable results when used in a multithreaded context. + This method is equivalent to calling `CoRegisterClassObject` in COM. The method is not atomic and can cause unpredictable results when used in a multithreaded context. - In the .NET Framework version 2.0 and later, use the method to unregister a type in COM. + In the .NET Framework version 2.0 and later, use the method to unregister a type in COM. Note that using platform invoke to call the unmanaged `CoRegisterClassObject` and `CoDisconnectObject` methods for registration and unregistration of COM objects is not supported. @@ -474,7 +474,7 @@ . This method also calls any unregistration functions found in the assembly. + `UnregisterAssembly` removes the registry entries for the types in the specified assembly previously added by . This method also calls any unregistration functions found in the assembly. ]]> diff --git a/xml/System.Runtime.InteropServices/RuntimeEnvironment.xml b/xml/System.Runtime.InteropServices/RuntimeEnvironment.xml index 0935d6a1796..7be2a6467b1 100644 --- a/xml/System.Runtime.InteropServices/RuntimeEnvironment.xml +++ b/xml/System.Runtime.InteropServices/RuntimeEnvironment.xml @@ -151,7 +151,7 @@ method. This code example is part of a larger example provided for the class. + The following example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RuntimeEnvironment/cpp/RuntimeEnvironment.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/RuntimeEnvironment/Overview/RuntimeEnvironment.cs" id="Snippet2"::: @@ -211,7 +211,7 @@ method. This code example is part of a larger example provided for the class. + The following example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RuntimeEnvironment/cpp/RuntimeEnvironment.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/RuntimeEnvironment/Overview/RuntimeEnvironment.cs" id="Snippet3"::: @@ -294,7 +294,7 @@ The following table shows the supported combinations for `clsid` and `riid`. |CLSID_TypeNameFactory|IID_TypeNameFactory| |CLSID_CLRStrongName|IID_CLRStrongName| - is similar to the method. + is similar to the method. ]]> @@ -364,7 +364,7 @@ The following table shows the supported combinations for `clsid` and `riid`. is similar to the method. + is similar to the method. ]]> diff --git a/xml/System.Runtime.InteropServices/SEHException.xml b/xml/System.Runtime.InteropServices/SEHException.xml index f3501914829..65ac630d8fb 100644 --- a/xml/System.Runtime.InteropServices/SEHException.xml +++ b/xml/System.Runtime.InteropServices/SEHException.xml @@ -183,8 +183,8 @@ catch(…) |Property|Value| |--------------|-----------| -||A null reference (`Nothing` in Visual Basic).| -||A localized error message string.| +||A null reference (`Nothing` in Visual Basic).| +||A localized error message string.| ]]> @@ -243,8 +243,8 @@ catch(…) |Property|Value| |--------------|-----------| -||A null reference (`Nothing` in Visual Basic).| -||`message`.| +||A null reference (`Nothing` in Visual Basic).| +||`message`.| ]]> @@ -376,8 +376,8 @@ catch(…) |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> @@ -434,7 +434,7 @@ catch(…) returns `true`, then a filtered exception handler can correct the problem that caused the exception, and the code will continue from the point at which the exception was thrown. + If returns `true`, then a filtered exception handler can correct the problem that caused the exception, and the code will continue from the point at which the exception was thrown. ]]> diff --git a/xml/System.Runtime.InteropServices/SafeArrayRankMismatchException.xml b/xml/System.Runtime.InteropServices/SafeArrayRankMismatchException.xml index 3bf1ba1d284..625c610c81f 100644 --- a/xml/System.Runtime.InteropServices/SafeArrayRankMismatchException.xml +++ b/xml/System.Runtime.InteropServices/SafeArrayRankMismatchException.xml @@ -148,8 +148,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -208,8 +208,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]> @@ -341,8 +341,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/SafeArrayTypeMismatchException.xml b/xml/System.Runtime.InteropServices/SafeArrayTypeMismatchException.xml index 39e0d1183b7..cae6b997cc6 100644 --- a/xml/System.Runtime.InteropServices/SafeArrayTypeMismatchException.xml +++ b/xml/System.Runtime.InteropServices/SafeArrayTypeMismatchException.xml @@ -146,8 +146,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -206,8 +206,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]> @@ -339,8 +339,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/SafeBuffer.xml b/xml/System.Runtime.InteropServices/SafeBuffer.xml index 19f719241c6..4b3de3944ec 100644 --- a/xml/System.Runtime.InteropServices/SafeBuffer.xml +++ b/xml/System.Runtime.InteropServices/SafeBuffer.xml @@ -84,11 +84,11 @@ method before you use any instance of . To avoid races when you store an instance of a object in a static variable, you should use one of the following approaches: + You must call the method before you use any instance of . To avoid races when you store an instance of a object in a static variable, you should use one of the following approaches: - Create a lock when publishing the . -- Create a local variable, initialize the , and then assign the to the static variable, for example, by using the method. +- Create a local variable, initialize the , and then assign the to the static variable, for example, by using the method. > [!NOTE] > Assignments in a static class constructor are implicitly locked. @@ -207,11 +207,11 @@ returns, you should perform bounds checking by verifying that the `pointer` parameter is `null`. If it is not `null`, you must call the method in a constrained execution region (CER). + When returns, you should perform bounds checking by verifying that the `pointer` parameter is `null`. If it is not `null`, you must call the method in a constrained execution region (CER). - calls the method and exposes the pointer. + calls the method and exposes the pointer. - The following example demonstrates how to use the method: + The following example demonstrates how to use the method: ``` byte* pointer = null; diff --git a/xml/System.Runtime.InteropServices/SafeHandle.xml b/xml/System.Runtime.InteropServices/SafeHandle.xml index 8ea769fd566..9372e08d525 100644 --- a/xml/System.Runtime.InteropServices/SafeHandle.xml +++ b/xml/System.Runtime.InteropServices/SafeHandle.xml @@ -177,7 +177,7 @@ Optionally specify `-Fault` to intentionally attempt to leak the handle by abort is never called; thus, it is not recommended to use this parameter value as your code may leak resources. + If the `ownsHandle` parameter is `false`, is never called; thus, it is not recommended to use this parameter value as your code may leak resources. ]]> @@ -242,12 +242,12 @@ Optionally specify `-Fault` to intentionally attempt to leak the handle by abort or method allows the resources to be freed. This might not happen immediately if other threads are using the same safe handle object, but will happen as soon as that is no longer the case. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. + Calling the or method allows the resources to be freed. This might not happen immediately if other threads are using the same safe handle object, but will happen as soon as that is no longer the case. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. - Call the or method when you are finished using the object. + Call the or method when you are finished using the object. > [!NOTE] -> Always call or before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. +> Always call or before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. ]]> @@ -318,7 +318,7 @@ Optionally specify `-Fault` to intentionally attempt to leak the handle by abort method prevents the common language runtime from reclaiming memory used by a handle (which occurs when the runtime calls the method). You can use this method to manually increment the reference count on a instance. returns a Boolean value using a `ref` parameter (`success`) that indicates whether the reference count was incremented successfully. This allows your program logic to back out in case of failure. You should set `success` to `false` before calling . If `success` is `true`, avoid resource leaks by matching the call to with a corresponding call to . + The method prevents the common language runtime from reclaiming memory used by a handle (which occurs when the runtime calls the method). You can use this method to manually increment the reference count on a instance. returns a Boolean value using a `ref` parameter (`success`) that indicates whether the reference count was incremented successfully. This allows your program logic to back out in case of failure. You should set `success` to `false` before calling . If `success` is `true`, avoid resource leaks by matching the call to with a corresponding call to . If this call is successful, it will set the `ref bool success` parameter to `true` and return successfully. If this call is unsuccessful, it will throw an exception and leave the `ref bool success` parameter unmodified. @@ -393,7 +393,7 @@ If this call is successful, it will set the `ref bool success` parameter to `tru You can use this method to retrieve the actual handle value from an instance of the derived class. This method is needed for backwards compatibility because many properties in the .NET Framework return `IntPtr` handle types. `IntPtr` handle types are platform-specific types used to represent a pointer or a handle. > [!CAUTION] -> Using the method can pose security risks because, if the handle has been marked as invalid with , still returns the original, potentially stale handle value. The returned handle can also be recycled at any point. At best, this means the handle might suddenly stop working. At worst, if the handle or the resource that the handle represents is exposed to untrusted code, this can lead to a recycling security attack on the reused or returned handle. For example, an untrusted caller can query data on the handle just returned and receive information for an entirely unrelated resource. See the and the methods for more information about using the method safely. +> Using the method can pose security risks because, if the handle has been marked as invalid with , still returns the original, potentially stale handle value. The returned handle can also be recycled at any point. At best, this means the handle might suddenly stop working. At worst, if the handle or the resource that the handle represents is exposed to untrusted code, this can lead to a recycling security attack on the reused or returned handle. For example, an untrusted caller can query data on the handle just returned and receive information for an entirely unrelated resource. See the and the methods for more information about using the method safely. ]]> @@ -460,10 +460,10 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method is the counterpart to . You should always match a call to the method with a successful call to . + The method is the counterpart to . You should always match a call to the method with a successful call to . > [!CAUTION] -> In the same way that unmatched calls can cause resource leaks, unmatched calls can cause invalid handle states to become visible to other threads. +> In the same way that unmatched calls can cause resource leaks, unmatched calls can cause invalid handle states to become visible to other threads. ]]> @@ -543,12 +543,12 @@ If this call is successful, it will set the `ref bool success` parameter to `tru or method allows the resources to be freed. This might not happen immediately if other threads are using the same instance of the safe handle, but will happen as soon as that is no longer the case. Although most classes using do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, they can provide a finalizer that is guaranteed to run before the critical finalizer runs. + Calling the or method allows the resources to be freed. This might not happen immediately if other threads are using the same instance of the safe handle, but will happen as soon as that is no longer the case. Although most classes using do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, they can provide a finalizer that is guaranteed to run before the critical finalizer runs. - Call the or method when you are finished using the object. The method leaves the object in an unusable state. + Call the or method when you are finished using the object. The method leaves the object in an unusable state. > [!NOTE] -> Always call the or method before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. +> Always call the or method before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. ]]> @@ -619,7 +619,7 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method with the `disposing` parameter set to `false`. + You should never explicitly call the method with the `disposing` parameter set to `false`. ]]> @@ -682,7 +682,7 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method is the destructor for the class. Application code should not call this method directly. + The method is the destructor for the class. Application code should not call this method directly. ]]> @@ -807,11 +807,11 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method returns a value indicating whether the object's handle is no longer associated with a native resource. This differs from the definition of the property, which computes whether a given handle is always considered invalid. The method returns a `true` value in the following cases: + The method returns a value indicating whether the object's handle is no longer associated with a native resource. This differs from the definition of the property, which computes whether a given handle is always considered invalid. The method returns a `true` value in the following cases: -- The method was called. +- The method was called. -- The method or method was called and there are no references to the object on other threads. +- The method or method was called and there are no references to the object on other threads. ]]> @@ -949,11 +949,11 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method is guaranteed to be called only once and only if the handle is valid as defined by the property. Implement this method in your derived classes to execute any code that is required to free the handle. Because one of the functions of is to guarantee prevention of resource leaks, the code in your implementation of must never fail. The garbage collector calls after normal finalizers have been run for objects that were garbage collected at the same time. The garbage collector guarantees the resources to invoke this method and that the method will not be interrupted while it is in progress. + The method is guaranteed to be called only once and only if the handle is valid as defined by the property. Implement this method in your derived classes to execute any code that is required to free the handle. Because one of the functions of is to guarantee prevention of resource leaks, the code in your implementation of must never fail. The garbage collector calls after normal finalizers have been run for objects that were garbage collected at the same time. The garbage collector guarantees the resources to invoke this method and that the method will not be interrupted while it is in progress. Additionally, for simple cleanup (for example, calling the Windows API `CloseHandle` on a file handle) you can check the return value for the single platform invoke call. For complex cleanup, you may have a lot of program logic and many method calls, some of which might fail. You must ensure that your program logic has fallback code for each of those cases. - If returns `false` for any reason, it generates a [releaseHandleFailed](/dotnet/framework/debug-trace-profile/releasehandlefailed-mda) Managed Debugging Assistant when running on .NET Framework. This helps you detect cases where your attempt to release resources fails. + If returns `false` for any reason, it generates a [releaseHandleFailed](/dotnet/framework/debug-trace-profile/releasehandlefailed-mda) Managed Debugging Assistant when running on .NET Framework. This helps you detect cases where your attempt to release resources fails. ## Examples The following code example releases the handle and is part of a larger example provided for the class. @@ -1030,7 +1030,7 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method only if you need to support a pre-existing handle (for example, if the handle is returned in a structure) because the .NET Framework COM interop infrastructure does not support marshaling output handles in a structure. + Use the method only if you need to support a pre-existing handle (for example, if the handle is returned in a structure) because the .NET Framework COM interop infrastructure does not support marshaling output handles in a structure. ]]> @@ -1097,9 +1097,9 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method only when you know that your handle no longer references a resource. Doing so does not change the value of the field; it only marks the handle as closed. The handle might then contain a potentially stale value. The effect of this call is that no attempt is made to free the resources. + Call the method only when you know that your handle no longer references a resource. Doing so does not change the value of the field; it only marks the handle as closed. The handle might then contain a potentially stale value. The effect of this call is that no attempt is made to free the resources. - As with the method, use only if you need to support a pre-existing handle. + As with the method, use only if you need to support a pre-existing handle. ]]> diff --git a/xml/System.Runtime.InteropServices/TypeIdentifierAttribute.xml b/xml/System.Runtime.InteropServices/TypeIdentifierAttribute.xml index 4f4fd0e7173..47a9e777364 100644 --- a/xml/System.Runtime.InteropServices/TypeIdentifierAttribute.xml +++ b/xml/System.Runtime.InteropServices/TypeIdentifierAttribute.xml @@ -73,7 +73,7 @@ - For types that don't have GUIDs in their type library, it has a constructor that takes two strings (`scope` and `identifier`). These are combined into a GUID and become the key that is used for type equivalence. - Type equivalence is discussed in the topic. + Type equivalence is discussed in the topic. ]]> diff --git a/xml/System.Runtime.InteropServices/TypeLibExporterFlags.xml b/xml/System.Runtime.InteropServices/TypeLibExporterFlags.xml index d0ded6dec90..55fc5ed7a4f 100644 --- a/xml/System.Runtime.InteropServices/TypeLibExporterFlags.xml +++ b/xml/System.Runtime.InteropServices/TypeLibExporterFlags.xml @@ -32,11 +32,11 @@ Indicates how a type library should be produced. - . - + . + ]]> diff --git a/xml/System.Runtime.InteropServices/TypeLibImporterFlags.xml b/xml/System.Runtime.InteropServices/TypeLibImporterFlags.xml index 7aadd12dff0..f97d9ae40e5 100644 --- a/xml/System.Runtime.InteropServices/TypeLibImporterFlags.xml +++ b/xml/System.Runtime.InteropServices/TypeLibImporterFlags.xml @@ -35,7 +35,7 @@ method. + This enumeration is used with the method. ]]> diff --git a/xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml b/xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml index 0dd97f8c312..1a92d7e6212 100644 --- a/xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml +++ b/xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml @@ -43,9 +43,9 @@ Types used in a managed-to-unmanaged interop operation can use is specified with a flag that preserves constructors for the storage location. -- Calls to with a constant string representing the type name when is specified with a flag that preserves constructors. +- Calls to with a constant string representing the type name when is specified with a flag that preserves constructors. - The type of a method argument to the `newobj` instruction. -- The generic argument to the method. +- The generic argument to the method. - The argument to the `box` instruction. - The argument to the `newarr` instruction. - The argument to the `mkrefany` instruction. diff --git a/xml/System.Runtime.InteropServices/TypeMapAttribute`1.xml b/xml/System.Runtime.InteropServices/TypeMapAttribute`1.xml index fa73e68b313..ff7f57f30ab 100644 --- a/xml/System.Runtime.InteropServices/TypeMapAttribute`1.xml +++ b/xml/System.Runtime.InteropServices/TypeMapAttribute`1.xml @@ -57,8 +57,8 @@ When an application is trimmed, an entry in the External Type Map is included wh - The argument to the `newarr` instruction. - The type of a method argument to the `newobj` instruction if it's a class type. - The owning type of an instance method argument to `call` or `ldftn`, or the owning type of any method argument to `callvirt` or `ldvirtftn`. If the owning type is an interface and the trimming tool can determine that there's only one implementation of the interface, it's free to interpret the method token argument as though it's the method on the only implementing type. -- The generic argument to the method. -- Calls to with a constant string representing the type name. +- The generic argument to the method. +- Calls to with a constant string representing the type name. Many of these instructions can be passed a generic parameter. In that case, the trimming tool should consider type arguments of instantiations of that type as having met one of these rules and include any entries with those types as "trim target" types. diff --git a/xml/System.Runtime.InteropServices/UCOMITypeInfo.xml b/xml/System.Runtime.InteropServices/UCOMITypeInfo.xml index 7ae28a9ddd0..bcd5af090bd 100644 --- a/xml/System.Runtime.InteropServices/UCOMITypeInfo.xml +++ b/xml/System.Runtime.InteropServices/UCOMITypeInfo.xml @@ -30,11 +30,11 @@ Use instead. - @@ -67,11 +67,11 @@ On successful return, a reference to the member. Retrieves the addresses of static functions or variables, such as those defined in a DLL. - @@ -104,11 +104,11 @@ On successful return, a reference to the created object. Creates a new instance of a type that describes a component class (coclass). - @@ -139,11 +139,11 @@ On successful return, a reference to the index of the type description within the containing type library. Retrieves the type library that contains this type description and its index within that type library. - @@ -180,11 +180,11 @@ If not , and the function is defined by an ordinal, then lpwOrdinal is set to point to the ordinal. Retrieves a description or specification of an entry point for a function in a DLL. - @@ -221,11 +221,11 @@ On successful return, the fully qualified name of the Help file. Retrieves the documentation string, the complete Help file name and path, and the context ID for the Help topic for a specified type description. - @@ -256,13 +256,13 @@ Reference to a that describes the specified function. Retrieves the structure that contains information about a specified function. - . - - For additional information about `ITypeInfo::GetFuncDesc`, see the MSDN Library. - + . + + For additional information about `ITypeInfo::GetFuncDesc`, see the MSDN Library. + ]]> @@ -295,11 +295,11 @@ Reference to an array in which name mappings are placed. Maps between member names and member IDs, and parameter names and parameter IDs. - @@ -330,11 +330,11 @@ On successful return, a reference to the enumeration. Retrieves the value for one implemented interface or base interface in a type description. - @@ -365,11 +365,11 @@ A reference to the opcode string used in marshaling the fields of the structure described by the referenced type description, or returns if there is no information to return. Retrieves marshaling information. - @@ -404,11 +404,11 @@ On successful return, the number of names in the array. Retrieves the variable with the specified member ID (or the name of the property or method and its parameters) that correspond to the specified function ID. - @@ -439,11 +439,11 @@ On successful return, the referenced type description. If a type description references other type descriptions, it retrieves the referenced type descriptions. - @@ -474,11 +474,11 @@ Reference to a handle for the implemented interface. If a type description describes a COM class, it retrieves the type description of the implemented interface types. - @@ -507,13 +507,13 @@ On successful return, a reference to the structure that contains the attributes of this type description. Retrieves a structure that contains the attributes of the type description. - . - - For additional information about `ITypeInfo::GetTypeAttr`, see the MSDN Library. - + . + + For additional information about `ITypeInfo::GetTypeAttr`, see the MSDN Library. + ]]> @@ -542,11 +542,11 @@ On successful return, a reference to the of the containing type library. Retrieves the interface for the type description, which enables a client compiler to bind to the type description's members. - @@ -577,13 +577,13 @@ On successful return, a reference to the that describes the specified variable. Retrieves a structure that describes the specified variable. - . - - For additional information about `ITypeInfo::GetVarDesc`, see the MSDN Library. - + . + + For additional information about `ITypeInfo::GetVarDesc`, see the MSDN Library. + ]]> @@ -624,22 +624,22 @@ If returns , indicates the index within rgvarg of the argument with incorrect type. If more than one argument returns an error, indicates only the first argument with an error. Invokes a method, or accesses a property of an object, that implements the interface described by the type description. - . - - Valid values for `wFlags` are: - -|Value|Description| -|-----------|-----------------| -|DISPATCH_METHOD|The member is accessed as a method. If there is ambiguity, both this and the `DISPATCH_PROPERTYGET` flag can be set.| -|DISPATCH_PROPERTYGET|The member is retrieved as a property or data member.| -|DISPATCH_PROPERTYPUT|The member is changed as a property or data member.| -|DISPATCH_PROPERTYPUTREF|The member is changed by using a reference assignment, rather than a value assignment. This value is only valid when the property accepts a reference to an object.| - - For additional information about `ITypeInfo::Invoke`, see the MSDN Library. - + . + + Valid values for `wFlags` are: + +|Value|Description| +|-----------|-----------------| +|DISPATCH_METHOD|The member is accessed as a method. If there is ambiguity, both this and the `DISPATCH_PROPERTYGET` flag can be set.| +|DISPATCH_PROPERTYGET|The member is retrieved as a property or data member.| +|DISPATCH_PROPERTYPUT|The member is changed as a property or data member.| +|DISPATCH_PROPERTYPUTREF|The member is changed by using a reference assignment, rather than a value assignment. This value is only valid when the property accepts a reference to an object.| + + For additional information about `ITypeInfo::Invoke`, see the MSDN Library. + ]]> @@ -668,11 +668,11 @@ Reference to the to release. Releases a previously returned by . - @@ -701,11 +701,11 @@ Reference to the to release. Releases a previously returned by . - @@ -734,11 +734,11 @@ Reference to the to release. Releases a previously returned by . - diff --git a/xml/System.Runtime.InteropServices/UCOMITypeLib.xml b/xml/System.Runtime.InteropServices/UCOMITypeLib.xml index 6d30b237bcc..fc224ed07c3 100644 --- a/xml/System.Runtime.InteropServices/UCOMITypeLib.xml +++ b/xml/System.Runtime.InteropServices/UCOMITypeLib.xml @@ -42,11 +42,11 @@ Use instead. - @@ -80,18 +80,18 @@ A hash value to speed up the search, computed by the function. If is 0, a value is computed. On successful return, an array of pointers to the type descriptions that contain the name specified in . An array of the 's of the found items; [i] is the that indexes into the type description specified by [i]. Cannot be . - On entry, indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. - + On entry, indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. + On exit, indicates the number of instances that were found. If the and values of are identical, there might be more type descriptions that contain the name. Finds occurrences of a type description in a type library. - @@ -139,11 +139,11 @@ Returns a string that contains the fully qualified name of the Help file. Retrieves the library's documentation string, the complete Help file name and path, and the context identifier for the library Help topic in the Help file. - @@ -183,13 +183,13 @@ On successful return, a structure that contains the library's attributes. Retrieves the structure that contains the library's attributes. - . - - For additional information about `ITypeLib::GetTypeLibAttr`, see the MSDN Library. - + . + + For additional information about `ITypeLib::GetTypeLibAttr`, see the MSDN Library. + ]]> @@ -218,11 +218,11 @@ On successful return, an instance of a instance for this . Enables a client compiler to bind to a library's types, variables, constants, and global functions. - @@ -253,11 +253,11 @@ On successful return, a describing the type referenced by . Retrieves the specified type description in the library. - @@ -295,11 +295,11 @@ Returns the number of type descriptions in the type library. The number of type descriptions in the type library. - @@ -330,11 +330,11 @@ On successful return, the requested interface. Retrieves the type description that corresponds to the specified GUID. - @@ -370,11 +370,11 @@ A reference to the enumeration for the type description. Retrieves the type of a type description. - @@ -405,11 +405,11 @@ Reference to the enumeration for the type description. Retrieves the type of a type description. - @@ -453,11 +453,11 @@ if was found in the type library; otherwise . - @@ -497,11 +497,11 @@ The to release. Releases the originally obtained from . - diff --git a/xml/System.Runtime.InteropServices/VariantWrapper.xml b/xml/System.Runtime.InteropServices/VariantWrapper.xml index c5eb6c1c95e..5f5bc0aaeba 100644 --- a/xml/System.Runtime.InteropServices/VariantWrapper.xml +++ b/xml/System.Runtime.InteropServices/VariantWrapper.xml @@ -71,25 +71,25 @@ Marshals data of type from managed to unmanaged code. This class cannot be inherited. - is to add one level of indirection when marshaling a managed type to the corresponding `VARIANT` type. - - You can use this class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. In versions 1.0 and 1.1 of the .NET Framework, it was not possible to marshal variant data of type `VT_VARIANT | VT_BYREF` to unmanaged code. The interop marshaler passed a variant of the managed type (for example, `VT_BSTR | VT_BYREF` for , or `VT_I4 | VT_BYREF` for ), but not `VT_VARIANT | VT_BYREF`. - - One advantage of using `VT_VARIANT | VT_BYREF` variant types is that the type of data can be changed during a method call. For example, you can pass a `VT_VARIANT | VT_BYREF` variant type that contains a `VT_BSTR` and get a variant returned that contains a `VT_I4` after a method call. Because the COM interop marshaler has no way of knowing when to pass `VT_BSTR | VT_BYREF` and when to pass `VT_VARIANT | VT_BYREF`, which points to a variant that contains a `BSTR` for parameters declared as `VARIANT *`, you can instruct the marshaler by using . - - Note that early binding is not supported; you can use only when calling or with a Dispatch-only interface called in an early bound fashion. In C#, you must also use the `ref` keyword to specify `ByRef` semantics for any parameter of type . In Visual Basic, `ByRef` semantics are added automatically for every implicit late binding call. Also note that nesting objects and arrays of objects is not supported. - - - -## Examples - The following code example demonstrates how to use the class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. - + is to add one level of indirection when marshaling a managed type to the corresponding `VARIANT` type. + + You can use this class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. In versions 1.0 and 1.1 of the .NET Framework, it was not possible to marshal variant data of type `VT_VARIANT | VT_BYREF` to unmanaged code. The interop marshaler passed a variant of the managed type (for example, `VT_BSTR | VT_BYREF` for , or `VT_I4 | VT_BYREF` for ), but not `VT_VARIANT | VT_BYREF`. + + One advantage of using `VT_VARIANT | VT_BYREF` variant types is that the type of data can be changed during a method call. For example, you can pass a `VT_VARIANT | VT_BYREF` variant type that contains a `VT_BSTR` and get a variant returned that contains a `VT_I4` after a method call. Because the COM interop marshaler has no way of knowing when to pass `VT_BSTR | VT_BYREF` and when to pass `VT_VARIANT | VT_BYREF`, which points to a variant that contains a `BSTR` for parameters declared as `VARIANT *`, you can instruct the marshaler by using . + + Note that early binding is not supported; you can use only when calling or with a Dispatch-only interface called in an early bound fashion. In C#, you must also use the `ref` keyword to specify `ByRef` semantics for any parameter of type . In Visual Basic, `ByRef` semantics are added automatically for every implicit late binding call. Also note that nesting objects and arrays of objects is not supported. + + + +## Examples + The following code example demonstrates how to use the class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/VariantWrapper/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/VariantWrapper/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/VariantWrapper/Overview/sample.vb" id="Snippet1"::: + ]]> @@ -140,14 +140,14 @@ The object to marshal. Initializes a new instance of the class for the specified parameter. - class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. - + class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/VariantWrapper/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/VariantWrapper/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/VariantWrapper/Overview/sample.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.InteropServices/_Assembly.xml b/xml/System.Runtime.InteropServices/_Assembly.xml index a07e4cf140e..e6d95c9cdeb 100644 --- a/xml/System.Runtime.InteropServices/_Assembly.xml +++ b/xml/System.Runtime.InteropServices/_Assembly.xml @@ -101,7 +101,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods locate a type from this assembly and create an instance of it using the system activator. + The methods locate a type from this assembly and create an instance of it using the system activator. ]]> @@ -138,7 +138,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method locates the specified type from this assembly and creates an instance of it using the system activator, using case-sensitive search. + The method locates the specified type from this assembly and creates an instance of it using the system activator, using case-sensitive search. ]]> @@ -178,7 +178,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search. + The method locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search. ]]> @@ -228,7 +228,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search and having the specified culture, arguments, and binding and activation attributes. + The method locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search and having the specified culture, arguments, and binding and activation attributes. An example of an activation attribute for the `activationAttributes` parameter is: `URLAttribute(http://hostname/appname/objectURI)`. @@ -301,7 +301,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -421,7 +421,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get the custom attributes for this assembly. + The methods get the custom attributes for this assembly. ]]> @@ -458,7 +458,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the custom attributes for this assembly. + The method gets all the custom attributes for this assembly. ]]> @@ -497,7 +497,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the custom attributes for this assembly. + The method gets all the custom attributes for this assembly. ]]> @@ -568,7 +568,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a for the specified file in the file table of the manifest of this assembly. + The method gets a for the specified file in the file table of the manifest of this assembly. ]]> @@ -589,7 +589,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get the files in the file table of an assembly manifest. + The methods get the files in the file table of an assembly manifest. ]]> @@ -623,7 +623,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the files in the file table of an assembly manifest. + The method gets the files in the file table of an assembly manifest. ]]> @@ -661,7 +661,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the files in the file table of an assembly manifest, specifying whether to include resource modules. + The method gets the files in the file table of an assembly manifest, specifying whether to include resource modules. ]]> @@ -695,7 +695,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. ]]> @@ -716,7 +716,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get all the loaded modules that are part of this assembly. + The methods get all the loaded modules that are part of this assembly. ]]> @@ -750,7 +750,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the loaded modules that are part of this assembly. + The method gets all the loaded modules that are part of this assembly. ]]> @@ -788,7 +788,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the loaded modules that are part of this assembly, specifying whether to include resource modules. + The method gets all the loaded modules that are part of this assembly, specifying whether to include resource modules. ]]> @@ -825,7 +825,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns information about how the given resource has been persisted. + The method returns information about how the given resource has been persisted. ]]> @@ -859,7 +859,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the names of all the resources in this assembly. + The method returns the names of all the resources in this assembly. ]]> @@ -880,7 +880,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods load the specified manifest resource from this assembly. + The methods load the specified manifest resource from this assembly. ]]> @@ -917,7 +917,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method loads the specified manifest resource from this assembly. + The method loads the specified manifest resource from this assembly. ]]> @@ -956,7 +956,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method loads the specified manifest resource, scoped by the namespace of the specified type, from this assembly. + The method loads the specified manifest resource, scoped by the namespace of the specified type, from this assembly. ]]> @@ -993,7 +993,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the specified module in this assembly. + The method gets the specified module in this assembly. ]]> @@ -1014,7 +1014,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get all the modules that are part of this assembly. + The methods get all the modules that are part of this assembly. ]]> @@ -1048,7 +1048,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the modules that are part of this assembly. + The method gets all the modules that are part of this assembly. ]]> @@ -1086,7 +1086,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the modules that are part of this assembly, specifying whether to include resource modules. + The method gets all the modules that are part of this assembly, specifying whether to include resource modules. ]]> @@ -1107,7 +1107,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get an for this assembly. + The methods get an for this assembly. ]]> @@ -1141,7 +1141,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets an for this assembly. + The method gets an for this assembly. ]]> @@ -1179,7 +1179,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets an for this assembly, setting the codebase as specified by the `copiedName` parameter. + The method gets an for this assembly, setting the codebase as specified by the `copiedName` parameter. ]]> @@ -1223,7 +1223,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets serialization information with all of the data needed to reinstantiate this assembly. + The method gets serialization information with all of the data needed to reinstantiate this assembly. ]]> @@ -1257,7 +1257,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the objects for all the assemblies referenced by this assembly. + The method gets the objects for all the assemblies referenced by this assembly. ]]> @@ -1278,7 +1278,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get the satellite assembly. + The methods get the satellite assembly. ]]> @@ -1315,7 +1315,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the satellite assembly for the specified culture. + The method gets the satellite assembly for the specified culture. ]]> @@ -1354,7 +1354,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the specified version of the satellite assembly for the specified culture. + The method gets the specified version of the satellite assembly for the specified culture. ]]> @@ -1375,7 +1375,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get the object that represents the specified type. + The methods get the object that represents the specified type. ]]> @@ -1409,7 +1409,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -1446,7 +1446,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the object with the specified name in the assembly instance. + The method gets the object with the specified name in the assembly instance. ]]> @@ -1486,7 +1486,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the object with the specified name in the assembly instance and optionally throws an exception if the type is not found. + The method gets the object with the specified name in the assembly instance and optionally throws an exception if the type is not found. ]]> @@ -1529,7 +1529,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the object with the specified name in the assembly instance, with the options of ignoring the case, and of throwing an exception if the type is not found. + The method gets the object with the specified name in the assembly instance, with the options of ignoring the case, and of throwing an exception if the type is not found. ]]> @@ -1563,7 +1563,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the types defined in this assembly. + The method gets the types defined in this assembly. ]]> @@ -1637,7 +1637,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method indicates whether a custom attribute identified by the specified is defined. + The method indicates whether a custom attribute identified by the specified is defined. ]]> @@ -1658,7 +1658,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The members load the module internal to this assembly. + The members load the module internal to this assembly. ]]> @@ -1697,7 +1697,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. + The method loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. ]]> @@ -1738,7 +1738,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. The raw bytes representing the symbols for the module are also loaded. + The method loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. The raw bytes representing the symbols for the module are also loaded. ]]> @@ -1847,7 +1847,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the full name of the assembly, also known as the display name. + The method returns the full name of the assembly, also known as the display name. ]]> diff --git a/xml/System.Runtime.InteropServices/_ConstructorInfo.xml b/xml/System.Runtime.InteropServices/_ConstructorInfo.xml index 5b89ad3a7eb..aeb216af496 100644 --- a/xml/System.Runtime.InteropServices/_ConstructorInfo.xml +++ b/xml/System.Runtime.InteropServices/_ConstructorInfo.xml @@ -178,7 +178,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -196,7 +196,7 @@ members return all attributes applied to this member. + The members return all attributes applied to this member. ]]> @@ -232,7 +232,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -270,7 +270,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -303,7 +303,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. ]]> @@ -377,7 +377,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The member returns the flags. + The member returns the flags. ]]> @@ -410,7 +410,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the parameters of the specified method or constructor. + The method gets the parameters of the specified method or constructor. ]]> @@ -443,7 +443,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -604,7 +604,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the constructor reflected by this with the specified arguments, under the constraints of the specified . + The method invokes the constructor reflected by this with the specified arguments, under the constraints of the specified . ]]> @@ -644,7 +644,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the method or constructor represented by this object, using the specified parameters. + The method invokes the method or constructor represented by this object, using the specified parameters. ]]> @@ -686,7 +686,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. + The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. ]]> @@ -722,7 +722,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the constructor reflected by the instance that has the specified parameters, providing default values for the parameters not commonly used. + The method invokes the constructor reflected by the instance that has the specified parameters, providing default values for the parameters not commonly used. ]]> @@ -860,7 +860,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The member indicates whether one or more instances of `attributeType` is applied to this member. + The member indicates whether one or more instances of `attributeType` is applied to this member. ]]> diff --git a/xml/System.Runtime.InteropServices/_EventInfo.xml b/xml/System.Runtime.InteropServices/_EventInfo.xml index d8cbde45af4..2c5cf5befed 100644 --- a/xml/System.Runtime.InteropServices/_EventInfo.xml +++ b/xml/System.Runtime.InteropServices/_EventInfo.xml @@ -80,7 +80,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method adds an event handler to an event source. + The method adds an event handler to an event source. ]]> @@ -181,7 +181,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -233,7 +233,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return the method used to add an event-handler delegate to the event source. + The methods return the method used to add an event-handler delegate to the event source. ]]> @@ -266,7 +266,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method used to add an event-handler delegate to the event source. + The method returns the method used to add an event-handler delegate to the event source. ]]> @@ -303,7 +303,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method retrieves the object for the method of the event and specifies whether to return non-public methods + The method retrieves the object for the method of the event and specifies whether to return non-public methods ]]> @@ -323,7 +323,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return all attributes applied to this member. + The methods return all attributes applied to this member. ]]> @@ -360,7 +360,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method retrieves the object for the method of the event and specifies whether to return non-public methods + The method retrieves the object for the method of the event and specifies whether to return non-public methods ]]> @@ -399,7 +399,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -432,7 +432,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -493,7 +493,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return the method that is called when the event is raised. + The methods return the method that is called when the event is raised. ]]> @@ -526,7 +526,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method that is called when the event is raised. + The method returns the method that is called when the event is raised. ]]> @@ -563,7 +563,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method that is called when the event is raised and specifies whether to return non-public methods. + The method returns the method that is called when the event is raised and specifies whether to return non-public methods. ]]> @@ -583,7 +583,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method used to remove an event-handler delegate from the event source. + The method returns the method used to remove an event-handler delegate from the event source. ]]> @@ -616,7 +616,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method used to remove an event-handler delegate from the event source. + The method returns the method used to remove an event-handler delegate from the event source. ]]> @@ -653,7 +653,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method retrieves the object for removing a method of the event and specifies whether to return non-public methods. + The method retrieves the object for removing a method of the event and specifies whether to return non-public methods. ]]> @@ -686,7 +686,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -843,7 +843,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method indicates whether one or more instances of the `attributeType` parameter are applied to this member. + The method indicates whether one or more instances of the `attributeType` parameter are applied to this member. ]]> @@ -1042,7 +1042,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method removes an event handler from an event source. + The method removes an event handler from an event source. ]]> diff --git a/xml/System.Runtime.InteropServices/_Exception.xml b/xml/System.Runtime.InteropServices/_Exception.xml index 6c928f9d482..a915efd39d3 100644 --- a/xml/System.Runtime.InteropServices/_Exception.xml +++ b/xml/System.Runtime.InteropServices/_Exception.xml @@ -75,7 +75,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -108,7 +108,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the that is the root cause of one or more subsequent exceptions. + The method returns the that is the root cause of one or more subsequent exceptions. ]]> @@ -141,7 +141,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -184,7 +184,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method sets the object with information about the exception. + The method sets the object with information about the exception. ]]> @@ -217,7 +217,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the runtime type of the current instance. + The method gets the runtime type of the current instance. ]]> @@ -442,7 +442,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method creates and returns a string representation of the current exception. + The method creates and returns a string representation of the current exception. ]]> diff --git a/xml/System.Runtime.InteropServices/_FieldInfo.xml b/xml/System.Runtime.InteropServices/_FieldInfo.xml index 352fab4c29b..c603d403b96 100644 --- a/xml/System.Runtime.InteropServices/_FieldInfo.xml +++ b/xml/System.Runtime.InteropServices/_FieldInfo.xml @@ -144,7 +144,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -228,7 +228,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods return all attributes applied to this member. + The methods return all attributes applied to this member. ]]> @@ -264,7 +264,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -302,7 +302,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -335,7 +335,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. ]]> @@ -409,7 +409,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -515,7 +515,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the value of a field supported by a given object. + The method returns the value of a field supported by a given object. ]]> @@ -557,7 +557,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the value of a field supported by a given object. + The method returns the value of a field supported by a given object. ]]> @@ -676,7 +676,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method indicates whether one or more instance of `attributeType` is applied to this member. + The method indicates whether one or more instance of `attributeType` is applied to this member. ]]> @@ -1155,7 +1155,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods set the value of the field for the given object to the given value. + The methods set the value of the field for the given object to the given value. ]]> @@ -1192,7 +1192,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method sets the value of the field supported by the given object. + The method sets the value of the field supported by the given object. ]]> @@ -1235,7 +1235,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method sets the value of the field supported by the given object. + The method sets the value of the field supported by the given object. ]]> @@ -1278,7 +1278,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method sets the value of the field supported by the given object. + The method sets the value of the field supported by the given object. ]]> diff --git a/xml/System.Runtime.InteropServices/_MemberInfo.xml b/xml/System.Runtime.InteropServices/_MemberInfo.xml index 68250047052..4f1d91c0a0d 100644 --- a/xml/System.Runtime.InteropServices/_MemberInfo.xml +++ b/xml/System.Runtime.InteropServices/_MemberInfo.xml @@ -116,7 +116,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -136,7 +136,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns all attributes applied to this member. + The method returns all attributes applied to this member. ]]> @@ -173,7 +173,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -212,7 +212,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -245,7 +245,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -319,7 +319,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -476,7 +476,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method indicates whether one or more instances of the `attributeType` parameter are applied to this member. + The method indicates whether one or more instances of the `attributeType` parameter are applied to this member. ]]> diff --git a/xml/System.Runtime.InteropServices/_MethodBase.xml b/xml/System.Runtime.InteropServices/_MethodBase.xml index 6421dbdd86b..7f1e320b230 100644 --- a/xml/System.Runtime.InteropServices/_MethodBase.xml +++ b/xml/System.Runtime.InteropServices/_MethodBase.xml @@ -176,7 +176,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -196,7 +196,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The members return all attributes applied to this member. + The members return all attributes applied to this member. ]]> @@ -233,7 +233,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -272,7 +272,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -305,7 +305,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -379,7 +379,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The member returns the flags. + The member returns the flags. ]]> @@ -412,7 +412,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the parameters of the specified method or constructor. + The method gets the parameters of the specified method or constructor. ]]> @@ -445,7 +445,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -535,7 +535,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods invoke the constructor reflected by the instance that has the specified parameters. + The methods invoke the constructor reflected by the instance that has the specified parameters. ]]> @@ -575,7 +575,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method invokes the method or constructor represented by this object, using the specified parameters. + The method invokes the method or constructor represented by this object, using the specified parameters. ]]> @@ -619,7 +619,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. + The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. ]]> @@ -805,7 +805,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The member indicates whether one or more instances of the `attributeType` parameter are applied to this member. + The member indicates whether one or more instances of the `attributeType` parameter are applied to this member. ]]> diff --git a/xml/System.Runtime.InteropServices/_MethodInfo.xml b/xml/System.Runtime.InteropServices/_MethodInfo.xml index b0b5c3bc28b..d520ad75b59 100644 --- a/xml/System.Runtime.InteropServices/_MethodInfo.xml +++ b/xml/System.Runtime.InteropServices/_MethodInfo.xml @@ -176,7 +176,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -209,7 +209,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the object for the method on the direct or indirect base class in which the method represented by this instance was first declared. + The method returns the object for the method on the direct or indirect base class in which the method represented by this instance was first declared. ]]> @@ -229,7 +229,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The members return all attributes applied to this member. + The members return all attributes applied to this member. ]]> @@ -266,7 +266,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -305,7 +305,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -338,7 +338,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -412,7 +412,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The member returns the flags. + The member returns the flags. ]]> @@ -445,7 +445,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the parameters of the specified method or constructor. + The method gets the parameters of the specified method or constructor. ]]> @@ -478,7 +478,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -568,7 +568,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods invoke the constructor reflected by the instance that has the specified parameters. + The methods invoke the constructor reflected by the instance that has the specified parameters. ]]> @@ -606,7 +606,7 @@ method invokes the method or constructor represented by this object, using the specified parameters. + The method invokes the method or constructor represented by this object, using the specified parameters. ]]> @@ -650,7 +650,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. + The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. ]]> @@ -836,7 +836,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The member indicates whether one or more instances of the `attributeType` parameter are applied to this member. + The member indicates whether one or more instances of the `attributeType` parameter are applied to this member. ]]> diff --git a/xml/System.Runtime.InteropServices/_PropertyInfo.xml b/xml/System.Runtime.InteropServices/_PropertyInfo.xml index 285d942cdd4..a4e30f7bbc4 100644 --- a/xml/System.Runtime.InteropServices/_PropertyInfo.xml +++ b/xml/System.Runtime.InteropServices/_PropertyInfo.xml @@ -210,7 +210,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -230,7 +230,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return an array of the `get` and `set` accessors on this property. + The methods return an array of the `get` and `set` accessors on this property. ]]> @@ -263,7 +263,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array whose elements reflect the public `get`, `set`, and other accessors of the property reflected by the current instance. + The method returns an array whose elements reflect the public `get`, `set`, and other accessors of the property reflected by the current instance. ]]> @@ -300,7 +300,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array whose elements reflect the public and, if specified, non-public `get`, `set`, and other accessors of the property reflected by the current instance. + The method returns an array whose elements reflect the public and, if specified, non-public `get`, `set`, and other accessors of the property reflected by the current instance. ]]> @@ -320,7 +320,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return all attributes applied to this member. + The methods return all attributes applied to this member. ]]> @@ -357,7 +357,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -396,7 +396,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -416,7 +416,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return a object representing the `get` accessor for this property. + The methods return a object representing the `get` accessor for this property. ]]> @@ -449,7 +449,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the public `get` accessor for this property. + The method returns the public `get` accessor for this property. ]]> @@ -486,7 +486,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the public or non-public `get` accessor for this property. + The method returns the public or non-public `get` accessor for this property. ]]> @@ -519,7 +519,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -593,7 +593,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of all the index parameters for the property + The method returns an array of all the index parameters for the property ]]> @@ -613,7 +613,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return a object representing the `set` accessor for this property. + The methods return a object representing the `set` accessor for this property. ]]> @@ -646,7 +646,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the public `set` accessor for this property. + The method returns the public `set` accessor for this property. ]]> @@ -693,7 +693,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the `set` accessor for this property. + The method returns the `set` accessor for this property. ]]> @@ -726,7 +726,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -816,7 +816,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return the value of the property. + The methods return the value of the property. ]]> @@ -854,7 +854,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns a literal value associated with the property by a compiler. + The method returns a literal value associated with the property by a compiler. ]]> @@ -898,7 +898,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the value of a property having the specified binding, index, and . + The method returns the value of a property having the specified binding, index, and . ]]> @@ -985,7 +985,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method indicates whether one or more instance of the `attributeType` parameter is applied to this member. + The method indicates whether one or more instance of the `attributeType` parameter is applied to this member. ]]> @@ -1166,7 +1166,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method sets the property value for the given object to the given value. + The method sets the property value for the given object to the given value. ]]> @@ -1205,7 +1205,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method sets the value of the property with optional index values for index properties. + The method sets the value of the property with optional index values for index properties. ]]> @@ -1250,7 +1250,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method sets the property value for the given object to the given value. + The method sets the property value for the given object to the given value. ]]> diff --git a/xml/System.Runtime.InteropServices/_Type.xml b/xml/System.Runtime.InteropServices/_Type.xml index 6ac459fbe3d..4224e70255d 100644 --- a/xml/System.Runtime.InteropServices/_Type.xml +++ b/xml/System.Runtime.InteropServices/_Type.xml @@ -223,7 +223,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines if the underlying system type of the current is the same as the underlying system type of the specified or . + The method determines if the underlying system type of the current is the same as the underlying system type of the specified or . . @@ -262,7 +262,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines if the underlying system type of the current is the same as the underlying system type of the specified . + The method determines if the underlying system type of the current is the same as the underlying system type of the specified . ]]> @@ -299,7 +299,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines if the underlying system type of the current is the same as the underlying system type of the specified . + The method determines if the underlying system type of the current is the same as the underlying system type of the specified . ]]> @@ -341,7 +341,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array of objects representing a filtered list of interfaces implemented or inherited by the current . + The method returns an array of objects representing a filtered list of interfaces implemented or inherited by the current . ]]> @@ -393,7 +393,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns a filtered array of objects of the specified member type. + The method returns a filtered array of objects of the specified member type. ]]> @@ -458,7 +458,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the number of dimensions in an . + The method gets the number of dimensions in an . ]]> @@ -478,7 +478,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific constructor of the current . + The method gets a specific constructor of the current . ]]> @@ -518,7 +518,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for a public instance constructor whose parameters match the types in the specified array. + The method searches for a public instance constructor whose parameters match the types in the specified array. ]]> @@ -576,7 +576,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints. + The method searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints. ]]> @@ -632,7 +632,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention. + The method searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention. ]]> @@ -652,7 +652,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the constructors of the current . + The method gets the constructors of the current . ]]> @@ -685,7 +685,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public constructors defined for the current . + The method returns all the public constructors defined for the current . ]]> @@ -725,7 +725,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the constructors defined for the current , using the specified . + The method searches for the constructors defined for the current , using the specified . ]]> @@ -745,7 +745,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all attributes applied to this member. + The method returns all attributes applied to this member. ]]> @@ -781,7 +781,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all attributes applied to this member. + The method returns all attributes applied to this member. ]]> @@ -819,7 +819,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all attributes applied to this member. + The method returns all attributes applied to this member. ]]> @@ -856,7 +856,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the members defined for the current whose is set. + The method searches for the members defined for the current whose is set. ]]> @@ -893,7 +893,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the of the object encompassed or referred to by the current array, pointer or reference type. + The method returns the of the object encompassed or referred to by the current array, pointer or reference type. ]]> @@ -913,7 +913,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific event declared or inherited by the current . + The method gets a specific event declared or inherited by the current . ]]> @@ -957,7 +957,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for events that are declared or inherited by the current , using the specified binding constraints. + The method searches for events that are declared or inherited by the current , using the specified binding constraints. ]]> @@ -999,7 +999,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the object representing the specified event, using the specified binding constraints. + The method returns the object representing the specified event, using the specified binding constraints. ]]> @@ -1019,7 +1019,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the events that are declared or inherited by the current . + The method gets the events that are declared or inherited by the current . ]]> @@ -1056,7 +1056,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public events that are declared or inherited by the current . + The method returns all the public events that are declared or inherited by the current . ]]> @@ -1100,7 +1100,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for events that are declared or inherited by the current , using the specified binding constraints. + The method searches for events that are declared or inherited by the current , using the specified binding constraints. ]]> @@ -1120,7 +1120,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific field of the current . + The method gets a specific field of the current . ]]> @@ -1156,7 +1156,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public field with the specified name. + The method searches for the public field with the specified name. ]]> @@ -1198,7 +1198,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified field, using the specified binding constraints. + The method searches for the specified field, using the specified binding constraints. ]]> @@ -1218,7 +1218,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific field of the current . + The method gets a specific field of the current . ]]> @@ -1255,7 +1255,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public fields of the current . + The method returns all the public fields of the current . ]]> @@ -1299,7 +1299,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the fields defined for the current , using the specified binding constraints. + The method searches for the fields defined for the current , using the specified binding constraints. ]]> @@ -1332,7 +1332,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method. + The method. ]]> @@ -1393,7 +1393,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific interface implemented or inherited by the current . + The method gets a specific interface implemented or inherited by the current . ]]> @@ -1429,7 +1429,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the interface with the specified name. + The method searches for the interface with the specified name. ]]> @@ -1472,7 +1472,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified interface, specifying whether to do a case-sensitive search. + The method searches for the specified interface, specifying whether to do a case-sensitive search. ]]> @@ -1508,7 +1508,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an interface mapping for the specified interface type. + The method returns an interface mapping for the specified interface type. ]]> @@ -1545,7 +1545,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the interfaces implemented or inherited by the current . + The method gets all the interfaces implemented or inherited by the current . ]]> @@ -1565,7 +1565,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the specified members of the current . + The method gets the specified members of the current . ]]> @@ -1601,7 +1601,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public members with the specified name. + The method searches for the public members with the specified name. ]]> @@ -1643,7 +1643,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified members, using the specified binding constraints. + The method searches for the specified members, using the specified binding constraints. ]]> @@ -1687,7 +1687,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified members of the specified member type, using the specified binding constraints. + The method searches for the specified members of the specified member type, using the specified binding constraints. ]]> @@ -1707,7 +1707,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the members (properties, methods, fields, events, and so on) of the current . + The method gets the members (properties, methods, fields, events, and so on) of the current . ]]> @@ -1744,7 +1744,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public members of the current . + The method returns all the public members of the current . ]]> @@ -1788,7 +1788,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the members defined for the current , using the specified binding constraints. + The method searches for the members defined for the current , using the specified binding constraints. ]]> @@ -1808,7 +1808,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method. + The method. ]]> @@ -1844,7 +1844,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public method with the specified name. + The method searches for the public method with the specified name. ]]> @@ -1886,7 +1886,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified method, using the specified binding constraints. + The method searches for the specified method, using the specified binding constraints. ]]> @@ -1928,7 +1928,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public method whose parameters match the specified argument types. + The method searches for the specified public method whose parameters match the specified argument types. ]]> @@ -1972,7 +1972,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public method whose parameters match the specified argument types and modifiers. + The method searches for the specified public method whose parameters match the specified argument types and modifiers. ]]> @@ -2028,7 +2028,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints. + The method searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints. ]]> @@ -2086,7 +2086,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention. + The method searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention. ]]> @@ -2106,7 +2106,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the methods of the current . + The method gets the methods of the current . ]]> @@ -2143,7 +2143,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public methods of the current . + The method returns all the public methods of the current . ]]> @@ -2187,7 +2187,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the methods defined for the current , using the specified binding constraints. + The method searches for the methods defined for the current , using the specified binding constraints. ]]> @@ -2207,7 +2207,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific type nested within the current . + The method gets a specific type nested within the current . ]]> @@ -2243,7 +2243,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public nested type with the specified name. + The method searches for the public nested type with the specified name. ]]> @@ -2285,7 +2285,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified nested type, using the specified binding constraints. + The method searches for the specified nested type, using the specified binding constraints. ]]> @@ -2305,7 +2305,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the types nested within the current . + The method gets the types nested within the current . ]]> @@ -2342,7 +2342,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the types nested within the current . + The method returns all the types nested within the current . ]]> @@ -2404,7 +2404,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the properties of the current . + The method gets the properties of the current . ]]> @@ -2441,7 +2441,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public properties of the current . + The method returns all the public properties of the current . ]]> @@ -2485,7 +2485,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the properties of the current , using the specified binding constraints. + The method searches for the properties of the current , using the specified binding constraints. ]]> @@ -2505,7 +2505,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific property of the current . + The method gets a specific property of the current . ]]> @@ -2541,7 +2541,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public property with the specified name. + The method searches for the public property with the specified name. ]]> @@ -2583,7 +2583,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified property, using the specified binding constraints. + The method searches for the specified property, using the specified binding constraints. ]]> @@ -2621,7 +2621,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public property with the specified name and return type. + The method searches for the public property with the specified name and return type. ]]> @@ -2663,7 +2663,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public property whose parameters match the specified argument types. + The method searches for the specified public property whose parameters match the specified argument types. ]]> @@ -2707,7 +2707,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public property whose parameters match the specified argument types. + The method searches for the specified public property whose parameters match the specified argument types. ]]> @@ -2753,7 +2753,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public property whose parameters match the specified argument types and modifiers. + The method searches for the specified public property whose parameters match the specified argument types and modifiers. ]]> @@ -2811,7 +2811,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints. + The method searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints. ]]> @@ -2844,7 +2844,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the current . + The method gets the current . ]]> @@ -3046,7 +3046,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes a specific member of the current . + The method invokes a specific member of the current . . @@ -3104,7 +3104,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the specified member, using the specified binding constraints and matching the specified argument list. + The method invokes the specified member, using the specified binding constraints and matching the specified argument list. ]]> @@ -3166,7 +3166,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the specified member, using the specified binding constraints and matching the specified argument list and culture. + The method invokes the specified member, using the specified binding constraints and matching the specified argument list and culture. ]]> @@ -3232,7 +3232,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the specified member, using the specified binding constraints and matching the specified argument list, modifiers, and culture. + The method invokes the specified member, using the specified binding constraints and matching the specified argument list, modifiers, and culture. ]]> @@ -3603,7 +3603,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method indicates whether one or more instance of `attributeType` is applied to this member. + The method indicates whether one or more instance of `attributeType` is applied to this member. ]]> @@ -3739,7 +3739,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the specified object is an instance of the current . + The method determines whether the specified object is an instance of the current . ]]> @@ -4304,7 +4304,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the class represented by the current derives from the class represented by the specified . + The method determines whether the class represented by the current derives from the class represented by the specified . ]]> @@ -4563,7 +4563,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the name of the current . + The method returns the name of the current . ]]> diff --git a/xml/System.Runtime.Loader/AssemblyLoadContext+ContextualReflectionScope.xml b/xml/System.Runtime.Loader/AssemblyLoadContext+ContextualReflectionScope.xml index d111d69163f..be3a7404a8b 100644 --- a/xml/System.Runtime.Loader/AssemblyLoadContext+ContextualReflectionScope.xml +++ b/xml/System.Runtime.Loader/AssemblyLoadContext+ContextualReflectionScope.xml @@ -38,7 +38,7 @@ ### Remarks -This is an implementation detail of the APIs. It is a struct, to avoid heap allocation. It is required to be public to avoid boxing. +This is an implementation detail of the APIs. It is a struct, to avoid heap allocation. It is required to be public to avoid boxing. ]]> diff --git a/xml/System.Runtime.Loader/AssemblyLoadContext.xml b/xml/System.Runtime.Loader/AssemblyLoadContext.xml index 9223dd5f032..1f32a6dec7c 100644 --- a/xml/System.Runtime.Loader/AssemblyLoadContext.xml +++ b/xml/System.Runtime.Loader/AssemblyLoadContext.xml @@ -637,7 +637,7 @@ Implementations of this method can return an assembly loaded into any loads an assembly by resolving the . This triggers a full resolution. The resolution fallback sequence follows this process: + loads an assembly by resolving the . This triggers a full resolution. The resolution fallback sequence follows this process: 1. The method calls . @@ -1158,7 +1158,7 @@ The OS handle returned by this method can be used with methods of the ). +This event is raised if the native library cannot be resolved by the default resolution logic (including ). ]]> diff --git a/xml/System.Runtime.Remoting.Activation/ActivatorLevel.xml b/xml/System.Runtime.Remoting.Activation/ActivatorLevel.xml index 94e2a708894..1f9d09574e4 100644 --- a/xml/System.Runtime.Remoting.Activation/ActivatorLevel.xml +++ b/xml/System.Runtime.Remoting.Activation/ActivatorLevel.xml @@ -28,11 +28,11 @@ Defines the appropriate position for a in the chain of activators. - . Because each activator is responsible for calling the next one in the chain, an activator can position itself anywhere in the chain. The enumerator helps activators find the appropriate position in the chain. - + . Because each activator is responsible for calling the next one in the chain, an activator can position itself anywhere in the chain. The enumerator helps activators find the appropriate position in the chain. + ]]> diff --git a/xml/System.Runtime.Remoting.Activation/IActivator.xml b/xml/System.Runtime.Remoting.Activation/IActivator.xml index f4f19a81a22..639aaa914cd 100644 --- a/xml/System.Runtime.Remoting.Activation/IActivator.xml +++ b/xml/System.Runtime.Remoting.Activation/IActivator.xml @@ -98,7 +98,7 @@ is used to locate the right position in the chain when adding an activator. + The is used to locate the right position in the chain when adding an activator. ]]> diff --git a/xml/System.Runtime.Remoting.Activation/IConstructionCallMessage.xml b/xml/System.Runtime.Remoting.Activation/IConstructionCallMessage.xml index 47c90fc4043..50be5bb8840 100644 --- a/xml/System.Runtime.Remoting.Activation/IConstructionCallMessage.xml +++ b/xml/System.Runtime.Remoting.Activation/IConstructionCallMessage.xml @@ -35,7 +35,7 @@ and before the thread returns to the user code, a is sent to the remote application. When the construction message arrives at the remote application, it is processed by a remoting activator (either the default one, or one that is specified in the property) and a new object is created. The remoting application then returns a to the local application. The contains an instance of , which packages information about the remote object. The remoting infrastructure converts the instance into a proxy to the remote object, which is returned to the user code. + When the user creates an instance of a new client-activated object by calling `new` or and before the thread returns to the user code, a is sent to the remote application. When the construction message arrives at the remote application, it is processed by a remoting activator (either the default one, or one that is specified in the property) and a new object is created. The remoting application then returns a to the local application. The contains an instance of , which packages information about the remote object. The remoting infrastructure converts the instance into a proxy to the remote object, which is returned to the user code. ]]> @@ -174,7 +174,7 @@ indexer allows you to specify additional attributes to use during object activation. The user specifies the in the `activationAttributes` parameter to . + The indexer allows you to specify additional attributes to use during object activation. The user specifies the in the `activationAttributes` parameter to . ]]> @@ -211,7 +211,7 @@ contains the list of properties that were contributed by various attributes in the construction call message. These properties are used to create the context in which the server object is activated. + A new object's context is generally chosen based on metadata attributes of the class. The context selection mechanism is extensible through custom attributes, also known as static context properties, which are compiled into the class metadata. When activating an object remotely, the contains the list of properties that were contributed by various attributes in the construction call message. These properties are used to create the context in which the server object is activated. ]]> diff --git a/xml/System.Runtime.Remoting.Activation/UrlAttribute.xml b/xml/System.Runtime.Remoting.Activation/UrlAttribute.xml index 83da50cc20d..58c7ef44ca4 100644 --- a/xml/System.Runtime.Remoting.Activation/UrlAttribute.xml +++ b/xml/System.Runtime.Remoting.Activation/UrlAttribute.xml @@ -36,7 +36,7 @@ is passed in the activation attributes array as a parameter to when creating activated objects with the method. + The is passed in the activation attributes array as a parameter to when creating activated objects with the method. For more information about using attributes, see [Attributes](/dotnet/standard/attributes/). @@ -142,7 +142,7 @@ method. + This method overrides the default method. ]]> @@ -217,7 +217,7 @@ does not contribute any properties to the new context because it is used by the remoting infrastructure to force the creation of the context and the server object inside the context at the specified URL. + does not contribute any properties to the new context because it is used by the remoting infrastructure to force the creation of the context and the server object inside the context at the specified URL. ]]> diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpChannel.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpChannel.xml index 7338ebd338f..5db54a52839 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpChannel.xml @@ -50,7 +50,7 @@ Channels are used by the .NET Framework remoting infrastructure to transport remote calls. When a client makes a call to a remote object, the call is serialized into a message that is sent by a client channel and received by a server channel. It is then deserialized and processed. Any returned values are transmitted by the server channel and received by the client channel. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). @@ -253,7 +253,7 @@ is called and a is created. + The current property is used when is called and a is created. ]]> @@ -288,7 +288,7 @@ . + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . ]]> @@ -432,12 +432,12 @@ method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpClientChannel/CPP/client.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpChannel/Overview/client.cs" id="Snippet11"::: @@ -477,7 +477,7 @@ . + This method is used by . ]]> @@ -511,7 +511,7 @@ . + This property need not be set explicitly, as it is sufficient to set the ensureSecurity parameter of . ]]> @@ -626,7 +626,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpClientChannel/CPP/client.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpChannel/Overview/client.cs" id="Snippet13"::: diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpClientChannel.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpClientChannel.xml index f1497274ed8..fa46d30c473 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpClientChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpClientChannel.xml @@ -47,7 +47,7 @@ By default, the uses a SOAP formatter to serialize all messages. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). @@ -225,7 +225,7 @@ . + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . ]]> @@ -299,7 +299,7 @@ method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. @@ -448,7 +448,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpClientChannel/CPP/client.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpChannel/Overview/client.cs" id="Snippet13"::: diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandler.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandler.xml index 350ac2cc04f..c231f8d93c4 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandler.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandler.xml @@ -22,11 +22,11 @@ Implements an ASP.NET handler that forwards requests to the remoting HTTP channel. - classes, rather than conventional ASP or ASP.NET Web pages, responds to these specific requests. HTTP handlers provide a way of interacting with the low-level request and response services of the IIS Web server, and provide functionality similar to ISAPI extensions but with a simpler programming model. - + classes, rather than conventional ASP or ASP.NET Web pages, responds to these specific requests. HTTP handlers provide a way of interacting with the low-level request and response services of the IIS Web server, and provide functionality similar to ISAPI extensions but with a simpler programming model. + ]]> @@ -82,11 +82,11 @@ The constructor ignores the parameter. Initializes a new instance of the class with default values. - constructor instead. - + constructor instead. + ]]> @@ -145,11 +145,11 @@ A that provides references to the intrinsic server objects (for example, , , , and ) used to service HTTP requests. Enables processing of HTTP Web requests by the current instance. - methods, see . - + methods, see . + ]]> diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.xml index b8995bd55cb..f0c7e9810cf 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.xml @@ -22,11 +22,11 @@ Initializes new instances of the class. - class. - + class. + ]]> @@ -84,11 +84,11 @@ Returns an instance of the class. A new that processes the request. - . - + . + ]]> diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpServerChannel.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpServerChannel.xml index 41f02e4419f..d1f760d065a 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpServerChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpServerChannel.xml @@ -39,7 +39,7 @@ The accepts messages serialized in either binary or SOAP format. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for . + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for . @@ -351,7 +351,7 @@ . + Every registered channel has a unique name. This name is used to retrieve a specific channel when calling . ]]> @@ -492,7 +492,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpServerChannel/CPP/server.cpp" id="Snippet22"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpServerChannel/Overview/server.cs" id="Snippet22"::: @@ -532,12 +532,12 @@ . + The current method is used by . ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpChannel.GetUrlsFromUri/CPP/class1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpServerChannel/GetUrlsForUri/class1.cs" id="Snippet1"::: @@ -638,7 +638,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpServerChannel/CPP/server.cpp" id="Snippet25"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpServerChannel/Overview/server.cs" id="Snippet25"::: @@ -679,7 +679,7 @@ ## Remarks It is not necessary to call this method to begin listening on a newly initialized channel. - Use this method to restart listening on a channel after the method has been called to stop listening on the channel. + Use this method to restart listening on a channel after the method has been called to stop listening on the channel. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. @@ -717,7 +717,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. diff --git a/xml/System.Runtime.Remoting.Channels.Ipc/IpcChannel.xml b/xml/System.Runtime.Remoting.Channels.Ipc/IpcChannel.xml index 6b1f3088983..cf90e1a408f 100644 --- a/xml/System.Runtime.Remoting.Channels.Ipc/IpcChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Ipc/IpcChannel.xml @@ -283,7 +283,7 @@ . The default name is "ipc". + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . The default name is "ipc". @@ -371,14 +371,14 @@ method returns a channel message sink that delivers messages to either the specified URL or channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. Channel sinks provide a plug-in point that allows access to the underlying messages flowing through the channel as well as the stream used by the transport mechanism to send messages to a remote object. Channel sinks are linked together in a chain of `ChannelSinkProviders` and all channel messages flow through this chain of sinks before the message is finally serialized and transported. ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcChannel/CPP/client.cpp" id="Snippet22"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcChannel/Overview/client.cs" id="Snippet22"::: @@ -417,12 +417,12 @@ . + This method is used by . ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcChannel/CPP/server.cpp" id="Snippet19"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcChannel/Overview/server.cs" id="Snippet19"::: @@ -457,7 +457,7 @@ . + This property need not be set explicitly, as it is sufficient to set the ensureSecurity parameter of . ]]> @@ -500,7 +500,7 @@ ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcChannel/CPP/server.cpp" id="Snippet19"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcChannel/Overview/server.cs" id="Snippet19"::: @@ -540,7 +540,7 @@ ## Remarks It is not necessary to call this method to begin listening on a newly initialized channel. - Use this method to restart listening on a channel after the method has been called. + Use this method to restart listening on a channel after the method has been called. The `data` parameter can be used to pass a specific initialization state to the channel. If you do not want to pass a specific state to the channel, set `data` to `null`. @@ -577,7 +577,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. The `data` parameter can be used to pass a specific initialization state to the channel. If you do not want to pass a specific state to the channel, set `data` to `null`. diff --git a/xml/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.xml b/xml/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.xml index d16fda943b4..4668a64f6d5 100644 --- a/xml/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.xml @@ -41,7 +41,7 @@ By default, the class uses a binary formatter to serialize all messages. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for the constructor. + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for the constructor. @@ -218,7 +218,7 @@ method. The default name is "ipc client". + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling the method. The default name is "ipc client". @@ -306,12 +306,12 @@ method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. ## Examples - The following code example shows how to use the method. + The following code example shows how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcClientChannel/CPP/client.cpp" id="Snippet22"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel/.ctor/client.cs" id="Snippet22"::: @@ -378,7 +378,7 @@ method. + The following code example shows how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcClientChannel/CPP/client.cpp" id="Snippet24"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel/.ctor/client.cs" id="Snippet24"::: diff --git a/xml/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.xml b/xml/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.xml index a529a35a61a..0b039642e9d 100644 --- a/xml/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.xml @@ -41,7 +41,7 @@ The instance accepts messages serialized in either binary or SOAP format. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing an collection to the constructor). For a list of these configuration properties, see the documentation for the constructor. + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing an collection to the constructor). For a list of these configuration properties, see the documentation for the constructor. > [!CAUTION] > When setting the `exclusiveAddressUse` property to `false` in the `properties` argument, several objects can be registered for the same named pipe. In such a case requests can go to any of the channels registered. This setting is considered secure only if ALCs are also used. @@ -338,7 +338,7 @@ method. The default name is "ipc server". + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling the method. The default name is "ipc server". @@ -421,7 +421,7 @@ ## Examples - The following code example illustrates how to use the method. + The following code example illustrates how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Ipc/CPP/server.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel/Overview/server.cs" id="Snippet12"::: @@ -460,12 +460,12 @@ method. + This method is used by the method. ## Examples - The following code example shows how to use the method. + The following code example shows how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcServerChannel/CPP/server.cpp" id="Snippet19"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel/.ctor/server.cs" id="Snippet19"::: @@ -536,7 +536,7 @@ ## Examples - The following code example shows how to use the method. + The following code example shows how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcServerChannel/CPP/server.cpp" id="Snippet19"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel/.ctor/server.cs" id="Snippet19"::: @@ -576,7 +576,7 @@ ## Remarks It is not necessary to call this method to begin listening on a newly initialized channel. - Use this method to restart listening on a channel after the method has been called to stop listening on the channel. + Use this method to restart listening on a channel after the method has been called to stop listening on the channel. The data object can be used to pass a specific initialization state to the channel. If you do not want to pass a specific state to the channel, pass `null` as the `data` parameter value. @@ -614,7 +614,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. The data object can be used to pass a specific initialization state to the channel. If you do not want to pass a specific state to the channel, pass `null` as the `data` parameter value. diff --git a/xml/System.Runtime.Remoting.Channels.Tcp/TcpChannel.xml b/xml/System.Runtime.Remoting.Channels.Tcp/TcpChannel.xml index f789fbcf391..dd4f2bac117 100644 --- a/xml/System.Runtime.Remoting.Channels.Tcp/TcpChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Tcp/TcpChannel.xml @@ -49,7 +49,7 @@ To perform additional processing of messages, you can specify implementations of the and through which all messages processed by the are passed. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For more information about channel configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For more information about channel configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). ## Examples The following code example shows how to use a to set up a remoting server and its client. The example contains three parts, a server, a client, and a remote object used by the server and the client. @@ -271,7 +271,7 @@ . To set the property, assign the value to the "name" indexed property in the dictionary passed to the constructor. + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . To set the property, assign the value to the "name" indexed property in the dictionary passed to the constructor. @@ -356,7 +356,7 @@ method returns a channel message sink that delivers messages to either the specified URL or channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. Channel sinks provide a plug-in point that allows access to the underlying messages flowing through the channel as well as the stream used by the transport mechanism to send messages to a remote object. Channel sinks are linked together in a chain of `ChannelSinkProviders` and all channel messages flow through this chain of sinks before the message is finally serialized and transported. @@ -403,7 +403,7 @@ . + This method is used by . @@ -444,7 +444,7 @@ . + This property need not be set explicitly, as it is sufficient to set the ensureSecurity parameter of . ]]> @@ -530,7 +530,7 @@ ## Remarks It is not necessary to call this method to begin listening on a newly initialized channel. - Use this method to restart listening on a channel after the method has been called. + Use this method to restart listening on a channel after the method has been called. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. @@ -570,7 +570,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. diff --git a/xml/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.xml b/xml/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.xml index a9dec678114..3f67874f952 100644 --- a/xml/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.xml @@ -47,7 +47,7 @@ By default, the class uses a binary formatter to serialize all messages. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for . + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for . @@ -222,7 +222,7 @@ . + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . @@ -312,7 +312,7 @@ method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. diff --git a/xml/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.xml b/xml/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.xml index a9d507959ea..a2a583d6fd8 100644 --- a/xml/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.xml @@ -47,7 +47,7 @@ The instance accepts messages serialized in either binary or SOAP format. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). ## Examples The following code example shows the use of a remotable type. @@ -347,7 +347,7 @@ . + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . @@ -467,12 +467,12 @@ . + This method is used by . ## Examples - The following code example shows the use of the method. + The following code example shows the use of the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/TcpServerChannel.GetUrlsForUri/CPP/class1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel/GetUrlsForUri/class1.cs" id="Snippet1"::: @@ -585,7 +585,7 @@ constructor automatically calls `StartListening`, so you shouldn't call this method unless was previously called. + The constructor automatically calls `StartListening`, so you shouldn't call this method unless was previously called. Calling `StartListening` on an already listening channel may lead to unexpected behaviors and should be avoided. @@ -627,7 +627,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. diff --git a/xml/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties.xml b/xml/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties.xml index d23b7b7e97d..ec476b0befa 100644 --- a/xml/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties.xml +++ b/xml/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties.xml @@ -39,24 +39,24 @@ Provides a base implementation of a channel object that exposes a dictionary interface to its properties. - is the base class for and . - - and can be used as the base classes for channels and channel sinks that provide named properties. - - handles the complex task of asking a channel object for its properties. - - This class makes a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). - - - -## Examples + is the base class for and . + + and can be used as the base classes for channels and channel sinks that provide named properties. + + handles the complex task of asking a channel object for its properties. + + This class makes a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CommonTransportKeys/CPP/commontransportkeys.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties/Overview/commontransportkeys.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties/Overview/commontransportkeys.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties/Overview/commontransportkeys.vb" id="Snippet1"::: + ]]> @@ -85,13 +85,13 @@ Initializes a new instance of the class. - @@ -131,11 +131,11 @@ The value to add. Throws a . - is being used in this case, and because returns `true`. - + is being used in this case, and because returns `true`. + ]]> The method is called. @@ -171,11 +171,11 @@ Throws a . - is being used in this case, and because returns `true`. - + is being used in this case, and because returns `true`. + ]]> The method is called. @@ -352,11 +352,11 @@ if the number of properties that can be entered into the channel object is fixed; otherwise, . - always returns `true`. - + always returns `true`. + ]]> @@ -392,11 +392,11 @@ if the collection of properties in the channel object is read-only; otherwise, . - always returns `false`. - + always returns `false`. + ]]> @@ -432,11 +432,11 @@ if the dictionary of channel object properties is synchronized; otherwise, . - always returns `false`. - + always returns `false`. + ]]> @@ -547,11 +547,11 @@ Gets a of the channel properties associated with the channel object. A of the channel properties associated with the channel object. - The immediate caller does not have infrastructure permission. @@ -590,11 +590,11 @@ The key of the object to be removed. Throws a . - is being used in this case, and because returns `true`. - + is being used in this case, and because returns `true`. + ]]> The method is called. @@ -630,11 +630,11 @@ Gets an object that is used to synchronize access to the . An object that is used to synchronize access to the . - returns a reference to the current instance of . - + returns a reference to the current instance of . + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSink.xml b/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSink.xml index 3891a212b09..58b5d8afb35 100644 --- a/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSink.xml +++ b/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSink.xml @@ -34,7 +34,7 @@ is forwarded to all sinks in the chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. This is easily achieved by implementing the interface, which gives the impression of having a reference to the formatter sink. The real formatter sink can then be placed later in the sink chain. + The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After the formatter sink, the is forwarded to all sinks in the chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. This is easily achieved by implementing the interface, which gives the impression of having a reference to the formatter sink. The real formatter sink can then be placed later in the sink chain. |Property|Description| |--------------|-----------------| @@ -211,7 +211,7 @@ method is called by the formatter sink before it serializes the message. + The method is called by the formatter sink before it serializes the message. ]]> diff --git a/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSinkProvider.xml index 5d5b5cefd82..7b90f454456 100644 --- a/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSinkProvider.xml @@ -30,7 +30,7 @@ ## Remarks A creates client formatter sinks that use the to serialize messages for the client channel through which remoting messages flow. - The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage, the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. You can do this by implementing both the and interfaces. The formatter sink can then be placed in the sink chain later. + The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage, the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. You can do this by implementing both the and interfaces. The formatter sink can then be placed in the sink chain later. Formatter sinks use sink configuration properties to configure the channel at run time. Sink properties can be specified in a configuration file, or programmatically, inside of a . In a configuration file all values are represented by strings, but when building a property programmatically, value types can be specified with their native values or with strings. @@ -138,7 +138,7 @@ method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. + When the method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. ]]> diff --git a/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSink.xml b/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSink.xml index 7dacf9e12ef..a1f38299cfc 100644 --- a/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSink.xml +++ b/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSink.xml @@ -28,7 +28,7 @@ method, which is called by server channels to create the server channel sink chains. When the message reaches the dispatch sink, the dispatch sink passes the message to the remoting infrastructure. + The request stream propagates from the server transport sink through the server channel sinks until it reaches the appropriate formatter sink. The formatter sink deserializes the message and passes it through the pipeline. A special dispatch sink is inserted at the end of the channel sink chain by the method, which is called by server channels to create the server channel sink chains. When the message reaches the dispatch sink, the dispatch sink passes the message to the remoting infrastructure. The following table shows the sink configuration properties that can be specified for the current sink provider. @@ -228,9 +228,9 @@ interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together, which means that every message sink is responsible for calling on the next message sink after the current message sink has finished its work. For instance, a synchronization-related message sink might cause a lock to be acquired or released and delegated to the downstream message sink. + The proxy's job is to convert a method call that is invoked on it into a message. The message, which implements the interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together, which means that every message sink is responsible for calling on the next message sink after the current message sink has finished its work. For instance, a synchronization-related message sink might cause a lock to be acquired or released and delegated to the downstream message sink. - When the formatter channel sink gets a message that needs to be sent over the channel, it calls , passing the message as a parameter. The formatter sink then creates the transport header array and calls on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that will be passed back to the formatter sink. After this call returns, the message is serialized, is called on the first chain in the sink chain, and the message is passed to the channel sinks. + When the formatter channel sink gets a message that needs to be sent over the channel, it calls , passing the message as a parameter. The formatter sink then creates the transport header array and calls on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that will be passed back to the formatter sink. After this call returns, the message is serialized, is called on the first chain in the sink chain, and the message is passed to the channel sinks. After the channel sinks get the message, they can write data to the stream, add headers to the header array, and add themselves to the sink stack before forwarding the call to the next sink. When the call reaches the transport sink at the end of the chain, the transport sink sends the headers and serialized message over the channel to the server, where the process is reversed. diff --git a/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSinkProvider.xml index d339da7f2c6..9b3e525db32 100644 --- a/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSinkProvider.xml @@ -30,9 +30,9 @@ ## Remarks Channel sinks are connected to a server channel through implementations of the interface. All the remoting server channels provide constructors that take a as a parameter. - Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. + Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. - When multiple channel sink providers are provided in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers will be created when the channel is created during the call. + When multiple channel sink providers are provided in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers will be created when the channel is created during the call. Formatter sinks use sink configuration properties to configure the channel at run time. Sink properties can be specified in a configuration file, or programmatically, inside of a . In a configuration file all values are represented by strings, but when building a property programmatically, value types can be specified with their native values or with strings. diff --git a/xml/System.Runtime.Remoting.Channels/ChannelServices.xml b/xml/System.Runtime.Remoting.Channels/ChannelServices.xml index 2e727cf5753..9c051beb36c 100644 --- a/xml/System.Runtime.Remoting.Channels/ChannelServices.xml +++ b/xml/System.Runtime.Remoting.Channels/ChannelServices.xml @@ -31,7 +31,7 @@ ## Remarks Channels transport messages between applications across such remoting boundaries as application domains, processes, and computers. These crossings can be inbound and outbound. A channel can listen on an endpoint for inbound messages, send to an endpoint for outbound messages, or both. This provides an extensibility point in the runtime to plug in a wide range of protocols, even though the runtime might not be at the other end of the channel. Run-time objects can be used to expose a wide range of semantics and entities. The channel provides the extensibility point to convert the messages to and from the specific protocols. - Channels must expose the interface, which provides informational properties such as the and . Channels are registered using the method. Channels can also be loaded from the remoting configuration. (See [\ Element (Template)](https://msdn.microsoft.com/library/73399d48-f0fd-46e9-828b-6cdafde5ffce) for details.) + Channels must expose the interface, which provides informational properties such as the and . Channels are registered using the method. Channels can also be loaded from the remoting configuration. (See [\ Element (Template)](https://msdn.microsoft.com/library/73399d48-f0fd-46e9-828b-6cdafde5ffce) for details.) On the client side, messages are handed off to the client channel sink chain after they traverse the client chain. The first channel sink is typically a , which serializes the message into a stream that is passed down the channel sink chain to the client transport sink. The client transport sink then writes this stream out to the wire. @@ -334,9 +334,9 @@ [!NOTE] -> is obsolete. Please use instead. +> is obsolete. Please use instead. - The method takes in the interface from a channel object. The channel's must be unique, or the channel must be anonymous. A channel is anonymous if the is set to either `null` or by using the `name` configuration property. + The method takes in the interface from a channel object. The channel's must be unique, or the channel must be anonymous. A channel is anonymous if the is set to either `null` or by using the `name` configuration property. You cannot register two channels with the same name in a . By default, the name of a is "http" and the name of a is "tcp." Therefore, if you want to register two channels of the same type, you must specify a different name for one of them through configuration properties. @@ -384,7 +384,7 @@ method receives the interface from a channel object. The channel's must be unique, or the channel must be anonymous. A channel is anonymous if the is set to either `null` or by using the `name` configuration property. + The method receives the interface from a channel object. The channel's must be unique, or the channel must be anonymous. A channel is anonymous if the is set to either `null` or by using the `name` configuration property. You cannot register two channels with the same name in a . By default, the name of a is "http" and the name of a is "tcp". Therefore, if you want to register two channels of the same type, you must specify a different name for one of them through configuration properties. diff --git a/xml/System.Runtime.Remoting.Channels/ClientChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/ClientChannelSinkStack.xml index ccba7b148ad..091705be802 100644 --- a/xml/System.Runtime.Remoting.Channels/ClientChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/ClientChannelSinkStack.xml @@ -36,11 +36,11 @@ Holds the stack of client channel sinks that must be invoked during an asynchronous message response decoding. - @@ -132,11 +132,11 @@ The stream that is returning from the transport sink. Requests asynchronous processing of a method call on the sinks that are in the current sink stack. - method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see . - + method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see . + ]]> The current sink stack is empty. @@ -175,11 +175,11 @@ The exception to dispatch to the server. Dispatches the specified exception on the reply sink. - method dispatches the specified exception to the server through the reply sink that is specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the exception is not transmitted, and no new exception is thrown. - + method dispatches the specified exception to the server through the reply sink that is specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the exception is not transmitted, and no new exception is thrown. + ]]> @@ -217,11 +217,11 @@ The to dispatch. Dispatches the specified reply message on the reply sink. - method dispatches the specified message to the server through the reply sink that is specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the message is not transmitted, and no new exception is thrown. - + method dispatches the specified message to the server through the reply sink that is specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the message is not transmitted, and no new exception is thrown. + ]]> @@ -298,11 +298,11 @@ Information generated on the request side that is needed on the response side. Pushes the specified sink and information that is associated with it onto the sink stack. - method on the corresponding sink. - + method on the corresponding sink. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/IAuthorizeRemotingConnection.xml b/xml/System.Runtime.Remoting.Channels/IAuthorizeRemotingConnection.xml index c1332949bc9..45633b5cd2a 100644 --- a/xml/System.Runtime.Remoting.Channels/IAuthorizeRemotingConnection.xml +++ b/xml/System.Runtime.Remoting.Channels/IAuthorizeRemotingConnection.xml @@ -14,11 +14,11 @@ The interface provides methods that indicate whether a client is authorized to connect on the current channel, based on the client's network address and user identity. - interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. - + interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. + ]]> @@ -48,11 +48,11 @@ if the network address of the client is authorized; otherwise, . - interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. - + interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. + ]]> @@ -82,11 +82,11 @@ if the user identity of the client is authorized; otherwise, . - interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. - + interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/IChannel.xml b/xml/System.Runtime.Remoting.Channels/IChannel.xml index 58b600ce70b..7c4346a5608 100644 --- a/xml/System.Runtime.Remoting.Channels/IChannel.xml +++ b/xml/System.Runtime.Remoting.Channels/IChannel.xml @@ -22,17 +22,17 @@ Provides conduits for messages that cross remoting boundaries. - s, s, processes, or computers. An application can cross these boundaries only by using channels. These crossings can be inbound and outbound. A channel can listen on an endpoint for inbound messages, send to an endpoint for outbound messages, or both. This provides an extensibility point in the runtime to plug in a wide range protocols, even though the runtime might not be at the other end of the channel. - - Run-time objects can be used to represent a wide and rich set of semantics and entities. The channel provides the extensibility point to convert the messages to and from the specific protocols. If there are runtimes at both ends of the channel, a virtual channel is created between the two ends, in order to connect the client and server sink chains on either side of the boundary. - - The client part of the channel is located at the end of a client context sink chain. The server part of the channel is located at the start of the server context sink chain. Messages are delivered to the client channel using the interface, travel through the channel, and are then received by the server channel. The server channel delivers the message to the first server context sink. - - Channels must expose the interface, which provides informational properties such as the and properties. Channels can be registered using the method. - + s, s, processes, or computers. An application can cross these boundaries only by using channels. These crossings can be inbound and outbound. A channel can listen on an endpoint for inbound messages, send to an endpoint for outbound messages, or both. This provides an extensibility point in the runtime to plug in a wide range protocols, even though the runtime might not be at the other end of the channel. + + Run-time objects can be used to represent a wide and rich set of semantics and entities. The channel provides the extensibility point to convert the messages to and from the specific protocols. If there are runtimes at both ends of the channel, a virtual channel is created between the two ends, in order to connect the client and server sink chains on either side of the boundary. + + The client part of the channel is located at the end of a client context sink chain. The server part of the channel is located at the start of the server context sink chain. Messages are delivered to the client channel using the interface, travel through the channel, and are then received by the server channel. The server channel delivers the message to the first server context sink. + + Channels must expose the interface, which provides informational properties such as the and properties. Channels can be registered using the method. + ]]> @@ -64,13 +64,13 @@ Gets the name of the channel. The name of the channel. - The immediate caller does not have infrastructure permission. @@ -103,22 +103,22 @@ Gets the priority of the channel. An integer that indicates the priority of the channel. - . - - For server channels, the priority indicates the order in which their channel data will appear in a , which in turn affects the order in which clients will try to connect to the server object. If the server is listening on an HTTP channel with priority 50 and a TCP channel with priority 25 and the client has registered both an HTTP and TCP channel, then the client will use the HTTP channel to talk to the server. - - - -## Examples + . + + For server channels, the priority indicates the order in which their channel data will appear in a , which in turn affects the order in which clients will try to connect to the server object. If the server is listening on an HTTP channel with priority 50 and a TCP channel with priority 25 and the client has registered both an HTTP and TCP channel, then the client will use the HTTP channel to talk to the server. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpServerChannel_Server_Client/CPP/httpclientchannel_6_client.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannel/ChannelName/httpclientchannel_6_client.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannel/ChannelName/httpclientchannel_6_client.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannel/ChannelName/httpclientchannel_6_client.vb" id="Snippet5"::: + ]]> The immediate caller does not have infrastructure permission. @@ -163,13 +163,13 @@ Returns the object URI as an out parameter, and the URI of the current channel as the return value. The URI of the current channel, or if the URI does not belong to this channel. - The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IChannelReceiver.xml b/xml/System.Runtime.Remoting.Channels/IChannelReceiver.xml index 08076ec7865..d3f86a04bb5 100644 --- a/xml/System.Runtime.Remoting.Channels/IChannelReceiver.xml +++ b/xml/System.Runtime.Remoting.Channels/IChannelReceiver.xml @@ -26,18 +26,18 @@ Provides required functions and properties for the receiver channels. - interface. - - - -## Examples + interface. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IChannelReceiver_StartListening_ChannelData/CPP/ichannelreceiver_channeldata_server.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.vb" id="Snippet1"::: + ]]> @@ -69,11 +69,11 @@ Gets the channel-specific data. The channel data. - is called and a is created. - + is called and a is created. + ]]> The immediate caller does not have infrastructure permission. @@ -110,18 +110,18 @@ Returns an array of all the URLs for a URI. An array of the URLs. - method. - - - -## Examples + method. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IChannelReceiver_StartListening_ChannelData/CPP/ichannelreceiver_channeldata_server.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.vb" id="Snippet3"::: + ]]> The immediate caller does not have infrastructure permission. @@ -157,18 +157,18 @@ Optional initialization information. Instructs the current channel to start listening for requests. - The immediate caller does not have infrastructure permission. @@ -204,18 +204,18 @@ Optional state information for the channel. Instructs the current channel to stop listening for requests. - The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IChannelSender.xml b/xml/System.Runtime.Remoting.Channels/IChannelSender.xml index 3be34a5bf84..1e4e000624f 100644 --- a/xml/System.Runtime.Remoting.Channels/IChannelSender.xml +++ b/xml/System.Runtime.Remoting.Channels/IChannelSender.xml @@ -26,21 +26,21 @@ Provides required functions and properties for the sender channels. - interface. - - - -## Examples + The sending side of channels must expose the interface. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IChannelSender/CPP/ichannelsender_2_client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.vb" id="Snippet1"::: + ]]> @@ -80,18 +80,18 @@ Returns a channel message sink that delivers messages to the specified URL or channel data object. A channel message sink that delivers messages to the specified URL or channel data object, or if the channel cannot connect to the given endpoint. - method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, the `remoteChannelData` parameter is used as a target for the sink. Either the `url` parameter or the `remoteChannelData` parameter can be `null`, but not both. - - - -## Examples + method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, the `remoteChannelData` parameter is used as a target for the sink. Either the `url` parameter or the `remoteChannelData` parameter can be `null`, but not both. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IChannelSender/CPP/ichannelsender_2_client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.vb" id="Snippet1"::: + ]]> The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IClientChannelSink.xml b/xml/System.Runtime.Remoting.Channels/IClientChannelSink.xml index 3c4a5619883..b281c9742e3 100644 --- a/xml/System.Runtime.Remoting.Channels/IClientChannelSink.xml +++ b/xml/System.Runtime.Remoting.Channels/IClientChannelSink.xml @@ -179,7 +179,7 @@ method is called by the formatter sink before it serializes the message. + The method is called by the formatter sink before it serializes the message. diff --git a/xml/System.Runtime.Remoting.Channels/IClientChannelSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/IClientChannelSinkProvider.xml index 8c9fe47e959..80c295479ba 100644 --- a/xml/System.Runtime.Remoting.Channels/IClientChannelSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/IClientChannelSinkProvider.xml @@ -22,25 +22,25 @@ Creates client channel sinks for the client channel through which remoting messages flow. - interface. All the remoting client channels provide constructors that take a as a parameter. - - Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. - - When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers will be created when the channel is created during the call. - - - -## Examples - The following code example illustrates an implementation of this interface. - + interface. All the remoting client channels provide constructors that take a as a parameter. + + Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. + + When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers will be created when the channel is created during the call. + + + +## Examples + The following code example illustrates an implementation of this interface. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Sinks/CPP/clientsink.cpp" id="Snippet30"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/clientsink.cs" id="Snippet30"::: - - See the interface documentation for an example of the corresponding client sink implementation. - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/clientsink.cs" id="Snippet30"::: + + See the interface documentation for an example of the corresponding client sink implementation. + ]]> @@ -80,19 +80,19 @@ Creates a sink chain. The first sink of the newly formed channel sink chain, or , which indicates that this provider will not or cannot provide a connection for this endpoint. - method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. - - - -## Examples - The following code example illustrates an implementation of this method. - + method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. + + + +## Examples + The following code example illustrates an implementation of this method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Sinks/CPP/clientsink.cpp" id="Snippet33"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/clientsink.cs" id="Snippet33"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/clientsink.cs" id="Snippet33"::: + ]]> The immediate caller does not have infrastructure permission. @@ -129,14 +129,14 @@ Gets or sets the next sink provider in the channel sink provider chain. The next sink provider in the channel sink provider chain. - The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IClientChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/IClientChannelSinkStack.xml index 665b4b53996..11410de2999 100644 --- a/xml/System.Runtime.Remoting.Channels/IClientChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/IClientChannelSinkStack.xml @@ -26,15 +26,15 @@ Provides functionality for a stack of client channel sinks that must be invoked during an asynchronous message response decoding. - is used during processing of responses to asynchronous calls. - - During a synchronous call, the method is called when a message is outbound to the server. Each sink in the sink chain calls the method on the next sink until the call reaches the transport sink at the end of the chain. From there the message is transported to the server. - - When the formatter sink is called through the method, it dispatches the call asynchronously by calling on the next channel sink. A stack of reply sinks is needed to process the response. Any sink that wants to process the response needs to push itself to the client channel sink stack inside of . - + is used during processing of responses to asynchronous calls. + + During a synchronous call, the method is called when a message is outbound to the server. Each sink in the sink chain calls the method on the next sink until the call reaches the transport sink at the end of the chain. From there the message is transported to the server. + + When the formatter sink is called through the method, it dispatches the call asynchronously by calling on the next channel sink. A stack of reply sinks is needed to process the response. Any sink that wants to process the response needs to push itself to the client channel sink stack inside of . + ]]> @@ -106,11 +106,11 @@ Information generated on the request side that is needed on the response side. Pushes the specified sink and information associated with it onto the sink stack. - method on the corresponding sink. - + method on the corresponding sink. + ]]> The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IClientResponseChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/IClientResponseChannelSinkStack.xml index 34e90636502..3e29e3440cd 100644 --- a/xml/System.Runtime.Remoting.Channels/IClientResponseChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/IClientResponseChannelSinkStack.xml @@ -56,11 +56,11 @@ The stream coming back from the transport sink. Requests asynchronous processing of a method call on the sinks in the current sink stack. - method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see . - + method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see . + ]]> The current sink stack is empty. @@ -97,11 +97,11 @@ The exception to dispatch to the server. Dispatches the specified exception on the reply sink. - method dispatches the specified exception to the server through the reply sink specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the exception is not transmitted, and no new exception is thrown. - + method dispatches the specified exception to the server through the reply sink specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the exception is not transmitted, and no new exception is thrown. + ]]> The immediate caller does not have infrastructure permission. @@ -137,11 +137,11 @@ The to dispatch. Dispatches the specified reply message on the reply sink. - method dispatches the specified message to the server through the reply sink specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the message is not transmitted, and no new exception is thrown. - + method dispatches the specified message to the server through the reply sink specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the message is not transmitted, and no new exception is thrown. + ]]> The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IServerChannelSink.xml b/xml/System.Runtime.Remoting.Channels/IServerChannelSink.xml index 7bae30bac70..a7afa650b67 100644 --- a/xml/System.Runtime.Remoting.Channels/IServerChannelSink.xml +++ b/xml/System.Runtime.Remoting.Channels/IServerChannelSink.xml @@ -26,21 +26,21 @@ Provides methods used for security and transport sinks. - interface. - + interface. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Sinks/CPP/serversink.cpp" id="Snippet60"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/serversink.cs" id="Snippet60"::: - - See the interface documentation for an example of the corresponding server sink provider implementation. - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/serversink.cs" id="Snippet60"::: + + See the interface documentation for an example of the corresponding server sink provider implementation. + ]]> @@ -83,18 +83,18 @@ The stream heading back to the transport sink. Requests processing from the current sink of the response from a method call sent asynchronously. - The immediate caller does not have infrastructure permission. @@ -137,11 +137,11 @@ Returns the onto which the provided response message is to be serialized. The onto which the provided response message is to be serialized. - The immediate caller does not have infrastructure permission. @@ -174,11 +174,11 @@ Gets the next server channel sink in the server sink chain. The next server channel sink in the server sink chain. - The immediate caller does not have the required permission. @@ -227,11 +227,11 @@ Requests message processing from the current sink. A status value that provides information about how message was processed. - interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together in the sense that every message sink is responsible for calling on the next message sink after it has performed its work. For instance, a synchronization-related message sink can cause a lock to be acquired or released, and then delegated further to the downstream message sink. - + interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together in the sense that every message sink is responsible for calling on the next message sink after it has performed its work. For instance, a synchronization-related message sink can cause a lock to be acquired or released, and then delegated further to the downstream message sink. + ]]> The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IServerChannelSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/IServerChannelSinkProvider.xml index dabe695215b..50491ff951f 100644 --- a/xml/System.Runtime.Remoting.Channels/IServerChannelSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/IServerChannelSinkProvider.xml @@ -22,27 +22,27 @@ Creates server channel sinks for the server channel through which remoting messages flow. - interface. All the remoting server channels provide constructors that take a as a parameter. - - Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. - - When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers are created at the same time as the channel, during a call. - - After the is generated, .NET Framework searches through the list of registered channels to find one that can process the call. Once an appropriate channel has been found, the channel sink is retrieved from the channel, and the is forwarded to the sink for processing. - - - -## Examples - The following code example illustrates an implementation of this interface. - + interface. All the remoting server channels provide constructors that take a as a parameter. + + Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. + + When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers are created at the same time as the channel, during a call. + + After the is generated, .NET Framework searches through the list of registered channels to find one that can process the call. Once an appropriate channel has been found, the channel sink is retrieved from the channel, and the is forwarded to the sink for processing. + + + +## Examples + The following code example illustrates an implementation of this interface. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Sinks/CPP/serversink.cpp" id="Snippet70"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/serversink.cs" id="Snippet70"::: - - See the interface documentation for an example of the corresponding server sink implementation. - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/serversink.cs" id="Snippet70"::: + + See the interface documentation for an example of the corresponding server sink implementation. + ]]> @@ -78,13 +78,13 @@ Creates a sink chain. The first sink of the newly formed channel sink chain, or , which indicates that this provider will not or cannot provide a connection for this endpoint. - The immediate caller does not have infrastructure permission. @@ -120,13 +120,13 @@ A object in which the channel data is to be returned. Returns the channel data for the channel that the current sink is associated with. - The immediate caller does not have infrastructure permission. @@ -163,13 +163,13 @@ Gets or sets the next sink provider in the channel sink provider chain. The next sink provider in the channel sink provider chain. - The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IServerChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/IServerChannelSinkStack.xml index bc97aa5a780..5220f8d5209 100644 --- a/xml/System.Runtime.Remoting.Channels/IServerChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/IServerChannelSinkStack.xml @@ -94,11 +94,11 @@ Information generated on the request side that is needed on the response side. Pushes the specified sink and information associated with it onto the sink stack. - method on the corresponding sink. - + method on the corresponding sink. + ]]> The immediate caller does not have infrastructure permission. @@ -134,13 +134,13 @@ The status and state of an asynchronous operation on a remote object. Presents a callback delegate to handle a callback after a message has been dispatched asynchronously. - method is intended for use only by the .NET Framework remoting infrastructure. - + method is intended for use only by the .NET Framework remoting infrastructure. + ]]> @@ -177,11 +177,11 @@ The state associated with . Stores a message sink and its associated state for later asynchronous processing. - method is intended for use only by the .NET Framework remoting infrastructure. - + method is intended for use only by the .NET Framework remoting infrastructure. + ]]> @@ -218,13 +218,13 @@ The state associated with . Stores a message sink and its associated state, and then dispatches a message asynchronously, using the sink just stored and any other stored sinks. - method is intended for use only by the .NET Framework remoting infrastructure. - - Also, the method should only be called by a transport sink to complete an asynchronous dispatch. - + method is intended for use only by the .NET Framework remoting infrastructure. + + Also, the method should only be called by a transport sink to complete an asynchronous dispatch. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/IServerResponseChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/IServerResponseChannelSinkStack.xml index f8fe59b7281..ae793042013 100644 --- a/xml/System.Runtime.Remoting.Channels/IServerResponseChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/IServerResponseChannelSinkStack.xml @@ -58,11 +58,11 @@ The stream coming back from the transport sink. Requests asynchronous processing of a method call on the sinks in the current sink stack. - method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see the method. - + method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see the method. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/ServerChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/ServerChannelSinkStack.xml index 4c128cc8b22..ca46af2c473 100644 --- a/xml/System.Runtime.Remoting.Channels/ServerChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/ServerChannelSinkStack.xml @@ -36,11 +36,11 @@ Holds the stack of server channel sinks. - @@ -101,11 +101,11 @@ The stream coming back from the transport sink. Requests asynchronous processing of a method call on the sinks in the current sink stack. - method. - + method. + ]]> The current sink stack is empty. @@ -147,11 +147,11 @@ Returns the onto which the specified message is to be serialized. The onto which the specified message is to be serialized. - called with the `msg` and `headers` parameters ( (`msg`, `headers`)) on the top sink in the current sink stack. The top sink in the sink stack remains unchanged. - + called with the `msg` and `headers` parameters ( (`msg`, `headers`)) on the top sink in the current sink stack. The top sink in the sink stack remains unchanged. + ]]> The sink stack is empty. @@ -229,11 +229,11 @@ Information generated on the request side that is needed on the response side. Pushes the specified sink and information associated with it onto the sink stack. - method on the corresponding sink. - + method on the corresponding sink. + ]]> @@ -271,13 +271,13 @@ The status and state of an asynchronous operation on a remote object. Provides a delegate to handle a callback after a message has been dispatched asynchronously. - method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. - + method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. + ]]> @@ -317,17 +317,17 @@ The state associated with . Stores a message sink and its associated state for later asynchronous processing. - method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. - + method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. + ]]> - The current sink stack is empty. - - -or- - + The current sink stack is empty. + + -or- + The specified sink was never pushed onto the current stack. @@ -366,13 +366,13 @@ The state associated with . Stores a message sink and its associated state, and then dispatches a message asynchronously, using the sink just stored and any other stored sinks. - method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. - - The method should be only called by a transport sink to complete an asynchronous dispatch. - + method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. + + The method should be only called by a transport sink to complete an asynchronous dispatch. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSink.xml b/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSink.xml index 98eb719dc0f..2f5b78ee654 100644 --- a/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSink.xml +++ b/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSink.xml @@ -34,7 +34,7 @@ is forwarded to all sinks in the channel sink chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message need to be placed in the sink chain before the formatter. This can be achieved by implementing both the and interfaces. The formatter sink can be placed in the sink chain later. + The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After reaching the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message need to be placed in the sink chain before the formatter. This can be achieved by implementing both the and interfaces. The formatter sink can be placed in the sink chain later. |Property|Description| |--------------|-----------------| diff --git a/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSinkProvider.xml index e548120d83a..546e04521ee 100644 --- a/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSinkProvider.xml @@ -30,7 +30,7 @@ ## Remarks A creates client formatter sinks that use the to serialize messages for the client channel through which remoting messages flow. - The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After reaching the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. This can be achieved by implementing both the and interfaces. The formatter sink can be placed in the sink chain later. + The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After reaching the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. This can be achieved by implementing both the and interfaces. The formatter sink can be placed in the sink chain later. Formatter sinks use sink configuration properties to configure the channel at run time. Sink properties can be specified in a configuration file, or programmatically, inside of a . In a configuration file all values are represented by strings, but when building a property programmatically, value types can be specified with their native values or with strings. @@ -139,7 +139,7 @@ method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. + When the method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. ]]> diff --git a/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSink.xml b/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSink.xml index 68f068818f0..98b6f4ddd87 100644 --- a/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSink.xml +++ b/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSink.xml @@ -28,7 +28,7 @@ method, which is called by server channels to create the server channel sink chains. When the message reaches the dispatch sink, the dispatch sink passes the message to the remoting infrastructure. + The request stream propagates from the server transport sink through the server channel sinks until it reaches the appropriate formatter sink. The formatter sink deserializes the message and passes it through the pipeline. A special dispatch sink is inserted at the end of the channel sink chain by method, which is called by server channels to create the server channel sink chains. When the message reaches the dispatch sink, the dispatch sink passes the message to the remoting infrastructure. |Property|Description| |--------------|-----------------| diff --git a/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSinkProvider.xml index e3fb1e59d83..50a79343df9 100644 --- a/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSinkProvider.xml @@ -30,9 +30,9 @@ ## Remarks Channel sinks are connected to a server channel through implementations of the interface. All the remoting server channels provide constructors that take a as a parameter. - Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. + Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. - When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers and the channels are created during the call. + When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers and the channels are created during the call. Formatter sinks use sink configuration properties to configure the channel at run time. Sink properties can be specified in a configuration file, or programmatically, inside of a . In a configuration file all values are represented by strings, but when building a property programmatically, value types can be specified with their native values or with strings. diff --git a/xml/System.Runtime.Remoting.Contexts/Context.xml b/xml/System.Runtime.Remoting.Contexts/Context.xml index b04ae87e0ab..83ba7a4e7c7 100644 --- a/xml/System.Runtime.Remoting.Contexts/Context.xml +++ b/xml/System.Runtime.Remoting.Contexts/Context.xml @@ -25,17 +25,17 @@ Defines an environment for the objects that are resident inside it and for which a policy can be enforced. - class, which provides the usage rules. Whenever a new object is instantiated, the .NET Framework finds a compatible or creates a new instance of the class for the object. Once an object is placed in a context, it stays in it for life. Classes that can be bound to a context are called context-bound classes. When accessed from another context, such classes are referenced directly by using a proxy. Any call from an object in one context to an object in another context will go through a context proxy and be affected by the policy that the combined context properties enforce. - - A new object's context is generally chosen based on meta-data attributes on the class. This mechanism is extensible through custom attributes. These are known as static-context properties, which are compiled into the class meta-data. Dynamic-context properties (also known as configuration properties) can be applied and configured by administrators. - - For more information on contexts, see [Boundaries: Processes and Application Domains](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kt21t9h7(v=vs.100)). - + class, which provides the usage rules. Whenever a new object is instantiated, the .NET Framework finds a compatible or creates a new instance of the class for the object. Once an object is placed in a context, it stays in it for life. Classes that can be bound to a context are called context-bound classes. When accessed from another context, such classes are referenced directly by using a proxy. Any call from an object in one context to an object in another context will go through a context proxy and be affected by the policy that the combined context properties enforce. + + A new object's context is generally chosen based on meta-data attributes on the class. This mechanism is extensible through custom attributes. These are known as static-context properties, which are compiled into the class meta-data. Dynamic-context properties (also known as configuration properties) can be applied and configured by administrators. + + For more information on contexts, see [Boundaries: Processes and Application Domains](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kt21t9h7(v=vs.100)). + ]]> @@ -95,11 +95,11 @@ Allocates an unnamed data slot. A local data slot. - @@ -136,11 +136,11 @@ Allocates a named data slot. A local data slot object. - @@ -233,11 +233,11 @@ Gets the default context for the current application domain. The default context for the namespace. - @@ -273,11 +273,11 @@ The delegate used to request the callback. Executes code in another context. - method on it by passing in a delegate. The delegate is used to request a callback. The delegate must be a class type. - + method on it by passing in a delegate. The delegate is used to request a callback. The delegate must be a class type. + ]]> @@ -310,11 +310,11 @@ Cleans up the backing objects for the nondefault contexts. - class. - + class. + ]]> @@ -350,11 +350,11 @@ The name of the data slot to free. Frees a named data slot on all the contexts. - @@ -387,11 +387,11 @@ Freezes the context, making it impossible to add or remove context properties from the current context. - The context is already frozen. @@ -463,11 +463,11 @@ Looks up a named data slot. A local data slot. - @@ -543,17 +543,17 @@ if the property was successfully registered; otherwise, . - Either or its name is , or it is not dynamic (it does not implement ). @@ -626,11 +626,11 @@ The actual context property. Sets a specific context property by name. - The context is frozen. diff --git a/xml/System.Runtime.Remoting.Contexts/ContextAttribute.xml b/xml/System.Runtime.Remoting.Contexts/ContextAttribute.xml index dd832c62421..e011ae3bb61 100644 --- a/xml/System.Runtime.Remoting.Contexts/ContextAttribute.xml +++ b/xml/System.Runtime.Remoting.Contexts/ContextAttribute.xml @@ -249,7 +249,7 @@ class is an implementation of an property. The method adds the property to the given class so that when the message is received, the new object can be created in the required context environment. + The class is an implementation of an property. The method adds the property to the given class so that when the message is received, the new object can be created in the required context environment. ]]> @@ -339,7 +339,7 @@ Once all the context properties have been added to the new context, they are all queried as to whether they are okay in the new context. The context property could look at the other context properties in the property of the new context and determine whether it is compatible with these other context properties. > [!NOTE] -> By default, the method returns `true`. +> By default, the method returns `true`. ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IContextAttribute.xml b/xml/System.Runtime.Remoting.Contexts/IContextAttribute.xml index 5aefe48ce9a..0c0d0c13c71 100644 --- a/xml/System.Runtime.Remoting.Contexts/IContextAttribute.xml +++ b/xml/System.Runtime.Remoting.Contexts/IContextAttribute.xml @@ -65,7 +65,7 @@ method can add context properties directly to the property list in the interface. The default implementation in the class will add this to the context property list. Context attributes are free to override and can implement their own behavior. For example, they can add to the list a new class that implements the context property. + The method can add context properties directly to the property list in the interface. The default implementation in the class will add this to the context property list. Context attributes are free to override and can implement their own behavior. For example, they can add to the list a new class that implements the context property. ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IContributeClientContextSink.xml b/xml/System.Runtime.Remoting.Contexts/IContributeClientContextSink.xml index 1872ba11814..4b3b59c7a17 100644 --- a/xml/System.Runtime.Remoting.Contexts/IContributeClientContextSink.xml +++ b/xml/System.Runtime.Remoting.Contexts/IContributeClientContextSink.xml @@ -22,13 +22,13 @@ Contributes an interception sink at the context boundary on the client end of a remoting call. - interface is implemented by context properties in a class that want to contribute an interception sink at the context boundary on the client end of a remoting call. - - The client context chain is composed from those properties in the client context that implement , which contributes to a sink through the method call. This chain is cached for future use. - + interface is implemented by context properties in a class that want to contribute an interception sink at the context boundary on the client end of a remoting call. + + The client context chain is composed from those properties in the client context that implement , which contributes to a sink through the method call. This chain is cached for future use. + ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IContributeEnvoySink.xml b/xml/System.Runtime.Remoting.Contexts/IContributeEnvoySink.xml index ba9f790bea6..d1a80ee3b0d 100644 --- a/xml/System.Runtime.Remoting.Contexts/IContributeEnvoySink.xml +++ b/xml/System.Runtime.Remoting.Contexts/IContributeEnvoySink.xml @@ -22,11 +22,11 @@ Contributes an envoy message sink on the client end. - interface is implemented by context properties in the server class that want to contribute an envoy message sink on the client end. The server envoy chain is composed from those context properties that implement . The envoy chain resides on the client end and acts as a representative of the corresponding message sinks from the server context properties. - + interface is implemented by context properties in the server class that want to contribute an envoy message sink on the client end. The server envoy chain is composed from those context properties that implement . The envoy chain resides on the client end and acts as a representative of the corresponding message sinks from the server context properties. + ]]> @@ -66,11 +66,11 @@ Takes the first sink in the chain of sinks composed so far, and then chains its message sink in front of the chain already formed. The composite sink chain. - method is used as an optimization to create an envoy sink when the destination is a different context in the same application domain and is used by the Wrap operation. - + method is used as an optimization to create an envoy sink when the destination is a different context in the same application domain and is used by the Wrap operation. + ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IContributeServerContextSink.xml b/xml/System.Runtime.Remoting.Contexts/IContributeServerContextSink.xml index dda035c80f2..e7dc1781081 100644 --- a/xml/System.Runtime.Remoting.Contexts/IContributeServerContextSink.xml +++ b/xml/System.Runtime.Remoting.Contexts/IContributeServerContextSink.xml @@ -22,15 +22,15 @@ Contributes an interception sink at the context boundary on the server end of a remoting call. - interface is implemented by context properties in a class that want to contribute an interception sink at the context boundary on the server end of a remoting call. - - The server context chain is composed from those properties in the server context that implement and which contribute a sink by using the method call. - - Serialization is an example of such a context property. In this case, the message sink would involve taking a synchronization primitive lock before processing a call any further. - + interface is implemented by context properties in a class that want to contribute an interception sink at the context boundary on the server end of a remoting call. + + The server context chain is composed from those properties in the server context that implement and which contribute a sink by using the method call. + + Serialization is an example of such a context property. In this case, the message sink would involve taking a synchronization primitive lock before processing a call any further. + ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IDynamicMessageSink.xml b/xml/System.Runtime.Remoting.Contexts/IDynamicMessageSink.xml index a1b5c5b7a07..8795b436baf 100644 --- a/xml/System.Runtime.Remoting.Contexts/IDynamicMessageSink.xml +++ b/xml/System.Runtime.Remoting.Contexts/IDynamicMessageSink.xml @@ -22,11 +22,11 @@ Indicates that the implementing message sink will be provided by dynamically registered properties. - @@ -66,11 +66,11 @@ A value of if this is an asynchronic call and if it is a synchronic call. Indicates that a call is returning. - method. - + method. + ]]> @@ -110,11 +110,11 @@ A value of if this is an asynchronic call and if it is a synchronic call. Indicates that a call is starting. - method. - + method. + ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/SynchronizationAttribute.xml b/xml/System.Runtime.Remoting.Contexts/SynchronizationAttribute.xml index a0bf711ba96..40263d45350 100644 --- a/xml/System.Runtime.Remoting.Contexts/SynchronizationAttribute.xml +++ b/xml/System.Runtime.Remoting.Contexts/SynchronizationAttribute.xml @@ -44,26 +44,26 @@ Enforces a synchronization domain for the current context and all contexts that share the same instance. - [!NOTE] -> There are two classes named `SynchronizationAttribute` : one in the namespace, and the other in the namespace. The class supports only synchronous calls, and can be used only with serviced components. The supports both synchronous and asynchronous calls, and can be used only with context bound objects. (For more information on context bound objects, see the class.) - +> There are two classes named `SynchronizationAttribute` : one in the namespace, and the other in the namespace. The class supports only synchronous calls, and can be used only with serviced components. The supports both synchronous and asynchronous calls, and can be used only with context bound objects. (For more information on context bound objects, see the class.) + > [!NOTE] -> This class makes a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). - - - -## Examples - The following code example demonstrates the use of the . For the complete example code, see the example for the class. - +> This class makes a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). + + + +## Examples + The following code example demonstrates the use of the . For the complete example code, see the example for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncResult.NewExamples/CPP/ad.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/IsTransparentProxy/ad.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/RemotingServices/IsTransparentProxy/ad.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/RemotingServices/IsTransparentProxy/ad.vb" id="Snippet2"::: + ]]> @@ -118,11 +118,11 @@ A Boolean value indicating whether reentry is required. Initializes a new instance of the class with a Boolean value indicating whether reentry is required. - to which the current attribute is applied must be intercepted and serialized. - + to which the current attribute is applied must be intercepted and serialized. + ]]> @@ -148,11 +148,11 @@ An integer value indicating the behavior of the object to which this attribute is applied. Initializes a new instance of the class with a flag indicating the behavior of the object to which this attribute is applied. - , , , or . - + , , , or . + ]]> The parameter was not one of the defined flags. @@ -182,11 +182,11 @@ if reentry is required, and callouts must be intercepted and serialized; otherwise, . Initializes a new instance of the class with a flag indicating the behavior of the object to which this attribute is applied, and a Boolean value indicating whether reentry is required. - , , , or . - + , , , or . + ]]> The parameter was not one of the defined flags. @@ -226,11 +226,11 @@ Creates a CallOut sink and chains it in front of the provided chain of sinks at the context boundary on the client end of a remoting call. The composite sink chain with the new CallOut sink. - . - + . + ]]> @@ -305,11 +305,11 @@ Creates a synchronized dispatch sink and chains it in front of the provided chain of sinks at the context boundary on the server end of a remoting call. The composite sink chain with the new synchronized dispatch sink. - . - + . + ]]> @@ -376,11 +376,11 @@ Gets or sets a Boolean value indicating whether reentry is required. A Boolean value indicating whether reentry is required. - to which the current attribute is applied must be intercepted and serialized. - + to which the current attribute is applied must be intercepted and serialized. + ]]> @@ -406,11 +406,11 @@ Gets or sets a Boolean value indicating whether the implementing this instance of is locked. A Boolean value indicating whether the implementing this instance of is locked. - is locked, only the thread currently executing in it has access to objects in the . - + is locked, only the thread currently executing in it has access to objects in the . + ]]> diff --git a/xml/System.Runtime.Remoting.Lifetime/ClientSponsor.xml b/xml/System.Runtime.Remoting.Lifetime/ClientSponsor.xml index 956d268aa14..d592265e320 100644 --- a/xml/System.Runtime.Remoting.Lifetime/ClientSponsor.xml +++ b/xml/System.Runtime.Remoting.Lifetime/ClientSponsor.xml @@ -211,7 +211,7 @@ . + For more information, see . @@ -305,7 +305,7 @@ method is called by the distributed garbage collector to renew the lease for the specified object. + The method is called by the distributed garbage collector to renew the lease for the specified object. diff --git a/xml/System.Runtime.Remoting.Lifetime/ILease.xml b/xml/System.Runtime.Remoting.Lifetime/ILease.xml index 6265a281a5e..712f9c7d704 100644 --- a/xml/System.Runtime.Remoting.Lifetime/ILease.xml +++ b/xml/System.Runtime.Remoting.Lifetime/ILease.xml @@ -260,7 +260,7 @@ or the current time plus the renewal time. + The lease time is set to the maximum of the or the current time plus the renewal time. ]]> @@ -301,7 +301,7 @@ to the only if the has dropped below the . Sequential calls therefore do not increase the without bound. Instead, immediately after any call, the is guaranteed to be the or longer. + When you make a call to a remote object, the lifetime service adds the to the only if the has dropped below the . Sequential calls therefore do not increase the without bound. Instead, immediately after any call, the is guaranteed to be the or longer. ]]> @@ -342,7 +342,7 @@ is , then this lease will not take sponsors. + If the is , then this lease will not take sponsors. If a sponsor does not respond to a call to renew a lease within the time-out period, it is assumed to be dead and is removed from the list of sponsors for the current lease. diff --git a/xml/System.Runtime.Remoting.Lifetime/ISponsor.xml b/xml/System.Runtime.Remoting.Lifetime/ISponsor.xml index 89e8acc4d7e..1fbc92399ab 100644 --- a/xml/System.Runtime.Remoting.Lifetime/ISponsor.xml +++ b/xml/System.Runtime.Remoting.Lifetime/ISponsor.xml @@ -22,18 +22,18 @@ Indicates that the implementer wants to be a lifetime lease sponsor. - interface if it needs to request a lease renewal for a particular object. An object that implements the interface can become a sponsor by registering itself with the lease manager. The interface is used by the lifetime service to call back to the sponsor. - - - -## Examples + interface if it needs to request a lease renewal for a particular object. An object that implements the interface can become a sponsor by registering itself with the lease manager. The interface is used by the lifetime service to call back to the sponsor. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ISponsor_Client/CPP/isponsor_client.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.vb" id="Snippet2"::: + ]]> @@ -69,18 +69,18 @@ Requests a sponsoring client to renew the lease for the specified object. The additional lease time for the specified object. - method is called by the distributed garbage collector to renew the lease for the specified object. - - - -## Examples + method is called by the distributed garbage collector to renew the lease for the specified object. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ISponsor_Client/CPP/isponsor_client.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.vb" id="Snippet2"::: + ]]> The immediate caller makes the call through a reference to the interface and does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Lifetime/LifetimeServices.xml b/xml/System.Runtime.Remoting.Lifetime/LifetimeServices.xml index 150592a42ea..376af455f4a 100644 --- a/xml/System.Runtime.Remoting.Lifetime/LifetimeServices.xml +++ b/xml/System.Runtime.Remoting.Lifetime/LifetimeServices.xml @@ -105,7 +105,7 @@ is set to 100 seconds, the lease list is inspected for cleanups and renewals every 100 seconds. + The current property defines the frequency at which the lease manager becomes active to clean up expired leases. For example, if is set to 100 seconds, the lease list is inspected for cleanups and renewals every 100 seconds. The default value of the property is 10 seconds. diff --git a/xml/System.Runtime.Remoting.Messaging/AsyncResult.xml b/xml/System.Runtime.Remoting.Messaging/AsyncResult.xml index 96e90f8d8b5..3bbd675a9f8 100644 --- a/xml/System.Runtime.Remoting.Messaging/AsyncResult.xml +++ b/xml/System.Runtime.Remoting.Messaging/AsyncResult.xml @@ -42,7 +42,7 @@ ## Examples - The following example demonstrates how to use the property to get a , and how to wait for an asynchronous call on a delegate. The is signaled when the asynchronous call completes, and you can wait for it by calling the method. + The following example demonstrates how to use the property to get a , and how to wait for an asynchronous call on a delegate. The is signaled when the asynchronous call completes, and you can wait for it by calling the method. The example consists of two classes, the class that contains the method that's called asynchronously, and the class that contains the `Main` method that makes the call. @@ -147,7 +147,7 @@ method of the interface is not relevant to the class. Implementation by throws a . Instead, obtain an by casting the interface returned by an asynchronous call made using a delegate. + The method of the interface is not relevant to the class. Implementation by throws a . Instead, obtain an by casting the interface returned by an asynchronous call made using a delegate. ]]> @@ -231,15 +231,15 @@ ## Remarks The returned by this method is automatically signaled when the asynchronous operation has completed. - The wait handle is not closed automatically when you call `EndInvoke` on the delegate that was used to make the asynchronous method call. If you release all references to the wait handle, system resources are freed when garbage collection reclaims the wait handle. To free the system resources as soon as you are finished using the wait handle, call the method. Garbage collection works more efficiently when disposable objects are explicitly closed or disposed. + The wait handle is not closed automatically when you call `EndInvoke` on the delegate that was used to make the asynchronous method call. If you release all references to the wait handle, system resources are freed when garbage collection reclaims the wait handle. To free the system resources as soon as you are finished using the wait handle, call the method. Garbage collection works more efficiently when disposable objects are explicitly closed or disposed. > [!CAUTION] -> The contained in the property can be used to block the current thread until the asynchronous call is complete. However the will ignore the , if one was specified during the `BeginInvoke` call. Therefore, a situation can occur where the application shuts down before the has finished executing, even if a is used to block until the asynchronous call completion. For an example of such a situation, see the example for the class, and remove the statement. +> The contained in the property can be used to block the current thread until the asynchronous call is complete. However the will ignore the , if one was specified during the `BeginInvoke` call. Therefore, a situation can occur where the application shuts down before the has finished executing, even if a is used to block until the asynchronous call completion. For an example of such a situation, see the example for the class, and remove the statement. ## Examples - The following example demonstrates how to use the property to get a , and how to wait for an asynchronous call on a delegate. The is signaled when the asynchronous call completes, and you can wait for it by calling the method. + The following example demonstrates how to use the property to get a , and how to wait for an asynchronous call on a delegate. The is signaled when the asynchronous call completes, and you can wait for it by calling the method. The example consists of two classes, the class that contains the method that's called asynchronously, and the class that contains the `Main` method that makes the call. @@ -287,7 +287,7 @@ ## Remarks If it is detected that the `BeginInvoke` call completed synchronously in the delegate, it is probable that the thread that called BeginInvoke is the current thread. Most providers of the interface will not use the capability and will return a default `false`. - Current implementation of always returns `false`. + Current implementation of always returns `false`. ]]> @@ -342,7 +342,7 @@ method can return an object after the method is called. The return value can be cast to an . + The method can return an object after the method is called. The return value can be cast to an . However, you do not need to call either of these methods directly. They are intended for use by the remoting infrastructure of the .NET Framework. @@ -433,7 +433,7 @@ returns `null`. + The current implementation of returns `null`. ]]> @@ -466,7 +466,7 @@ method. + You do not need to call the method. ]]> @@ -509,11 +509,11 @@ method implements the interface. You do not need to call this method directly. It is intended for use by the remoting infrastructure of the .NET Framework. + The method implements the interface. You do not need to call this method directly. It is intended for use by the remoting infrastructure of the .NET Framework. - invokes the consumer code's delegate. It also sets the instance returned by the method. If the `msg` parameter is of type , the same object is returned by . Otherwise, a reply message that contains a remoting exception is returned. + invokes the consumer code's delegate. It also sets the instance returned by the method. If the `msg` parameter is of type , the same object is returned by . Otherwise, a reply message that contains a remoting exception is returned. - also modifies the value returned by the property. + also modifies the value returned by the property. ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/CallContext.xml b/xml/System.Runtime.Remoting.Messaging/CallContext.xml index f61587bc5b1..fbbfd9bae99 100644 --- a/xml/System.Runtime.Remoting.Messaging/CallContext.xml +++ b/xml/System.Runtime.Remoting.Messaging/CallContext.xml @@ -49,7 +49,7 @@ ## Examples - The following code example demonstrates the use of the class to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the `HelloServiceClass` class used in this sample, see the example for the method. To view the code for the server class used in this sample, see the example for the class. + The following code example demonstrates the use of the class to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the `HelloServiceClass` class used in this sample, see the example for the method. To view the code for the server class used in this sample, see the example for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CallContext/CPP/client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/CallContext/Overview/client.cs" id="Snippet1"::: @@ -138,7 +138,7 @@ method to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the client class used in the sample, see the example for the class. To view the code for the server class used in this sample, see the example for the class. + The following code example demonstrates the use of the method to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the client class used in the sample, see the example for the class. To view the code for the server class used in this sample, see the example for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CallContext/CPP/service.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/CallContext/Overview/service.cs" id="Snippet3"::: @@ -326,7 +326,7 @@ method to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the `HelloServiceClass` class used in this sample, see the example for the method. To view the code for the server class used in this sample, see the example for the class. + The following code example demonstrates the use of the method to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the `HelloServiceClass` class used in this sample, see the example for the method. To view the code for the server class used in this sample, see the example for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CallContext/CPP/client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/CallContext/Overview/client.cs" id="Snippet1"::: diff --git a/xml/System.Runtime.Remoting.Messaging/ILogicalThreadAffinative.xml b/xml/System.Runtime.Remoting.Messaging/ILogicalThreadAffinative.xml index 72a84855370..5d941141a0c 100644 --- a/xml/System.Runtime.Remoting.Messaging/ILogicalThreadAffinative.xml +++ b/xml/System.Runtime.Remoting.Messaging/ILogicalThreadAffinative.xml @@ -22,20 +22,20 @@ Marks an object that can propagate outside of an in a . - , the current class generates a that travels along with the call to the remote location. Only objects that expose the interface and are stored in the are propagated outside the . Objects that do not support this interface are not transmitted in instances with remote method calls. - - - -## Examples - The following code example demonstrates the use of the interface to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `HelloServiceClass` class used in the sample, see the example for the method. To view the code for the server class used in this sample, see example for the class. To view the code for the client class used in the sample, see the example for the class. - + , the current class generates a that travels along with the call to the remote location. Only objects that expose the interface and are stored in the are propagated outside the . Objects that do not support this interface are not transmitted in instances with remote method calls. + + + +## Examples + The following code example demonstrates the use of the interface to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `HelloServiceClass` class used in the sample, see the example for the method. To view the code for the server class used in this sample, see example for the class. To view the code for the client class used in the sample, see the example for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CallContext/CPP/service.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/CallContext/Overview/service.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Messaging/CallContext/Overview/service.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Messaging/CallContext/Overview/service.vb" id="Snippet2"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/IMessageSink.xml b/xml/System.Runtime.Remoting.Messaging/IMessageSink.xml index 7aac6e844b0..60e1386fb73 100644 --- a/xml/System.Runtime.Remoting.Messaging/IMessageSink.xml +++ b/xml/System.Runtime.Remoting.Messaging/IMessageSink.xml @@ -22,26 +22,26 @@ Defines the interface for a message sink. - , process, or computer. Two or more message sinks in the chain can interact with each other in regard to each specific action. - - - -## Examples - The following code example shows the implementation of the interface. Note that the sample assumes type definitions and assembly references that must be provided for the sample to compile. - + , process, or computer. Two or more message sinks in the chain can interact with each other in regard to each specific action. + + + +## Examples + The following code example shows the implementation of the interface. Note that the sample assumes type definitions and assembly references that must be provided for the sample to compile. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IMessageSink_Client/CPP/imessagesink_client.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/IMessage/Properties/imessagesink_client.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Messaging/IMessage/Properties/imessagesink_client.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Messaging/IMessage/Properties/imessagesink_client.vb" id="Snippet3"::: + ]]> @@ -82,11 +82,11 @@ Asynchronously processes the given message. An interface that provides a way to control asynchronous messages after they have been dispatched. - The immediate caller makes the call through a reference to the interface and does not have infrastructure permission. @@ -153,11 +153,11 @@ Synchronously processes the given message. A reply message in response to the request. - method is invoked on the message sink by the remoting infrastructure or by a previous sink for synchronous messages. - + method is invoked on the message sink by the remoting infrastructure or by a previous sink for synchronous messages. + ]]> The immediate caller makes the call through a reference to the interface and does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Messaging/IMethodCallMessage.xml b/xml/System.Runtime.Remoting.Messaging/IMethodCallMessage.xml index 3226ae95c16..f56b2d874eb 100644 --- a/xml/System.Runtime.Remoting.Messaging/IMethodCallMessage.xml +++ b/xml/System.Runtime.Remoting.Messaging/IMethodCallMessage.xml @@ -184,7 +184,7 @@ property is redundant since the same functionality can be achieved with the and methods, there might be performance optimization available if the implementer understands when all the arguments will be retrieved. + Although the property is redundant since the same functionality can be achieved with the and methods, there might be performance optimization available if the implementer understands when all the arguments will be retrieved. diff --git a/xml/System.Runtime.Remoting.Messaging/IMethodMessage.xml b/xml/System.Runtime.Remoting.Messaging/IMethodMessage.xml index ef22e72da15..537d5f16b9b 100644 --- a/xml/System.Runtime.Remoting.Messaging/IMethodMessage.xml +++ b/xml/System.Runtime.Remoting.Messaging/IMethodMessage.xml @@ -115,7 +115,7 @@ property is redundant since the same functionality can be achieved through the and , there might be performance optimization available if the implementer understands when all the arguments will be retrieved. + Although the property is redundant since the same functionality can be achieved through the and , there might be performance optimization available if the implementer understands when all the arguments will be retrieved. ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/IMethodReturnMessage.xml b/xml/System.Runtime.Remoting.Messaging/IMethodReturnMessage.xml index fe89fbdb113..131e6049997 100644 --- a/xml/System.Runtime.Remoting.Messaging/IMethodReturnMessage.xml +++ b/xml/System.Runtime.Remoting.Messaging/IMethodReturnMessage.xml @@ -227,10 +227,10 @@ property is redundant since the same functionality can be achieved through the field and method, there might be performance optimization available if the implementer understands when all the arguments will be retrieved. + Although the property is redundant since the same functionality can be achieved through the field and method, there might be performance optimization available if the implementer understands when all the arguments will be retrieved. > [!WARNING] -> If is not `null`, a exception is thrown when is accessed. +> If is not `null`, a exception is thrown when is accessed. diff --git a/xml/System.Runtime.Remoting.Messaging/LogicalCallContext.xml b/xml/System.Runtime.Remoting.Messaging/LogicalCallContext.xml index f9fc4071b50..8b5f6bf0306 100644 --- a/xml/System.Runtime.Remoting.Messaging/LogicalCallContext.xml +++ b/xml/System.Runtime.Remoting.Messaging/LogicalCallContext.xml @@ -40,16 +40,16 @@ Provides a set of properties that are carried with the execution code path during remote method calls. - class is a version of the class that is used during method calls to remote application domains. The is a specialized collection object similar to a thread local storage for method calls, and provides data slots that are unique to each logical thread of execution. The slots are not shared across call contexts on other logical threads. Objects can be added to the as it travels down and up the execution code path, and examined by various objects along the path. - - When a remote method call is made to an object in another , the class generates a that travels along with the remote call. Only objects that expose the interface and are stored in the are propagated outside the in a . Objects that do not support this interface are not transmitted in instances with remote method calls. - + class is a version of the class that is used during method calls to remote application domains. The is a specialized collection object similar to a thread local storage for method calls, and provides data slots that are unique to each logical thread of execution. The slots are not shared across call contexts on other logical threads. Objects can be added to the as it travels down and up the execution code path, and examined by various objects along the path. + + When a remote method call is made to an object in another , the class generates a that travels along with the remote call. Only objects that expose the interface and are stored in the are propagated outside the in a . Objects that do not support this interface are not transmitted in instances with remote method calls. + > [!NOTE] -> This class makes a link demand. A SecurityException is thrown if the immediate caller does not have infrastructure permission. See [Link Demands](/dotnet/framework/misc/link-demands) for more information. - +> This class makes a link demand. A SecurityException is thrown if the immediate caller does not have infrastructure permission. See [Link Demands](/dotnet/framework/misc/link-demands) for more information. + ]]> @@ -85,11 +85,11 @@ Creates a new object that is a copy of the current instance. A new object that is a copy of this instance. - method produces a deep copy of the current . - + method produces a deep copy of the current . + ]]> @@ -194,13 +194,13 @@ The contextual information about the source or destination of the serialization. Populates a specified with the data needed to serialize the current . - with all the data needed to recreate the . - - The current method is an implementation of . - + with all the data needed to recreate the . + + The current method is an implementation of . + ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/MethodCall.xml b/xml/System.Runtime.Remoting.Messaging/MethodCall.xml index 88e146e0882..3273f107e3e 100644 --- a/xml/System.Runtime.Remoting.Messaging/MethodCall.xml +++ b/xml/System.Runtime.Remoting.Messaging/MethodCall.xml @@ -473,7 +473,7 @@ method throws a . + The method throws a . ]]> @@ -919,7 +919,7 @@ property is set through the method. + The method belongs to a remote object. The value of the property is set through the method. ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/MethodResponse.xml b/xml/System.Runtime.Remoting.Messaging/MethodResponse.xml index 28230e9eb05..8791d5145da 100644 --- a/xml/System.Runtime.Remoting.Messaging/MethodResponse.xml +++ b/xml/System.Runtime.Remoting.Messaging/MethodResponse.xml @@ -382,7 +382,7 @@ method throws a . + The method throws a . ]]> diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri.xml index 8b89fa56e94..d1cde43b3ef 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri.xml @@ -151,7 +151,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapAnyUri/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri/Overview/demo.cs" id="Snippet13"::: @@ -188,7 +188,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapAnyUri/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri/Overview/demo.cs" id="Snippet11"::: @@ -222,7 +222,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapAnyUri/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary.xml index a57edd71d92..329598c6b7e 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary.xml @@ -151,7 +151,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary/Overview/demo.cs" id="Snippet13"::: @@ -188,7 +188,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary/Overview/demo.cs" id="Snippet11"::: @@ -229,7 +229,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate.xml index 98b1405a1b6..efad46f8e57 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate.xml @@ -33,20 +33,20 @@ Wraps an XSD type. - class to wrap an XML `date` type. - + + + +## Examples + The following code example demonstrates using the class to wrap an XML `date` type. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet10"::: + ]]> @@ -78,14 +78,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Initializes a new instance of the class. - @@ -111,14 +111,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht A object to initialize the current instance. Initializes a new instance of the class with a specified object. - @@ -146,19 +146,19 @@ For more information about XSD data types, see the [XML Data Types Reference](ht An integer that indicates whether is positive. Initializes a new instance of the class with a specified object and an integer that indicates whether is a positive or negative value. - @@ -188,14 +188,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Returns the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet13"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet13"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet13"::: + ]]> @@ -225,26 +225,26 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Converts the specified into a object. A object that is obtained from . - method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. - -|Format Pattern|Description|Examples| -|--------------------|-----------------|--------------| -|yyyy|The year in 4-digit format.|1999, 1812| -|MM|The numeric month. Single-digit months have a leading zero.|11, 05| -|dd|The day of the month. Single-digit days have a leading zero.|23, 09| -|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| - - - -## Examples - The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. - + method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. + +|Format Pattern|Description|Examples| +|--------------------|-----------------|--------------| +|yyyy|The year in 4-digit format.|1999, 1812| +|MM|The numeric month. Single-digit months have a leading zero.|11, 05| +|dd|The day of the month. Single-digit days have a leading zero.|23, 09| +|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| + + + +## Examples + The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet11"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet11"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet11"::: + ]]> @@ -272,19 +272,19 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Gets or sets whether the date and time of the current instance is positive or negative. An integer that indicates whether is positive or negative. - . - - - -## Examples - The following code example shows how to use this property. This code example is part of a larger example that is provided for the class. - + . + + + +## Examples + The following code example shows how to use this property. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet15"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet15"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet15"::: + ]]> @@ -311,14 +311,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Returns as a . A that is obtained from in the format "yyyy-MM-dd" or "'-'yyyy-MM-dd" if is negative. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet12"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet12"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet12"::: + ]]> @@ -344,14 +344,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Gets or sets the date and time of the current instance. The object that contains the date and time of the current instance. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet14"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet14"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet14"::: + ]]> @@ -377,14 +377,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Gets the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet16"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet16"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet16"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay.xml index 47c469bb2ef..4773962a1dd 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay.xml @@ -150,7 +150,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDay/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay/Overview/demo.cs" id="Snippet13"::: @@ -187,7 +187,7 @@ method is capable of parsing strings in various formats. The recognizable string formats are "---ddzzz" and "---dd", which are composed out of the following format patterns. + The method is capable of parsing strings in various formats. The recognizable string formats are "---ddzzz" and "---dd", which are composed out of the following format patterns. |Format Pattern|Description|Examples| |--------------------|-----------------|--------------| @@ -197,7 +197,7 @@ ## Examples - The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDay/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay/Overview/demo.cs" id="Snippet11"::: @@ -233,7 +233,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDay/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration.xml index 010a057a12e..4d7e368c4ac 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration.xml @@ -89,7 +89,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDuration/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration/Overview/demo.cs" id="Snippet11"::: @@ -134,7 +134,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDuration/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary.xml index ee5490c6786..dfdd807ac98 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary.xml @@ -151,7 +151,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapHexBinary/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary/Overview/demo.cs" id="Snippet13"::: @@ -188,7 +188,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapHexBinary/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary/Overview/demo.cs" id="Snippet11"::: @@ -222,7 +222,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapHexBinary/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger.xml index c30d459f04f..da969c5d60a 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger.xml @@ -150,7 +150,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger/Overview/demo.cs" id="Snippet13"::: @@ -187,7 +187,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger/Overview/demo.cs" id="Snippet11"::: @@ -221,7 +221,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth.xml index d9ecc130902..36e3dc6df81 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth.xml @@ -150,7 +150,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonth/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth/Overview/demo.cs" id="Snippet13"::: @@ -187,7 +187,7 @@ method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. + The method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. |Format Pattern|Description|Examples| |--------------------|-----------------|--------------| @@ -197,7 +197,7 @@ ## Examples - The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonth/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth/Overview/demo.cs" id="Snippet11"::: @@ -233,7 +233,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonth/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay.xml index 8ed7e8a9007..4353265f553 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay.xml @@ -150,7 +150,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonthDay/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay/Overview/demo.cs" id="Snippet13"::: @@ -187,7 +187,7 @@ method is capable of parsing strings in various formats. The recognizable string formats are composed out of the format patterns shown in the following table. + The method is capable of parsing strings in various formats. The recognizable string formats are composed out of the format patterns shown in the following table. |Format Pattern|Description|Examples| |--------------------|-----------------|--------------| @@ -198,7 +198,7 @@ ## Examples - The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonthDay/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay/Overview/demo.cs" id="Snippet11"::: @@ -234,7 +234,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonthDay/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger.xml index 17cea320c19..3fc17227acd 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger.xml @@ -152,7 +152,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNegativeInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger/Overview/demo.cs" id="Snippet13"::: @@ -189,7 +189,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNegativeInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger/Overview/demo.cs" id="Snippet11"::: @@ -223,7 +223,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNegativeInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger.xml index 1795b3ce23b..67ccaaf38b2 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger.xml @@ -152,7 +152,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonNegativeInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger/Overview/demo.cs" id="Snippet13"::: @@ -189,7 +189,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonNegativeInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger/Overview/demo.cs" id="Snippet11"::: @@ -223,7 +223,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonNegativeInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger.xml index 56a8afbc1c9..59935156678 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger.xml @@ -152,7 +152,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonPositiveInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger/Overview/demo.cs" id="Snippet13"::: @@ -189,7 +189,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonPositiveInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger/Overview/demo.cs" id="Snippet11"::: @@ -223,7 +223,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonPositiveInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger.xml index 9babf1826ed..a9c706bb264 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger.xml @@ -152,7 +152,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapPositiveInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger/Overview/demo.cs" id="Snippet13"::: @@ -189,7 +189,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapPositiveInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger/Overview/demo.cs" id="Snippet11"::: @@ -223,7 +223,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapPositiveInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName.xml index 0d1c6dcce82..5e5f0aa1a06 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName.xml @@ -222,7 +222,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapQName/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName/Overview/demo.cs" id="Snippet13"::: @@ -358,7 +358,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapQName/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName/Overview/demo.cs" id="Snippet11"::: @@ -392,7 +392,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapQName/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime.xml index 01176c1eea4..e26d34e6a1d 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime.xml @@ -33,19 +33,19 @@ Wraps an XSD type. - class to wrap an XSD `time` type. - + + + +## Examples + The following code example demonstrates using the class to wrap an XSD `time` type. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet10"::: + ]]> @@ -77,14 +77,14 @@ Initializes a new instance of the class. - @@ -110,14 +110,14 @@ A object to initialize the current instance. Initializes a new instance of the class with a specified object. - @@ -147,14 +147,14 @@ Returns the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet13"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet13"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet13"::: + ]]> @@ -184,29 +184,29 @@ Converts the specified into a object. A object that is obtained from . - method is capable of parsing strings in the HH:mm:ss.fffzzz format. This is composed out of the following format patterns. - -|Format Pattern|Description|Examples| -|--------------------|-----------------|--------------| -|HH|The hour within a 24-hour range. Single-digit hours have a leading zero.|17, 07| -|mm|The minute. Single-digit minutes have a leading zero.|49, 05| -|ss|The second. Single-digit seconds have a leading zero.|32, 02| -|fff|The fraction of a second. A maximum of 7 fraction digits are allowed, and only the first three are parsed.|321635, 4592| -|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, +08:00, Z| - - Only the first 3 fraction digits are parsed because the parsed value is stored as a object, and the type supports precisely 3 fraction digits of accuracy. - - - -## Examples - The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. - + method is capable of parsing strings in the HH:mm:ss.fffzzz format. This is composed out of the following format patterns. + +|Format Pattern|Description|Examples| +|--------------------|-----------------|--------------| +|HH|The hour within a 24-hour range. Single-digit hours have a leading zero.|17, 07| +|mm|The minute. Single-digit minutes have a leading zero.|49, 05| +|ss|The second. Single-digit seconds have a leading zero.|32, 02| +|fff|The fraction of a second. A maximum of 7 fraction digits are allowed, and only the first three are parsed.|321635, 4592| +|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, +08:00, Z| + + Only the first 3 fraction digits are parsed because the parsed value is stored as a object, and the type supports precisely 3 fraction digits of accuracy. + + + +## Examples + The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet11"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet11"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet11"::: + ]]> @@ -235,14 +235,14 @@ Returns as a . A that is obtained from in the format "HH:mm:ss.fffzzz". - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet12"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet12"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet12"::: + ]]> @@ -268,14 +268,14 @@ Gets or sets the date and time of the current instance. The object that contains the date and time of the current instance. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet14"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet14"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet14"::: + ]]> @@ -301,14 +301,14 @@ Gets the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet16"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet16"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet16"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear.xml index e3d774c3545..a523a916798 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear.xml @@ -33,19 +33,19 @@ Wraps an XSD type. - class to wrap the XSD `gYear` type. - + + + +## Examples + The following code example demonstrates using the class to wrap the XSD `gYear` type. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet10"::: + ]]> @@ -77,14 +77,14 @@ Initializes a new instance of the class. - @@ -110,14 +110,14 @@ A object to initialize the current instance. Initializes a new instance of the class with a specified object. - @@ -145,14 +145,14 @@ An integer that indicates whether is positive. Initializes a new instance of the class with a specified object and an integer that indicates whether is a positive or negative value. - @@ -182,14 +182,14 @@ Returns the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet13"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet13"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet13"::: + ]]> @@ -219,24 +219,24 @@ Converts the specified into a object. A object that is obtained from . - method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. - -|Format Pattern|Description|Examples| -|--------------------|-----------------|--------------| -|yyyy|The year in 4-digit format.|1999, 1812| -|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| - - - -## Examples - The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. - + method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. + +|Format Pattern|Description|Examples| +|--------------------|-----------------|--------------| +|yyyy|The year in 4-digit format.|1999, 1812| +|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| + + + +## Examples + The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet11"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet11"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet11"::: + ]]> @@ -264,14 +264,14 @@ Gets or sets whether the date and time of the current instance is positive or negative. An integer that indicates whether is positive or negative. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet15"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet15"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet15"::: + ]]> @@ -298,14 +298,14 @@ Returns as a . A that is obtained from in the format "yyyy" or "-yyyy" if is negative. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet12"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet12"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet12"::: + ]]> @@ -331,14 +331,14 @@ Gets or sets the date and time of the current instance. The object that contains the date and time of the current instance. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet14"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet14"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet14"::: + ]]> @@ -364,14 +364,14 @@ Gets the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet16"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet16"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet16"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth.xml index 9dd131d9a38..a48f589ebc9 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth.xml @@ -33,19 +33,19 @@ Wraps an XSD type. - class to wrap the XSD `gYearMonth` type. - + + + +## Examples + The following code example demonstrates using the class to wrap the XSD `gYearMonth` type. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet10"::: + ]]> @@ -77,14 +77,14 @@ Initializes a new instance of the class. - @@ -110,14 +110,14 @@ A object to initialize the current instance. Initializes a new instance of the class with a specified object. - @@ -145,19 +145,19 @@ An integer that indicates whether is positive. Initializes a new instance of the class with a specified object and an integer that indicates whether is a positive or negative value. - @@ -187,14 +187,14 @@ Returns the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet13"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet13"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet13"::: + ]]> @@ -224,25 +224,25 @@ Converts the specified into a object. A object that is obtained from . - method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. - -|Format Pattern|Description|Examples| -|--------------------|-----------------|--------------| -|yyyy|The year in 4-digit format.|1999, 1812| -|MM|The numeric month. Single-digit months have a leading zero.|11, 05| -|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| - - - -## Examples - The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. - + method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. + +|Format Pattern|Description|Examples| +|--------------------|-----------------|--------------| +|yyyy|The year in 4-digit format.|1999, 1812| +|MM|The numeric month. Single-digit months have a leading zero.|11, 05| +|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| + + + +## Examples + The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet11"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet11"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet11"::: + ]]> @@ -270,19 +270,19 @@ Gets or sets whether the date and time of the current instance is positive or negative. An integer that indicates whether is positive or negative. - . - - - -## Examples - The following code example shows how to use this property. This code example is part of a larger example that is provided for the class. - + . + + + +## Examples + The following code example shows how to use this property. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet15"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet15"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet15"::: + ]]> @@ -309,14 +309,14 @@ Returns a as a . A that is obtained from in the format "yyyy-MM" or "'-'yyyy-MM" if is negative. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet12"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet12"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet12"::: + ]]> @@ -342,14 +342,14 @@ Gets or sets the date and time of the current instance. The object that contains the date and time of the current instance. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet14"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet14"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet14"::: + ]]> @@ -375,14 +375,14 @@ Gets the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet16"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet16"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet16"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Metadata/SoapTypeAttribute.xml b/xml/System.Runtime.Remoting.Metadata/SoapTypeAttribute.xml index 2ea92187757..b0aa39ce631 100644 --- a/xml/System.Runtime.Remoting.Metadata/SoapTypeAttribute.xml +++ b/xml/System.Runtime.Remoting.Metadata/SoapTypeAttribute.xml @@ -93,7 +93,7 @@ A value indicates the SOAP configuration options that will be used with a attribute. > [!NOTE] -> The enumeration has no effect on serialization of objects with the . +> The enumeration has no effect on serialization of objects with the . ]]> diff --git a/xml/System.Runtime.Remoting.MetadataServices/MetaData.xml b/xml/System.Runtime.Remoting.MetadataServices/MetaData.xml index 3a4d6813956..24ba3cdb460 100644 --- a/xml/System.Runtime.Remoting.MetadataServices/MetaData.xml +++ b/xml/System.Runtime.Remoting.MetadataServices/MetaData.xml @@ -18,11 +18,11 @@ Provides methods that allow you to work with XML schema. - class provides methods that allow you to generate Web Services Description Language (WSDL) from type information, convert an XML Schema into a code stream, and compile the code stream into an assembly. This functionality is also present in the [Soapsuds Tool (Soapsuds.exe)](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/xd176a6c(v=vs.100)). - + class provides methods that allow you to generate Web Services Description Language (WSDL) from type information, convert an XML Schema into a code stream, and compile the code stream into an assembly. This functionality is also present in the [Soapsuds Tool (Soapsuds.exe)](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/xd176a6c(v=vs.100)). + ]]> @@ -74,23 +74,23 @@ The strong name to compile into the new assembly. Can be . Compiles a specified code source file into a runtime assembly file. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - - - -## Examples - The following code example demonstrates the use of the method to write the schema definition of the specified types to a runtime assembly with the specified name. The `CsSource.cs` file converted here contains C# source code. - +> If a file with the specified name already exists, it is overwritten. + + + +## Examples + The following code example demonstrates the use of the method to write the schema definition of the specified types to a runtime assembly with the specified name. The `CsSource.cs` file converted here contains C# source code. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/MetaData.ConvertCodeSourceFileToAssemblyFile/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.MetadataServices/MetaData/ConvertCodeSourceFileToAssemblyFile/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertCodeSourceFileToAssemblyFile/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertCodeSourceFileToAssemblyFile/source.vb" id="Snippet1"::: + ]]> @@ -123,14 +123,14 @@ The strong name to compile into the new run-time assembly. Can be . Compiles specified code source streams into a run-time assembly file. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - +> If a file with the specified name already exists, it is overwritten. + ]]> @@ -174,13 +174,13 @@ The list of file names for the code streams that are generated. Note that the method can create multiple source code streams. Converts the specified schema definition into C# proxy source code. - [!NOTE] -> If files with the specified names already exist, they are overwritten. - +> If files with the specified names already exist, they are overwritten. + ]]> @@ -217,13 +217,13 @@ The URL where the target remote object that is represented by the new proxy will be located. Converts the specified schema definition into C# proxy source code for a remote object that is located at the specified URL. - [!NOTE] -> If files with the specified names already exist, they are overwritten. - +> If files with the specified names already exist, they are overwritten. + ]]> @@ -262,13 +262,13 @@ The namespace of the newly created proxy. Converts the specified schema definition into C# proxy source code for a remote object that is located at the specified URL and in the provided class namespace. - [!NOTE] -> If files with the specified names already exist, they are overwritten. - +> If files with the specified names already exist, they are overwritten. + ]]> @@ -310,14 +310,14 @@ The path of the XML file. Converts the specified service types to XML schema, and writes it to a file that is specified by name. - instance allows you to associate a URL with an object . - + instance allows you to associate a URL with an object . + > [!NOTE] -> If a file with the specified name already exists, it is overwritten. - +> If a file with the specified name already exists, it is overwritten. + ]]> @@ -350,22 +350,22 @@ The path of the XML file. Converts the specified object types to XML schema, and writes it to a file that is specified by name. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - - - -## Examples - The following code example demonstrates the use of the method to write the schema definition of the specified types to a file. - +> If a file with the specified name already exists, it is overwritten. + + + +## Examples + The following code example demonstrates the use of the method to write the schema definition of the specified types to a file. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/MetaData.ConvertTypesToSchemaToFile/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToFile/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToFile/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToFile/source.vb" id="Snippet1"::: + ]]> @@ -407,11 +407,11 @@ The that the schema is written to. Converts the specified service types to XML schema, and writes it to a specified stream. - instance allows you to associate a URL with an object . - + instance allows you to associate a URL with an object . + ]]> @@ -444,15 +444,15 @@ The that the schema is written to. Converts the specified object types to XML schema, and writes it to a specified stream. - method to write the schema definition of the specified types to a stream. - + method to write the schema definition of the specified types to a stream. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/MetaData.ConvertTypesToSchemaToStream/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToStream/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToStream/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToStream/source.vb" id="Snippet1"::: + ]]> @@ -483,13 +483,13 @@ The path of the file that the schema is written to. Downloads the XML schema from a URL, and writes it to the specified file. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - +> If a file with the specified name already exists, it is overwritten. + ]]> @@ -548,13 +548,13 @@ The file that the input stream is written to. Saves the input stream to a file with the specified name. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - +> If a file with the specified name already exists, it is overwritten. + ]]> diff --git a/xml/System.Runtime.Remoting.MetadataServices/SdlChannelSink.xml b/xml/System.Runtime.Remoting.MetadataServices/SdlChannelSink.xml index f205a59e289..45551c12865 100644 --- a/xml/System.Runtime.Remoting.MetadataServices/SdlChannelSink.xml +++ b/xml/System.Runtime.Remoting.MetadataServices/SdlChannelSink.xml @@ -217,9 +217,9 @@ interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together, which means that every message sink is responsible for calling on the next message sink after it has performed its work. For instance, a synchronization-related message sink might cause a lock to be acquired or released and delegated to the downstream message sink. + The proxy's job is to convert a method call that is invoked on it into a message object. The Message object, which implements the interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together, which means that every message sink is responsible for calling on the next message sink after it has performed its work. For instance, a synchronization-related message sink might cause a lock to be acquired or released and delegated to the downstream message sink. - When the formatter channel sink gets a message that needs to be sent over the channel, it calls , passing the message as a parameter. The formatter sink then creates the transport header array and calls on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that is passed back to the formatter sink. After this call returns, the message is serialized, is called on the first chain in the sink chain, and the message is passed to the channel sinks. + When the formatter channel sink gets a message that needs to be sent over the channel, it calls , passing the message as a parameter. The formatter sink then creates the transport header array and calls on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that is passed back to the formatter sink. After this call returns, the message is serialized, is called on the first chain in the sink chain, and the message is passed to the channel sinks. After the channel sinks get the message, they can write data to the stream, add headers to the header array, and add themselves to the sink stack before forwarding the call to the next sink. When the call reaches the transport sink at the end of the chain, the transport sink sends the headers and serialized message over the channel to the server, where the process is reversed. diff --git a/xml/System.Runtime.Remoting.Proxies/RealProxy.xml b/xml/System.Runtime.Remoting.Proxies/RealProxy.xml index 6ed99b591d2..f0118cbbeae 100644 --- a/xml/System.Runtime.Remoting.Proxies/RealProxy.xml +++ b/xml/System.Runtime.Remoting.Proxies/RealProxy.xml @@ -126,7 +126,7 @@ method. + The current method creates a transparent proxy, which can be accessed through the method. A client that uses an object across any kind of a remoting boundary is actually using a transparent proxy for the object. The transparent proxy gives the impression that the actual object resides in the client's space. It achieves this by forwarding calls made on it to the real object using the remoting infrastructure. @@ -329,7 +329,7 @@ method, then that instance is returned; otherwise, a new instance is returned. + If the proxy is requested for marshaling, then an `IUnknown` interface for the object represented by the current proxy instance is returned. If an `IUnknown` was previously cached by the method, then that instance is returned; otherwise, a new instance is returned. If the proxy is requested not for marshaling but for communication with unmanaged objects in the current process, then a [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper) (CCW), which can be used in the current process for communication through COM, is returned. @@ -540,7 +540,7 @@ method is used in scenarios involving an external in the same . + The method is used in scenarios involving an external in the same . ]]> @@ -585,7 +585,7 @@ method calls the parameterless constructor for the new instance of the remote object that is represented by the current . + If the `ctorMsg` parameter is `null`, then the method calls the parameterless constructor for the new instance of the remote object that is represented by the current . @@ -627,7 +627,7 @@ is called, it delegates the calls to the method. The method transforms the message in the `msg` parameter into a , and sends it to the remote object that is represented by the current instance of . + When the transparent proxy that is backed by the is called, it delegates the calls to the method. The method transforms the message in the `msg` parameter into a , and sends it to the remote object that is represented by the current instance of . The parameter provides a dictionary through the property. The dictionary contains name/value pairs of information about the method call, such as the name of the method called and its parameters. @@ -761,7 +761,7 @@ method allows the current proxy instance to implement additional COM interfaces on behalf of the server object that the current instance represents. The current method generates the requested interface and returns a pointer to it. The types of COM interfaces that can be generated by this method depend on the proxy type, which in turn might depend on the type of the server object that the current proxy instance represents. + The method allows the current proxy instance to implement additional COM interfaces on behalf of the server object that the current instance represents. The current method generates the requested interface and returns a pointer to it. The types of COM interfaces that can be generated by this method depend on the proxy type, which in turn might depend on the type of the server object that the current proxy instance represents. For more information, see . diff --git a/xml/System.Runtime.Remoting.Services/EnterpriseServicesHelper.xml b/xml/System.Runtime.Remoting.Services/EnterpriseServicesHelper.xml index 883b742ce1f..7fed8219cfd 100644 --- a/xml/System.Runtime.Remoting.Services/EnterpriseServicesHelper.xml +++ b/xml/System.Runtime.Remoting.Services/EnterpriseServicesHelper.xml @@ -172,7 +172,7 @@ method is similar to the method, but does not attempt to maintain the identity of the unmanaged object. For example, two calls with the same `IUnknown` to the current method return two different RCWs, but two calls to the method with the same `IUnknown` return the same RCW. + The method is similar to the method, but does not attempt to maintain the identity of the unmanaged object. For example, two calls with the same `IUnknown` to the current method return two different RCWs, but two calls to the method with the same `IUnknown` return the same RCW. ]]> diff --git a/xml/System.Runtime.Remoting/ActivatedClientTypeEntry.xml b/xml/System.Runtime.Remoting/ActivatedClientTypeEntry.xml index a235a842261..3d47d02d1a8 100644 --- a/xml/System.Runtime.Remoting/ActivatedClientTypeEntry.xml +++ b/xml/System.Runtime.Remoting/ActivatedClientTypeEntry.xml @@ -28,9 +28,9 @@ and it must be registered on the client by using the method. To obtain a proxy for a new instance of the client-activated object the client must first register a channel with and then activate the object by calling `new`. + To create an instance of a client-activated object on the client, you must know its and it must be registered on the client by using the method. To obtain a proxy for a new instance of the client-activated object the client must first register a channel with and then activate the object by calling `new`. - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client using the method. By calling you are giving the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server on which you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client using the method. By calling you are giving the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server on which you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client activated objects and remote object activation see [Activation of Remote Objects](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/cbzcxy2s(v=vs.100)). @@ -276,7 +276,7 @@ method. + The following code example shows a use of the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.ActivatedClientTypeEntry/CPP/activatedclienttypeentry_client.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ActivatedClientTypeEntry/Overview/activatedclienttypeentry_client.cs" id="Snippet5"::: diff --git a/xml/System.Runtime.Remoting/ActivatedServiceTypeEntry.xml b/xml/System.Runtime.Remoting/ActivatedServiceTypeEntry.xml index 22efe711c18..2a45699ac7e 100644 --- a/xml/System.Runtime.Remoting/ActivatedServiceTypeEntry.xml +++ b/xml/System.Runtime.Remoting/ActivatedServiceTypeEntry.xml @@ -28,11 +28,11 @@ method, which is the server-side counterpart of the method. The method is used on the server to allow remote activation by clients of specified object types. + The current class is used by the method, which is the server-side counterpart of the method. The method is used on the server to allow remote activation by clients of specified object types. - To create a client-activated object on the server, you must know its , and it must be registered on the server end by using the method. To obtain a proxy for a new client-activated object, the client must first register a channel with and then activate the object by calling `new` or . + To create a client-activated object on the server, you must know its , and it must be registered on the server end by using the method. To obtain a proxy for a new client-activated object, the client must first register a channel with and then activate the object by calling `new` or . - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client using the method. By calling you are giving the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client is necessary. To supply the method with the URL of the server on which you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client using the method. By calling you are giving the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client is necessary. To supply the method with the URL of the server on which you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client-activated objects and remote object activation, see [Activation of Remote Objects](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/cbzcxy2s(v=vs.100)). diff --git a/xml/System.Runtime.Remoting/IChannelInfo.xml b/xml/System.Runtime.Remoting/IChannelInfo.xml index 5d1e6fa56a5..32045493bc5 100644 --- a/xml/System.Runtime.Remoting/IChannelInfo.xml +++ b/xml/System.Runtime.Remoting/IChannelInfo.xml @@ -27,7 +27,7 @@ ## Remarks This interface is implemented by the property. It provides access to transport specific information contributed by the channels that are able to receive calls in the process or application domain where the object lives. This interface might also be used when building custom classes. - When an existing object instance is marshaled to produce a , the is copied from the channel (see ) for each registered channel and stored in the . When the is unmarshaled at its destination, the provided through the interface can be examined and used by corresponding channels in that process or application domain to create a transport message sink that manages the communication between the proxy and the server object. + When an existing object instance is marshaled to produce a , the is copied from the channel (see ) for each registered channel and stored in the . When the is unmarshaled at its destination, the provided through the interface can be examined and used by corresponding channels in that process or application domain to create a transport message sink that manages the communication between the proxy and the server object. ]]> diff --git a/xml/System.Runtime.Remoting/ObjRef.xml b/xml/System.Runtime.Remoting/ObjRef.xml index 19cbe6fb2f6..ea1ffcab202 100644 --- a/xml/System.Runtime.Remoting/ObjRef.xml +++ b/xml/System.Runtime.Remoting/ObjRef.xml @@ -40,30 +40,30 @@ Stores all relevant information required to generate a proxy in order to communicate with a remote object. - is a serializable representation of an object that extends (MBR). A is used to transfer an object reference across a boundary. Creating a for an object is known as marshaling. You can create a (marshal a ) either explicitly, by registering the MBR object with the remoting infrastructure (see and ), or implicitly, by passing an MBR object as a parameter when calling a remote object. Remoting uses objects to store and transmit all the relevant information about the being remoted. - - The contains information that describes the and class of the object being marshaled, its exact location, and communication-related information on how to reach the remoting subdivision where the object is located. - - After a class implementing is marshaled, the that represents it is transferred through a channel into another application domain, possibly in another process or computer. When the is deserialized (see [XML and SOAP Serialization](/dotnet/standard/serialization/xml-and-soap-serialization)) in the target application domain, it is parsed to create a transparent proxy for the remote MBR object. This operation is known as unmarshaling. - - A transparent proxy is an object that provides the illusion that the actual object resides in the client's space. It achieves this by forwarding calls made on it to the real object using the remoting infrastructure. The transparent proxy is itself housed by an instance of a managed run-time class of type . The implements a part of the functionality needed to forward the operations from the transparent proxy. - - A proxy object can be used without regard to any remoting subdivisions within a . Applications need not distinguish between proxy references and object references. However, service providers dealing with issues such as activation, lifetime management, and transactions need to make such distinctions. - - This class makes a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). - - - -## Examples - The following code example demonstrates the use of a custom . To view the activation code that tests the custom , see the example for the method. - + is a serializable representation of an object that extends (MBR). A is used to transfer an object reference across a boundary. Creating a for an object is known as marshaling. You can create a (marshal a ) either explicitly, by registering the MBR object with the remoting infrastructure (see and ), or implicitly, by passing an MBR object as a parameter when calling a remote object. Remoting uses objects to store and transmit all the relevant information about the being remoted. + + The contains information that describes the and class of the object being marshaled, its exact location, and communication-related information on how to reach the remoting subdivision where the object is located. + + After a class implementing is marshaled, the that represents it is transferred through a channel into another application domain, possibly in another process or computer. When the is deserialized (see [XML and SOAP Serialization](/dotnet/standard/serialization/xml-and-soap-serialization)) in the target application domain, it is parsed to create a transparent proxy for the remote MBR object. This operation is known as unmarshaling. + + A transparent proxy is an object that provides the illusion that the actual object resides in the client's space. It achieves this by forwarding calls made on it to the real object using the remoting infrastructure. The transparent proxy is itself housed by an instance of a managed run-time class of type . The implements a part of the functionality needed to forward the operations from the transparent proxy. + + A proxy object can be used without regard to any remoting subdivisions within a . Applications need not distinguish between proxy references and object references. However, service providers dealing with issues such as activation, lifetime management, and transactions need to make such distinctions. + + This class makes a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). + + + +## Examples + The following code example demonstrates the use of a custom . To view the activation code that tests the custom , see the example for the method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef2/CPP/example.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/Overview/example.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjRef/Overview/example.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjRef/Overview/example.vb" id="Snippet1"::: + ]]> @@ -130,12 +130,12 @@ The of the object that the new instance will reference. Initializes a new instance of the class to reference a specified of a specified . - @@ -169,17 +169,17 @@ The contextual information about the source or destination of the exception. Initializes a new instance of the class from serialized data. - . - - - -## Examples + . + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: + ]]> @@ -211,17 +211,17 @@ Gets or sets the for the . The interface for the . - is created (see for details on marshaling). This information can be used by the channels in other processes or application domains to decide whether or not to create a transport sink to communicate with the object represented by the current instance. - - - -## Examples + is created (see for details on marshaling). This information can be used by the channels in other processes or application domains to decide whether or not to create a transport sink to communicate with the object represented by the current instance. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: + ]]> @@ -248,11 +248,11 @@ Gets or sets the for the . The interface for the . - bound object types only, and represents the groups of objects that provide such run-time services as transactions. - + bound object types only, and represents the groups of objects that provide such run-time services as transactions. + ]]> @@ -293,19 +293,19 @@ The contextual information about the source or destination of the serialization. Populates a specified with the data needed to serialize the current instance. - with all the data needed to recreate the . - - The current method is an implementation of . - - - -## Examples + with all the data needed to recreate the . + + The current method is an implementation of . + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: + ]]> The parameter is . @@ -346,17 +346,17 @@ Returns a reference to the remote object that the describes. A reference to the remote object that the describes. - The immediate caller does not have serialization formatter permission. @@ -391,12 +391,12 @@ Returns a Boolean value that indicates whether the current instance references an object located in the current . A Boolean value that indicates whether the current instance references an object located in the current . - @@ -433,12 +433,12 @@ Returns a Boolean value that indicates whether the current instance references an object located in the current process. A Boolean value that indicates whether the current instance references an object located in the current process. - @@ -464,17 +464,17 @@ Gets or sets the for the object that the describes. The for the object that the describes. - contains detailed information about the type of remote object represented by the current . The current property contains a list of interfaces that the type implements, as well as the type hierarchy. This information might be used to refine the proxy incrementally to adjust to the client's view of the remote object's type. - - - -## Examples + contains detailed information about the type of remote object represented by the current . The current property contains a list of interfaces that the type implements, as well as the type hierarchy. This information might be used to refine the proxy incrementally to adjust to the client's view of the remote object's type. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: + ]]> @@ -500,17 +500,17 @@ Gets or sets the URI of the specific object instance. The URI of the specific object instance. - diff --git a/xml/System.Runtime.Remoting/ObjectHandle.xml b/xml/System.Runtime.Remoting/ObjectHandle.xml index 4899cafb437..cec1f9af215 100644 --- a/xml/System.Runtime.Remoting/ObjectHandle.xml +++ b/xml/System.Runtime.Remoting/ObjectHandle.xml @@ -54,20 +54,20 @@ Wraps marshal-by-value object references, allowing them to be returned through an indirection. - class is used to pass an object (in a wrapped state) between multiple application domains without loading the metadata for the wrapped object in each through which the travels. Thus, the class gives the caller control of when the of the remote object is loaded into a domain. - - - -## Examples - The following code example shows how to create an object in another , and retrieve a proxy to the object from a . In this example, you can assume that the code of the `MyType` class is compiled into an assembly called "ObjectHandleAssembly". - + class is used to pass an object (in a wrapped state) between multiple application domains without loading the metadata for the wrapped object in each through which the travels. Thus, the class gives the caller control of when the of the remote object is loaded into a domain. + + + +## Examples + The following code example shows how to create an object in another , and retrieve a proxy to the object from a . In this example, you can assume that the code of the `MyType` class is compiled into an assembly called "ObjectHandleAssembly". + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ObjectHandle/CPP/objecthandleassembly.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.vb" id="Snippet1"::: + ]]> @@ -184,15 +184,15 @@ Returns the wrapped object. The wrapped object. - , retrieve a proxy to it with the method, and use the proxy to access the remote object. - + , retrieve a proxy to it with the method, and use the proxy to access the remote object. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ObjectHandle/CPP/objecthandleassembly.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.vb" id="Snippet2"::: + ]]> diff --git a/xml/System.Runtime.Remoting/RemotingConfiguration.xml b/xml/System.Runtime.Remoting/RemotingConfiguration.xml index eac025ec91d..1037d46d222 100644 --- a/xml/System.Runtime.Remoting/RemotingConfiguration.xml +++ b/xml/System.Runtime.Remoting/RemotingConfiguration.xml @@ -102,7 +102,7 @@ ## Examples - The following code example demonstrates the use of the property to indicate the name of the remoting application. For the full example code, see examples for the and methods. + The following code example demonstrates the use of the property to indicate the name of the remoting application. For the full example code, see examples for the and methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ServerActivation1/CPP/server.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/ApplicationName/server.cs" id="Snippet2"::: @@ -156,14 +156,14 @@ [!NOTE] -> is obsolete. Please use instead. +> is obsolete. Please use instead. Passing `null` as the `filename` parameter will cause default remoting initialization without requiring the existence of a configuration file. For configuration file syntax, see [Remoting Settings Schema](/previous-versions/dotnet/netframework-4.0/z415cf9a(v=vs.100)). > [!NOTE] -> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](/previous-versions/dotnet/netframework-4.0/23bk23zc(v=vs.100)). +> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](/previous-versions/dotnet/netframework-4.0/23bk23zc(v=vs.100)). ]]> @@ -209,7 +209,7 @@ For configuration file syntax, see [Remoting Settings Schema](https://msdn.microsoft.com/library/dc2d1e62-9af7-4ca1-99fd-98b93bb4db9e). > [!NOTE] -> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](https://msdn.microsoft.com/library/c72d561c-1266-4c8b-b258-2c168c08da9a). +> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](https://msdn.microsoft.com/library/c72d561c-1266-4c8b-b258-2c168c08da9a). ]]> @@ -818,9 +818,9 @@ and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new`. + To create an instance of a client-activated object on the server, you must know its and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new`. - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client-activated objects, see [Client Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/w93betdk(v=vs.100)). @@ -866,12 +866,12 @@ and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new`. + To create an instance of a client-activated object on the server, you must know its and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new`. - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. ## Examples - The following code example demonstrates registration of an object type on the client end as a type that can be activated on the server. For the server code that corresponds to the presented client code, see the example for the method. + The following code example demonstrates registration of an object type on the client end as a type that can be activated on the server. For the server code that corresponds to the presented client code, see the example for the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ClientActivation/CPP/client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/RegisterActivatedClientType/client.cs" id="Snippet1"::: @@ -928,9 +928,9 @@ and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new` or . + To create an instance of a client-activated object on the server, you must know its and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new` or . - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application, where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application, where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client-activated objects, see [Client Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/w93betdk(v=vs.100)). @@ -974,16 +974,16 @@ and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new` or . + To create an instance of a client-activated object on the server, you must know its and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new` or . - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application, where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application, where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client-activated objects, see [Client Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/w93betdk(v=vs.100)). ## Examples - The following code example demonstrates registration of an object type on the server as a type that can be activated by the client. For the client code that corresponds to the presented server code, see the example for the method. + The following code example demonstrates registration of an object type on the server as a type that can be activated by the client. For the client code that corresponds to the presented server code, see the example for the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ClientActivation/CPP/server.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/RegisterActivatedClientType/server.cs" id="Snippet2"::: @@ -1045,7 +1045,7 @@ , and activating the object by calling `new` or . To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. + Any client that knows the URI of a registered well-known object can obtain a proxy for the object by registering the channel it prefers with , and activating the object by calling `new` or . To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. For a detailed description of well-known objects, see [Server Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/y0h540a7(v=vs.100)). @@ -1091,14 +1091,14 @@ , and activating the object by calling `new` or . To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. + Any client that knows the URI of a registered well-known object can obtain a proxy for the object by registering the channel it prefers with , and activating the object by calling `new` or . To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. For a detailed description of well-known objects, see [Server Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/y0h540a7(v=vs.100)). ## Examples - The following code example demonstrates registration of an object type on the client end as a well-known type. For the server code that corresponds to the presented client code, see the example for the method. + The following code example demonstrates registration of an object type on the client end as a well-known type. For the server code that corresponds to the presented client code, see the example for the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ServerActivation1/CPP/client.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/ApplicationName/client.cs" id="Snippet5"::: @@ -1160,9 +1160,9 @@ , and activating the object by calling `new` or the method. To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. + Any client that knows the URI of a registered well-known object can obtain a proxy for the object by registering the channel it prefers with , and activating the object by calling `new` or the method. To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. - When the call arrives at the server, the .NET Framework extracts the URI from the message, examines the remoting tables to locate the reference for the object that matches the URI, and then instantiates the object if necessary, forwarding the method call to the object. If the object is registered as , it is destroyed after the method call is completed. A new instance of the object is created for each method called. The only difference between and `new` is that the former allows you to specify a URL as a parameter, and the latter obtains the URL from the configuration. + When the call arrives at the server, the .NET Framework extracts the URI from the message, examines the remoting tables to locate the reference for the object that matches the URI, and then instantiates the object if necessary, forwarding the method call to the object. If the object is registered as , it is destroyed after the method call is completed. A new instance of the object is created for each method called. The only difference between and `new` is that the former allows you to specify a URL as a parameter, and the latter obtains the URL from the configuration. The remote object itself is not instantiated by the registration process. This only happens when a client attempts to call a method on the object or activates the object from the client side. @@ -1219,9 +1219,9 @@ , and activating the object by calling `new` or the method. To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. + Any client that knows the URI of a registered well-known object can obtain a proxy for the object by registering the channel it prefers with , and activating the object by calling `new` or the method. To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. - When the call arrives at the server, the .NET Framework extracts the URI from the message, examines the remoting tables to locate the reference for the object that matches the URI, and then instantiates the object if necessary, forwarding the method call to the object. If the object is registered as , it is destroyed after the method call is completed. A new instance of the object is created for each method called. The only difference between and `new` is that the former allows you to specify a URL as a parameter, and the latter obtains the URL from the configuration. + When the call arrives at the server, the .NET Framework extracts the URI from the message, examines the remoting tables to locate the reference for the object that matches the URI, and then instantiates the object if necessary, forwarding the method call to the object. If the object is registered as , it is destroyed after the method call is completed. A new instance of the object is created for each method called. The only difference between and `new` is that the former allows you to specify a URL as a parameter, and the latter obtains the URL from the configuration. The remote object itself is not instantiated by the registration process. This only happens when a client attempts to call a method on the object or activates the object from the client side. @@ -1230,7 +1230,7 @@ ## Examples - The following code example demonstrates registration of an object type on the server as a well-known object type. For the client code that corresponds to the presented server code, see the example for the method. + The following code example demonstrates registration of an object type on the server as a well-known object type. For the client code that corresponds to the presented server code, see the example for the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ServerActivation1/CPP/server.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/ApplicationName/server.cs" id="Snippet1"::: diff --git a/xml/System.Runtime.Remoting/RemotingException.xml b/xml/System.Runtime.Remoting/RemotingException.xml index f8323f6bcda..93a7d0362f3 100644 --- a/xml/System.Runtime.Remoting/RemotingException.xml +++ b/xml/System.Runtime.Remoting/RemotingException.xml @@ -34,7 +34,7 @@ ## Remarks uses the HRESULT COR_E_REMOTING, which has the value 0x8013150B. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. For a list of initial property values for an instance of , see the constructors. @@ -78,8 +78,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("")| +||`null`| +||The empty string ("")| ]]> @@ -114,8 +114,8 @@ |Property Type|Condition| |-------------------|---------------| -||`null`| -||The `message` string| +||`null`| +||The `message` string| ]]> @@ -193,8 +193,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.Remoting/RemotingServices.xml b/xml/System.Runtime.Remoting/RemotingServices.xml index 0723eeb8c4f..81f351e665f 100644 --- a/xml/System.Runtime.Remoting/RemotingServices.xml +++ b/xml/System.Runtime.Remoting/RemotingServices.xml @@ -94,7 +94,7 @@ ## Examples - The following code example demonstrates how to use the method to create a proxy to a well-known object. + The following code example demonstrates how to use the method to create a proxy to a well-known object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.BasicSample/CPP/basicclient.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/Connect/basicclient.cs" id="Snippet1"::: @@ -149,7 +149,7 @@ ## Remarks The returned proxy object points to an endpoint served by the specified well-known object. No messages are sent over the network until a method is called on the proxy. - The `data` object is used to communicate information to the channel, and is passed to the method. + The `data` object is used to communicate information to the channel, and is passed to the method. ]]> @@ -191,7 +191,7 @@ method to disconnect an object from the remoting channels. + The following code example demonstrates how to use the method to disconnect an object from the remoting channels. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.BasicSample/CPP/manualserver.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/Connect/manualserver.cs" id="Snippet2"::: @@ -245,7 +245,7 @@ ## Examples - The following code example demonstrates how to use the method to forward method calls to remote objects. + The following code example demonstrates how to use the method to forward method calls to remote objects. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.ExecuteMessage/CPP/serviceclass.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/ExecuteMessage/serviceclass.cs" id="Snippet1"::: @@ -339,7 +339,7 @@ ## Examples - The following code example demonstrates how to use the method to get a lifetime lease for the specified object. + The following code example demonstrates how to use the method to get a lifetime lease for the specified object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.TimerSample/CPP/timerclient.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/GetLifetimeService/timerclient.cs" id="Snippet1"::: @@ -396,7 +396,7 @@ , , and properties of and is used by classes implementing the interface. Consumers of classes should reference the property. + This determines the method base from the , , and properties of and is used by classes implementing the interface. Consumers of classes should reference the property. ]]> @@ -622,7 +622,7 @@ method is very useful in the pluggable parts of the remoting infrastructure (for example, channel sinks, dynamic sinks, and context sinks) that use objects, because the current method will return the associated type object from the URI. + Because remoting identifies endpoints using URIs, the method is very useful in the pluggable parts of the remoting infrastructure (for example, channel sinks, dynamic sinks, and context sinks) that use objects, because the current method will return the associated type object from the URI. @@ -911,7 +911,7 @@ ## Examples - The following code example demonstrates the use of the method to determine whether an object is a proxy or a real object. For the complete example code, see the example for the class. + The following code example demonstrates the use of the method to determine whether an object is a proxy or a real object. For the complete example code, see the example for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncResult.NewExamples/CPP/ad.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/IsTransparentProxy/ad.cs" id="Snippet6"::: @@ -1018,7 +1018,7 @@ A contains information that describes the and class of the object being marshaled, a URI that uniquely identifies the specific object instance, and communication related information about how to reach the remoting subdivision where the object is located. - During marshaling, the context from the current thread is used, not the context that was active when the object was created. If a URI was not explicitly set by the method, it is automatically generated by the remoting identity infrastructure. + During marshaling, the context from the current thread is used, not the context that was active when the object was created. If a URI was not explicitly set by the method, it is automatically generated by the remoting identity infrastructure. You cannot associate a URI with a proxy for one of two reasons: either the URI was generated at the server side for the object it represents, or the object is well known, in which case the URI is known. For this reason, if the `Obj` parameter is a proxy, an exception will be thrown. For custom proxies this restriction is relaxed because the transparent proxy is treated as the server object. @@ -1079,7 +1079,7 @@ ## Examples - The following code example demonstrates how to use the current method to marshal a specified object. + The following code example demonstrates how to use the current method to marshal a specified object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.BasicSample/CPP/manualserver.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/Connect/manualserver.cs" id="Snippet2"::: @@ -1138,7 +1138,7 @@ A contains information that describes the and class of the object being marshaled, a URI that uniquely identifies the specific object instance, and communication related information about how to reach the remoting subdivision where the object is located. - The specified is used by the remoting infrastructure to limit the scope of the exposed type hierarchy. For example, if object A derives from object B, which derives from object C, and is called, then the client can cast the proxy between C and B but not to A. + The specified is used by the remoting infrastructure to limit the scope of the exposed type hierarchy. For example, if object A derives from object B, which derives from object C, and is called, then the client can cast the proxy between C and B but not to A. During marshaling, the context from the current thread is used, not the context that was active when the object was created. @@ -1199,7 +1199,7 @@ ## Examples - The following code example demonstrates how to set the URI that will be used by the method when marshaling the specified object. + The following code example demonstrates how to set the URI that will be used by the method when marshaling the specified object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RemotingServices.SetObjectUriForMarshal/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System/MarshalByRefObject/Overview/source.cs" id="Snippet1"::: diff --git a/xml/System.Runtime.Remoting/RemotingTimeoutException.xml b/xml/System.Runtime.Remoting/RemotingTimeoutException.xml index 207e2f48b23..604c1991e6a 100644 --- a/xml/System.Runtime.Remoting/RemotingTimeoutException.xml +++ b/xml/System.Runtime.Remoting/RemotingTimeoutException.xml @@ -36,7 +36,7 @@ uses the HRESULT COR_E_REMOTING, which has the value 0x8013150B. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. For a list of initial property values for an instance of , see the constructors. @@ -80,8 +80,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||Localized error message for | +||`null`| +||Localized error message for | ]]> @@ -115,8 +115,8 @@ |Property Type|Condition| |-------------------|---------------| -||`null`| -||The `message` string| +||`null`| +||The `message` string| ]]> @@ -154,8 +154,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference| -||The error message string| +||The inner exception reference| +||The error message string| ]]> diff --git a/xml/System.Runtime.Remoting/ServerException.xml b/xml/System.Runtime.Remoting/ServerException.xml index 9dc74e3f9c0..e3f8d91726a 100644 --- a/xml/System.Runtime.Remoting/ServerException.xml +++ b/xml/System.Runtime.Remoting/ServerException.xml @@ -34,7 +34,7 @@ ## Remarks uses the HRESULT COR_E_SERVER, which has the value 0x8013150E. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. For a list of initial property values for an instance of , see the constructors. @@ -78,8 +78,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("")| +||`null`| +||The empty string ("")| ]]> @@ -114,8 +114,8 @@ |Property Type|Condition| |-------------------|---------------| -||`null`| -||The `message` string| +||`null`| +||The `message` string| ]]> @@ -154,8 +154,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference| -||The error message string| +||The inner exception reference| +||The error message string| ]]> diff --git a/xml/System.Runtime.Remoting/SoapServices.xml b/xml/System.Runtime.Remoting/SoapServices.xml index 3bb08ca4bb6..df30dfeb19c 100644 --- a/xml/System.Runtime.Remoting/SoapServices.xml +++ b/xml/System.Runtime.Remoting/SoapServices.xml @@ -291,7 +291,7 @@ and . + The current method returns values set up through and . @@ -342,7 +342,7 @@ and . + The current method returns values set up through and . @@ -391,7 +391,7 @@ has not been registered with any SOAPAction value, the method returns the SOAPAction automatically cached with the . + If the given has not been registered with any SOAPAction value, the method returns the SOAPAction automatically cached with the . diff --git a/xml/System.Runtime.Remoting/WellKnownClientTypeEntry.xml b/xml/System.Runtime.Remoting/WellKnownClientTypeEntry.xml index 3b154bd8302..e7e1b3fcea4 100644 --- a/xml/System.Runtime.Remoting/WellKnownClientTypeEntry.xml +++ b/xml/System.Runtime.Remoting/WellKnownClientTypeEntry.xml @@ -30,7 +30,7 @@ ## Remarks Server-activated types can be either single call or singleton. If a class is registered as a single call type, a new instance is created each time a call from the client arrives. All calls to a singleton object are handled by one instance of that object, unless that object has been collected. - Any client that knows the URI of a registered server-activated object can obtain a proxy for this object by registering the channel it prefers with and activating the object by calling `new` or . To activate a server-activated object with `new`, you must first register the server-activated object type on the client using the method. By calling , you are giving the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate a server-activated object, you must supply it with the object's URL as an argument, so no prior registration on the client is necessary. + Any client that knows the URI of a registered server-activated object can obtain a proxy for this object by registering the channel it prefers with and activating the object by calling `new` or . To activate a server-activated object with `new`, you must first register the server-activated object type on the client using the method. By calling , you are giving the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate a server-activated object, you must supply it with the object's URL as an argument, so no prior registration on the client is necessary. For a detailed description of server-activated objects and remote object activation, see [Activation of Remote Objects](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/cbzcxy2s(v=vs.100)). @@ -216,7 +216,7 @@ is not `null`, it is returned at the end of the string. + If is not `null`, it is returned at the end of the string. ]]> diff --git a/xml/System.Runtime.Remoting/WellKnownObjectMode.xml b/xml/System.Runtime.Remoting/WellKnownObjectMode.xml index 37b24eee498..08bdabee479 100644 --- a/xml/System.Runtime.Remoting/WellKnownObjectMode.xml +++ b/xml/System.Runtime.Remoting/WellKnownObjectMode.xml @@ -28,11 +28,11 @@ Defines how well-known objects are activated. - method on the server side. - + method on the server side. + ]]> diff --git a/xml/System.Runtime.Remoting/WellKnownServiceTypeEntry.xml b/xml/System.Runtime.Remoting/WellKnownServiceTypeEntry.xml index 5383555773d..48bfb308791 100644 --- a/xml/System.Runtime.Remoting/WellKnownServiceTypeEntry.xml +++ b/xml/System.Runtime.Remoting/WellKnownServiceTypeEntry.xml @@ -30,7 +30,7 @@ ## Remarks Server-activated object types can be either single call or singleton. If an object type is single call, a new instance of it is created each time a call from the client comes in. All calls to a singleton object are handled by one instance of that object. - Any client that knows the URI of this object can obtain a proxy for this object by registering the channel it prefers with and activating the object by calling `new` or . + Any client that knows the URI of this object can obtain a proxy for this object by registering the channel it prefers with and activating the object by calling `new` or . It is important to note that the remote object itself is not created by the registration process. This only happens when a client attempts to call a method on the object or activates the object from the client side. diff --git a/xml/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.xml b/xml/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.xml index 2087d015db4..61f9beb77b1 100644 --- a/xml/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.xml +++ b/xml/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.xml @@ -128,8 +128,8 @@ This constructor sets the properties of the |`null`| -||A with a value that indicates that serialized data can be transmitted to or received from any of the other contexts. ()| +||`null`| +||A with a value that indicates that serialized data can be transmitted to or received from any of the other contexts. ()| ]]> diff --git a/xml/System.Runtime.Serialization.Formatters.Soap/SoapFormatter.xml b/xml/System.Runtime.Serialization.Formatters.Soap/SoapFormatter.xml index 189c0f3d8c9..93d90c69c68 100644 --- a/xml/System.Runtime.Serialization.Formatters.Soap/SoapFormatter.xml +++ b/xml/System.Runtime.Serialization.Formatters.Soap/SoapFormatter.xml @@ -35,7 +35,7 @@ The and interface allows the specification of two separate object graphs: the graph of objects to serialize, and an additional graph that contains an array of header objects that convey information about the remote function call (for example, transaction ID or a method signature). For proper serialization, the root object of the first graph must be an object that implements either the interface or the interface. -During deserialization of an RPC, a delegate is specified to the method of the formatter. The remoting infrastructure uses the delegate to produce an object that supports the interface. This object contains the information stored in the headers, and becomes the root of the graph returned by the deserializer. +During deserialization of an RPC, a delegate is specified to the method of the formatter. The remoting infrastructure uses the delegate to produce an object that supports the interface. This object contains the information stored in the headers, and becomes the root of the graph returned by the deserializer. The can also handle RPCs that are produced with objects that implement the interface. To create an RPC without using the functionality, place an object that supports the interface at the root of a graph being serialized. To deserialize an RPC created in this manner the property must be set to another object that supports the interface, and contains the relevant remote call information. @@ -84,8 +84,8 @@ TimeSpan objects are serialized according to the ISO 8601: 1998 section 5.5.3.2. |Property|Value| |--------------|-----------| -||`null`| -||A new initialized to specify that the serialized data can be transmitted to or received from any of the other contexts| +||`null`| +||A new initialized to specify that the serialized data can be transmitted to or received from any of the other contexts| diff --git a/xml/System.Runtime.Serialization.Json/DataContractJsonSerializer.xml b/xml/System.Runtime.Serialization.Json/DataContractJsonSerializer.xml index 9341dfb65e2..75061ece293 100644 --- a/xml/System.Runtime.Serialization.Json/DataContractJsonSerializer.xml +++ b/xml/System.Runtime.Serialization.Json/DataContractJsonSerializer.xml @@ -972,7 +972,7 @@ determines whether it can read a object by checking that it is positioned on an XML element. It also examines the name and namespace of the XML element that the reader is positioned at and compares the values to the expected name and namespace. The expected name can be set with the `rootName` value passed into the constructor (if present), or is "root" if absent. The expected namespace is the empty string. + The determines whether it can read a object by checking that it is positioned on an XML element. It also examines the name and namespace of the XML element that the reader is positioned at and compares the values to the expected name and namespace. The expected name can be set with the `rootName` value passed into the constructor (if present), or is "root" if absent. The expected namespace is the empty string. Note that this method is intended for advanced scenarios when working with XML mapped from JSON. @@ -1134,9 +1134,9 @@ . + This property can be set using a constructor. For a list, see . - The property specifies the maximum number of objects that the serializer serializes or deserializes in a single or method call. The method always reads one root object, but this object may have other objects in its data members. Those objects may have other objects. The default is . Note that when serializing or deserializing arrays, every array entry counts as a separate object. Also, note that some objects may have a large memory representation, so this quota alone may not be sufficient to prevent Denial of Service attacks. For more information, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). If you need to increase this quota beyond its default value, it is important to do so both on the sending (serializing) and receiving (deserializing) sides. It applies both when reading and writing data. + The property specifies the maximum number of objects that the serializer serializes or deserializes in a single or method call. The method always reads one root object, but this object may have other objects in its data members. Those objects may have other objects. The default is . Note that when serializing or deserializing arrays, every array entry counts as a separate object. Also, note that some objects may have a large memory representation, so this quota alone may not be sufficient to prevent Denial of Service attacks. For more information, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). If you need to increase this quota beyond its default value, it is important to do so both on the sending (serializing) and receiving (deserializing) sides. It applies both when reading and writing data. ]]> diff --git a/xml/System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.xml b/xml/System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.xml index f888d08d8ae..cc938c85d0b 100644 --- a/xml/System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.xml +++ b/xml/System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.xml @@ -52,11 +52,11 @@ Specifies the interface for initializing a JavaScript Object Notation (JSON) reader when reusing them to read from a particular stream or buffer. - objects created by one of the methods implement this interface and are initialized ready to read JSON-encoded data. But if a user wants to reuse the same object to read other JSON-encoded data, then the reader must be initialized to the second dataset to be read by using one of the methods. - + objects created by one of the methods implement this interface and are initialized ready to read JSON-encoded data. But if a user wants to reuse the same object to read other JSON-encoded data, then the reader must be initialized to the second dataset to be read by using one of the methods. + ]]> @@ -70,13 +70,13 @@ Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified stream or buffer that contains JSON-encoded data. - objects created by one of the methods implement this interface and are ready to read JSON-encoded data. But if a user wants to reuse the same object to read other JSON-encoded data, then the reader must be initialized to the second dataset to be read by using the one of the methods. - - The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. - + objects created by one of the methods implement this interface and are ready to read JSON-encoded data. But if a user wants to reuse the same object to read other JSON-encoded data, then the reader must be initialized to the second dataset to be read by using the one of the methods. + + The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. + ]]> @@ -147,15 +147,15 @@ Delegate to call when the reader is closed. Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified stream that contains JSON-encoded data. - object that reads JSON-encoded streams can be reused by calling the method to reinitialize it. - - The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if `null` is passed. - - The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. - + object that reads JSON-encoded streams can be reused by calling the method to reinitialize it. + + The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if `null` is passed. + + The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. + ]]> @@ -229,15 +229,15 @@ The delegate to call when the reader is closed. Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified buffer that contains JSON-encoded data. - object that reads a JSON-encoded buffered can be reused by calling the method to reinitialize it. - - The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if `null` is passed. - - The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. - + object that reads a JSON-encoded buffered can be reused by calling the method to reinitialize it. + + The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if `null` is passed. + + The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. + ]]> diff --git a/xml/System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.xml b/xml/System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.xml index b5a0a923cf7..d72235ad5bb 100644 --- a/xml/System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.xml +++ b/xml/System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.xml @@ -52,11 +52,11 @@ Specifies the interface for initializing a JavaScript Object Notation (JSON) writer when reusing them to write to a particular output stream. - objects created by the methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the method. - + objects created by the methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the method. + ]]> @@ -109,13 +109,13 @@ If , the output stream is closed by the writer when done; otherwise . Initializes (or reinitializes) a JavaScript Object Notation (JSON) writer to a specified output stream with specified character encoding. - objects created by the methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the method. - - The writers created by can handle the UTF-8 and the UTF-16 (big- or little-endian) encodings. - + objects created by the methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the method. + + The writers created by can handle the UTF-8 and the UTF-16 (big- or little-endian) encodings. + ]]> diff --git a/xml/System.Runtime.Serialization.Json/JsonReaderWriterFactory.xml b/xml/System.Runtime.Serialization.Json/JsonReaderWriterFactory.xml index 209ef9c0131..17a29a10444 100644 --- a/xml/System.Runtime.Serialization.Json/JsonReaderWriterFactory.xml +++ b/xml/System.Runtime.Serialization.Json/JsonReaderWriterFactory.xml @@ -58,11 +58,11 @@ Produces instances of that can read data encoded with JavaScript Object Notation (JSON) from a stream or buffer and map it to an XML Infoset and instances of that can map an XML Infoset to JSON and write JSON-encoded data to a stream. - class can be used to create the necessary XML readers and writers. Note that not every XML Infoset element can be mapped to JSON. For more information about mapping, see [How to: Serialize and Deserialize JSON Data](/dotnet/framework/wcf/feature-details/how-to-serialize-and-deserialize-json-data). - + class can be used to create the necessary XML readers and writers. Note that not every XML Infoset element can be mapped to JSON. For more information about mapping, see [How to: Serialize and Deserialize JSON Data](/dotnet/framework/wcf/feature-details/how-to-serialize-and-deserialize-json-data). + ]]> @@ -76,11 +76,11 @@ Creates an that can map - streams or buffers encoded with JavaScript Object Notation (JSON) to an XML Infoset. - to prevent Denial of Service (DoS) attacks when reading untrusted data. For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + to prevent Denial of Service (DoS) attacks when reading untrusted data. For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -132,13 +132,13 @@ Creates an that can map buffers encoded with JavaScript Object Notation (JSON) to an XML Infoset. An that can process JavaScript Object Notation (JSON) data. - parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. - - For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. + + For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -190,13 +190,13 @@ Creates an that can map streams encoded with JavaScript Object Notation (JSON) to an XML Infoset. An that can read JavaScript Object Notation (JSON). - parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. - - For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. + + For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -252,13 +252,13 @@ Creates an that can map buffers encoded with JavaScript Object Notation (JSON), of a specified size and offset, to an XML Infoset. An that can read JavaScript Object Notation (JSON). - parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. - - For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. + + For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -329,11 +329,11 @@ Creates an that can map streams encoded with JavaScript Object Notation (JSON), of a specified size and offset, to an XML Infoset. An that can read JavaScript Object Notation (JSON). - to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -408,11 +408,11 @@ Creates an that can map buffers encoded with JavaScript Object Notation (JSON), with a specified size and offset and character encoding, to an XML Infoset. An that can read JavaScript Object Notation (JSON). - to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -426,11 +426,11 @@ Creates an that writes data encoded with JSON to a stream. - static method returns an instance of an that can map an XML Infoset to a JSON stream. The is not guaranteed to produce valid JSON. If it is used in a way not supported by the JSON-XML mapping, it may either throw an exception or write an invalid JSON document. - + static method returns an instance of an that can map an XML Infoset to a JSON stream. The is not guaranteed to produce valid JSON. If it is used in a way not supported by the JSON-XML mapping, it may either throw an exception or write an invalid JSON document. + ]]> @@ -480,11 +480,11 @@ Creates an that writes data encoded with JSON to a stream. An that writes data encoded with JSON to the stream based on an XML Infoset. - @@ -536,11 +536,11 @@ Creates an that writes data encoded with JSON to a stream with a specified character encoding. An that writes data encoded with JSON to the stream based on an XML Infoset. - diff --git a/xml/System.Runtime.Serialization/CollectionDataContractAttribute.xml b/xml/System.Runtime.Serialization/CollectionDataContractAttribute.xml index f8eb505dcb9..d5af14ad151 100644 --- a/xml/System.Runtime.Serialization/CollectionDataContractAttribute.xml +++ b/xml/System.Runtime.Serialization/CollectionDataContractAttribute.xml @@ -63,19 +63,19 @@ ## Remarks The is intended to ease interoperability when working with data from non-WCF providers and to control the exact shape of serialized instances. To this end, the property enables you to control the names of the repeating items inside a collection. This is especially useful when the provider does not use the XML element type name as the array item name, for example, if a provider uses "String" as an element type name instead of the XSD type name "string". - The is also intended to be used with dictionary types to handle keyed collections. Dictionary types are classes that implement either the or the interface, for example, the . Use the and properties to set custom names when using the class. + The is also intended to be used with dictionary types to handle keyed collections. Dictionary types are classes that implement either the or the interface, for example, the . Use the and properties to set custom names when using the class. For more information about using the , see [Using Data Contracts](/dotnet/framework/wcf/feature-details/using-data-contracts). ## Examples - The following example applies the to a class that inherits from the class. The code sets the and properties to custom values. + The following example applies the to a class that inherits from the class. The code sets the and properties to custom values. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/collectiondatacontractattribute/cs/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/collectiondatacontractattribute/vb/source.vb" id="Snippet1"::: - When the [ServiceModel Metadata Utility Tool (Svcutil.exe)](/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe) is used to generate code for the client, the code resembles the following example. Notice that the name of the class is changed, as well as the . When using generics, the type parameter name is used to create the resulting type name. + When the [ServiceModel Metadata Utility Tool (Svcutil.exe)](/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe) is used to generate code for the client, the code resembles the following example. Notice that the name of the class is changed, as well as the . When using generics, the type parameter name is used to create the resulting type name. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/collectiondatacontractattribute/cs/source.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/collectiondatacontractattribute/vb/source.vb" id="Snippet2"::: diff --git a/xml/System.Runtime.Serialization/DataContractAttribute.xml b/xml/System.Runtime.Serialization/DataContractAttribute.xml index bf97a651270..22045702da8 100644 --- a/xml/System.Runtime.Serialization/DataContractAttribute.xml +++ b/xml/System.Runtime.Serialization/DataContractAttribute.xml @@ -60,7 +60,7 @@ For more information about this API, see Supplemental API remarks for DataContractAttribute. has been applied. Note that the and properties have been set to values that override the default settings. +The following example serializes and deserializes a class named `Person` to which the has been applied. Note that the and properties have been set to values that override the default settings. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractattribute/cs/overview.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractattribute/vb/overview.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.Serialization/DataContractResolver.xml b/xml/System.Runtime.Serialization/DataContractResolver.xml index c7f1def684d..20754042e9a 100644 --- a/xml/System.Runtime.Serialization/DataContractResolver.xml +++ b/xml/System.Runtime.Serialization/DataContractResolver.xml @@ -53,21 +53,21 @@ Provides a mechanism for dynamically mapping types to and from representations during serialization and deserialization. - [!WARNING] -> Only use if you are completely sure of what information is being serialized. Malicious types can cause unexpected behavior. - - - -## Examples - The following example shows how to derive a class from . For a working sample, see [DataContractResolver](/dotnet/framework/wcf/samples/datacontractresolver). - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet2"::: - +> Only use if you are completely sure of what information is being serialized. Malicious types can cause unexpected behavior. + + + +## Examples + The following example shows how to derive a class from . For a working sample, see [DataContractResolver](/dotnet/framework/wcf/samples/datacontractresolver). + + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet2"::: + ]]> @@ -185,18 +185,18 @@ Override this method to map the specified name and namespace to a data contract type during deserialization. The type the name and namespace is mapped to. - method. - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet0"::: - + method. + + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet0"::: + ]]> @@ -279,18 +279,18 @@ if mapping succeeded; otherwise, . - method. - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet1"::: - + method. + + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.Serialization/DataContractSerializer.xml b/xml/System.Runtime.Serialization/DataContractSerializer.xml index 56e119fabf0..e681953e3c9 100644 --- a/xml/System.Runtime.Serialization/DataContractSerializer.xml +++ b/xml/System.Runtime.Serialization/DataContractSerializer.xml @@ -416,7 +416,7 @@ that specifies the type to serialize or deserialize as well as the XML name and namespace to read from or write to the XML document. The code also creates an instance of a to contain the known types used during serialization or deserialization. + The following example creates an instance of the that specifies the type to serialize or deserialize as well as the XML name and namespace to read from or write to the XML document. The code also creates an instance of a to contain the known types used during serialization or deserialization. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet12"::: @@ -485,7 +485,7 @@ that specifies the type to serialize or deserialize as well as the XML name and namespace (as objects) to read from or write to the XML document. The code also creates an instance of a to contain the known types used during serialization or deserialization. + The following example creates an instance of the that specifies the type to serialize or deserialize as well as the XML name and namespace (as objects) to read from or write to the XML document. The code also creates an instance of a to contain the known types used during serialization or deserialization. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet13"::: @@ -537,7 +537,7 @@ that specifies the type to serialize or deserialize and an instance of a to contain the known types used during serialization or deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. + The following example creates an instance of the that specifies the type to serialize or deserialize and an instance of a to contain the known types used during serialization or deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet14"::: @@ -649,7 +649,7 @@ that specifies the type to serialize or deserialize, the root XML element and namespace, and an instance of a that contains the types used during deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. + The following example creates an instance of the that specifies the type to serialize or deserialize, the root XML element and namespace, and an instance of a that contains the types used during deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet15"::: @@ -711,7 +711,7 @@ that specifies the type to serialize or deserialize, the root XML element and namespace (as parameters), and an instance of a that contains the types used during deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. + The following example creates an instance of the that specifies the type to serialize or deserialize, the root XML element and namespace (as parameters), and an instance of a that contains the types used during deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet16"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet16"::: @@ -1032,7 +1032,7 @@ determines whether it can read an object by checking that it is positioned on an XML element. It also examines the name and namespace of the XML element that the reader is positioned at and compares the values to the expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). + The determines whether it can read an object by checking that it is positioned on an XML element. It also examines the name and namespace of the XML element that the reader is positioned at and compares the values to the expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). @@ -1148,7 +1148,7 @@ property provides the set of known types that are used for serialization and deserialization. For example, if an instance of the class contains instances of a `Person` class, add the `Person` type to an instance of the class and use the instance to construct an instance of the . If you know of other types to add to the , then add those types to the collection. + The property provides the set of known types that are used for serialization and deserialization. For example, if an instance of the class contains instances of a `Person` class, add the `Person` type to an instance of the class and use the instance to construct an instance of the . If you know of other types to add to the , then add those types to the collection. ]]> @@ -1216,7 +1216,7 @@ OperationDescription operation = host.Description.Endpoints[0].Contract.Operatio operation.Behaviors.Find().MaxItemsInObjectGraph = 3; ``` - The property specifies the maximum number of objects that the serializer serializes or deserializes in a single method call. (The method always reads one root object, but this object may have other objects in its data members. Those objects may have other objects, and so on.) The default is . Note that when serializing or deserializing arrays, every array entry counts as a separate object. Also, note that some objects may have a large memory representation and so this quota alone may not be sufficient to prevent Denial of Service attacks. For more information, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). If you need to increase this quota beyond its default value, it is important to do so both on the sending (serializing) and receiving (deserializing) sides. It applies both when reading and writing data. + The property specifies the maximum number of objects that the serializer serializes or deserializes in a single method call. (The method always reads one root object, but this object may have other objects in its data members. Those objects may have other objects, and so on.) The default is . Note that when serializing or deserializing arrays, every array entry counts as a separate object. Also, note that some objects may have a large memory representation and so this quota alone may not be sufficient to prevent Denial of Service attacks. For more information, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). If you need to increase this quota beyond its default value, it is important to do so both on the sending (serializing) and receiving (deserializing) sides. It applies both when reading and writing data. ]]> @@ -1646,7 +1646,7 @@ operation.Behaviors.Find().MaxItemsInOb , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. Making these calls is equivalent to making a single call of the method. For example, a user might make the calls separately to insert additional XML attributes into the XML after calling the method. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. Making these calls is equivalent to making a single call of the method. For example, a user might make the calls separately to insert additional XML attributes into the XML after calling the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet7"::: @@ -1935,7 +1935,7 @@ operation.Behaviors.Find().MaxItemsInOb , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet7"::: @@ -2091,7 +2091,7 @@ operation.Behaviors.Find().MaxItemsInOb , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet7"::: diff --git a/xml/System.Runtime.Serialization/ExtensionDataObject.xml b/xml/System.Runtime.Serialization/ExtensionDataObject.xml index bbae92ae7fa..d11abb6f659 100644 --- a/xml/System.Runtime.Serialization/ExtensionDataObject.xml +++ b/xml/System.Runtime.Serialization/ExtensionDataObject.xml @@ -53,7 +53,7 @@ ## Examples - The following code serializes an instance of a type (`PersonVersion2`) that is the second version of the serializable type (`Person`). The second version contains extra data (`ID` field) that is not present in the first version. The code then deserializes the XML document into a `Person` object, then immediately reserializes the object including the extra data. Finally, the code deserializes the new XML into a `PersonVersion2` object and writes the complete data to the console, proving that the data has made a round trip to and from an older version of the type. Note that the attribute must be applied with the and properties set to the same name and namespace as the original class. + The following code serializes an instance of a type (`PersonVersion2`) that is the second version of the serializable type (`Person`). The second version contains extra data (`ID` field) that is not present in the first version. The code then deserializes the XML document into a `Person` object, then immediately reserializes the object including the extra data. Finally, the code deserializes the new XML into a `PersonVersion2` object and writes the complete data to the console, proving that the data has made a round trip to and from an older version of the type. Note that the attribute must be applied with the and properties set to the same name and namespace as the original class. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/iunknownserializationdata/cs/iunknownserialization.cs" id="Snippet0"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/iunknownserializationdata/vb/iunknownserialization.vb" id="Snippet0"::: diff --git a/xml/System.Runtime.Serialization/Formatter.xml b/xml/System.Runtime.Serialization/Formatter.xml index 4ef660f817f..757bc903908 100644 --- a/xml/System.Runtime.Serialization/Formatter.xml +++ b/xml/System.Runtime.Serialization/Formatter.xml @@ -72,60 +72,60 @@ Provides base functionality for the common language runtime serialization formatters. - is the `abstract` base class for all runtime serialization formatters, and provides some helper methods for implementing the interface. The also manages queuing objects for serialization and generating IDs on a per-object basis. - + is the `abstract` base class for all runtime serialization formatters, and provides some helper methods for implementing the interface. The also manages queuing objects for serialization and generating IDs on a per-object basis. + ]]> - When you inherit from , you must override the following members: - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - + When you inherit from , you must override the following members: + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + - @@ -167,11 +167,11 @@ Initializes a new instance of the class. - for objects to serialize and a to generate IDs for them. - + for objects to serialize and a to generate IDs for them. + ]]> @@ -226,11 +226,11 @@ When overridden in a derived class, gets or sets the used with the current formatter. The used with the current formatter. - performs lookups for types from the type names passed during deserialization. If no is set, a default is used. - + performs lookups for types from the type names passed during deserialization. If no is set, a default is used. + ]]> @@ -280,11 +280,11 @@ When overridden in a derived class, gets or sets the used for the current serialization. The used for the current serialization. - is an indication of either the source of the bits being deserialized or the destination of the bits being serialized. It has no impact on default serialization, but is passed as an argument to and . - + is an indication of either the source of the bits being deserialized or the destination of the bits being serialized. It has no impact on default serialization, but is passed as an argument to and . + ]]> @@ -406,11 +406,11 @@ Returns the next object to serialize, from the formatter's internal work queue. The next object to serialize. - . The ID of the object is put into the `objID` parameter and the object is returned from the function. - + . The ID of the object is put into the `objID` parameter and the object is returned from the function. + ]]> The next object retrieved from the work queue did not have an assigned ID. @@ -459,11 +459,11 @@ Contains the used with the current formatter. - maintains a list of the objects that have been identified and the IDs that they were given. - + maintains a list of the objects that have been identified and the IDs that they were given. + ]]> @@ -510,11 +510,11 @@ Contains a of the objects left to serialize. - method are pushed on the queue. - + method are pushed on the queue. + ]]> @@ -564,11 +564,11 @@ Schedules an object for later serialization. The object ID assigned to the object. - obtains an ID for the object and puts it on the queue for later serialization if this is a new object ID. The schedule is a work queue of objects to serialize, and is held inside the formatter. If the object is already on the work queue, it will not be added a second time, but an exception will not be thrown either. - + obtains an ID for the object and puts it on the queue for later serialization if this is a new object ID. The schedule is a work queue of objects to serialize, and is held inside the formatter. If the object is already on the work queue, it will not be added a second time, but an exception will not be thrown either. + ]]> @@ -690,13 +690,13 @@ When overridden in a derived class, gets or sets the used with the current formatter. The used with the current formatter. - to look up implementations of that control the serialization of a particular type. - - If an object type has a matching surrogate, then serialization and deserialization are handed off to the surrogate even if the type implements the interface. - + to look up implementations of that control the serialization of a particular type. + + If an object type has a matching surrogate, then serialization and deserialization are handed off to the surrogate even if the type implements the interface. + ]]> @@ -1250,11 +1250,11 @@ The object to write to the stream attached to the formatter. Inspects the type of data received, and calls the appropriate method to perform the write to the stream already attached to the formatter. - method, method, method, and so on) should have the appropriate functionality. - + method, method, method, and so on) should have the appropriate functionality. + ]]> @@ -1313,11 +1313,11 @@ The type of object the reference points to. When overridden in a derived class, writes an object reference to the stream already attached to the formatter. - diff --git a/xml/System.Runtime.Serialization/FormatterConverter.xml b/xml/System.Runtime.Serialization/FormatterConverter.xml index d41f6cec504..efbde7226c7 100644 --- a/xml/System.Runtime.Serialization/FormatterConverter.xml +++ b/xml/System.Runtime.Serialization/FormatterConverter.xml @@ -260,11 +260,11 @@ Converts a value to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and .) - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and .) + ]]> The parameter is . @@ -316,11 +316,11 @@ Converts a value to an 8-bit unsigned integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , and . + ]]> The parameter is . @@ -372,11 +372,11 @@ Converts a value to a Unicode character. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -428,11 +428,11 @@ Converts a value to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -484,11 +484,11 @@ Converts a value to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -540,11 +540,11 @@ Converts a value to a double-precision floating-point number. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -596,11 +596,11 @@ Converts a value to a 16-bit signed integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -652,11 +652,11 @@ Converts a value to a 32-bit signed integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -708,11 +708,11 @@ Converts a value to a 64-bit signed integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -770,11 +770,11 @@ Converts a value to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -826,11 +826,11 @@ Converts a value to a single-precision floating-point number. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -889,11 +889,11 @@ Converts the specified object to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -951,11 +951,11 @@ Converts a value to a 16-bit unsigned integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -1013,11 +1013,11 @@ Converts a value to a 32-bit unsigned integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -1075,11 +1075,11 @@ Converts a value to a 64-bit unsigned integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . diff --git a/xml/System.Runtime.Serialization/FormatterServices.xml b/xml/System.Runtime.Serialization/FormatterServices.xml index 25574513bf1..47933ddbaca 100644 --- a/xml/System.Runtime.Serialization/FormatterServices.xml +++ b/xml/System.Runtime.Serialization/FormatterServices.xml @@ -187,7 +187,7 @@ method extracts the value associated with the `obj` object, and returns it. The length of the returned array is the same as the length of the `members` array. + For each supplied member of the `members` array the method extracts the value associated with the `obj` object, and returns it. The length of the returned array is the same as the length of the `members` array. ]]> @@ -256,9 +256,9 @@ should only be used for deserialization when the user intends to immediately populate all fields. It does not create an uninitialized string, since creating an empty instance of an immutable type serves no purpose. + Because the new instance of the object is initialized to zero and no constructors are run, the object might not represent a state that is regarded as valid by that object. should only be used for deserialization when the user intends to immediately populate all fields. It does not create an uninitialized string, since creating an empty instance of an immutable type serves no purpose. - converts all class level [Link Demands](/dotnet/framework/misc/link-demands) to [Demands](https://msdn.microsoft.com/library/e5283e28-2366-4519-b27d-ef5c1ddc1f48) to ensure that all direct and indirect callers have the permissions that the demand specifies. Use to increase the level of security when deserializing from a partially trusted source. For better performance in full trust scenarios, use . + converts all class level [Link Demands](/dotnet/framework/misc/link-demands) to [Demands](https://msdn.microsoft.com/library/e5283e28-2366-4519-b27d-ef5c1ddc1f48) to ensure that all direct and indirect callers have the permissions that the demand specifies. Use to increase the level of security when deserializing from a partially trusted source. For better performance in full trust scenarios, use . ]]> @@ -338,7 +338,7 @@ ## Remarks Generally, the serializable members of a class are non-transient, non-static members such as fields and properties. To be included, properties must have both a getter and a setter. A class that implements the interface or has a serialization surrogate does not have to serialize all these members, or can serialize additional members. -Because the `GetSerializableMembers` method calls the method, it does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned. +Because the `GetSerializableMembers` method calls the method, it does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned. ]]> @@ -414,7 +414,7 @@ Because the `GetSerializableMembers` method calls the enumeration value, transient fields are also included in the array returned by this method. -Because the `GetSerializableMembers` method calls the method, it does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned. +Because the `GetSerializableMembers` method calls the method, it does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned. ]]> @@ -608,7 +608,7 @@ Because the `GetSerializableMembers` method calls the [!NOTE] -> You cannot use the method to create instances of types that derive from the class. +> You cannot use the method to create instances of types that derive from the class. ]]> @@ -680,7 +680,7 @@ Because the `GetSerializableMembers` method calls the does not write anything to that field. + If an element in `data` is `null`, does not write anything to that field. ]]> diff --git a/xml/System.Runtime.Serialization/IDataContractSurrogate.xml b/xml/System.Runtime.Serialization/IDataContractSurrogate.xml index 4125a265ab6..b576c1034d2 100644 --- a/xml/System.Runtime.Serialization/IDataContractSurrogate.xml +++ b/xml/System.Runtime.Serialization/IDataContractSurrogate.xml @@ -135,7 +135,7 @@ method. + The following example shows an implementation of the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/idatacontractsurrogate/cs/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/idatacontractsurrogate/vb/source.vb" id="Snippet1"::: @@ -178,7 +178,7 @@ ## Examples - The following example shows an implementation of the method. + The following example shows an implementation of the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/idatacontractsurrogate/cs/source.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/idatacontractsurrogate/vb/source.vb" id="Snippet3"::: @@ -213,7 +213,7 @@ method. + This method is required during schema export or schema import only if annotations are inserted into the schema using the method. ]]> @@ -253,7 +253,7 @@ ## Examples - The following example shows an implementation of the method. + The following example shows an implementation of the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/idatacontractsurrogate/cs/source.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/idatacontractsurrogate/vb/source.vb" id="Snippet2"::: @@ -298,7 +298,7 @@ ## Examples - The following example shows an implementation of the method. + The following example shows an implementation of the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/idatacontractsurrogate/cs/source.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/idatacontractsurrogate/vb/source.vb" id="Snippet4"::: diff --git a/xml/System.Runtime.Serialization/IFormatter.xml b/xml/System.Runtime.Serialization/IFormatter.xml index fa37c526c14..faacfbda3d0 100644 --- a/xml/System.Runtime.Serialization/IFormatter.xml +++ b/xml/System.Runtime.Serialization/IFormatter.xml @@ -53,13 +53,13 @@ Provides functionality for formatting serialized objects. - architecture. - - Objects controlling their own serialization can do so by implementing the interface. In order for an object to be serialized, you must mark that object as being serializable. You can do this by applying the serializable attribute to a class. If any object in the graph is not serializable, serialization will fail. - + architecture. + + Objects controlling their own serialization can do so by implementing the interface. In order for an object to be serialized, you must mark that object as being serializable. You can do this by applying the serializable attribute to a class. If any object in the graph is not serializable, serialization will fail. + ]]> @@ -110,13 +110,13 @@ Gets or sets the that performs type lookups during deserialization. The that performs type lookups during deserialization. - method on the . This method resolves these parameters to a object. The binder can find a at deserialization time that is in a different assembly than it was at serialization time. - - Setting this property has no effect during serialization. - + method on the . This method resolves these parameters to a object. The binder can find a at deserialization time that is in a different assembly than it was at serialization time. + + Setting this property has no effect during serialization. + ]]> @@ -160,11 +160,11 @@ Gets or sets the used for serialization and deserialization. The used for serialization and deserialization. - or . The indicates the destination (during serialization) or the source (during deserialization) of the data. An object implementing can alter the data that it transmits depending on value of the . - + or . The indicates the destination (during serialization) or the source (during deserialization) of the data. An object implementing can alter the data that it transmits depending on value of the . + ]]> @@ -230,13 +230,13 @@ Deserializes the data on the provided stream and reconstitutes the graph of objects. The top object of the deserialized graph. - method reads graph information from the stream and reconstructs a clone of the original graph. The topology of the graph is preserved. - - The deserialization process allocates an empty object of the appropriate type and repopulates its fields from the data transmitted in the `serializationStream` stream. It is important to note that no constructor is ever called on the object during deserialization. - + method reads graph information from the stream and reconstructs a clone of the original graph. The topology of the graph is preserved. + + The deserialization process allocates an empty object of the appropriate type and repopulates its fields from the data transmitted in the `serializationStream` stream. It is important to note that no constructor is ever called on the object during deserialization. + ]]> XML and SOAP Serialization @@ -300,13 +300,13 @@ The object, or root of the object graph, to serialize. All child objects of this root object are automatically serialized. Serializes an object, or graph of objects with the given root to the provided stream. - method automatically serializes the provided objects, and all objects connected to it, to the provided stream. - - By default, the serialization process records an object's state by gathering the values of all its fields (public and private). These fields are saved to the stream along with information about the object such as the name qualified by the assembly for its type. - + method automatically serializes the provided objects, and all objects connected to it, to the provided stream. + + By default, the serialization process records an object's state by gathering the values of all its fields (public and private). These fields are saved to the stream along with information about the object such as the name qualified by the assembly for its type. + ]]> XML and SOAP Serialization @@ -352,11 +352,11 @@ Gets or sets the used by the current formatter. The used by this formatter. - allows the user to specify an object best suited to handle the serialization of a particular object or class of objects. Think of it as an implementation of but provided by a different object. - + allows the user to specify an object best suited to handle the serialization of a particular object or class of objects. Think of it as an implementation of but provided by a different object. + ]]> diff --git a/xml/System.Runtime.Serialization/IObjectReference.xml b/xml/System.Runtime.Serialization/IObjectReference.xml index 9b8bed2141e..07ae90e8bd4 100644 --- a/xml/System.Runtime.Serialization/IObjectReference.xml +++ b/xml/System.Runtime.Serialization/IObjectReference.xml @@ -109,13 +109,13 @@ Returns the real object that should be deserialized, rather than the object that the serialized stream specifies. The actual object that is put into the graph. - method. At this point, the proxy-creator object creates a new instance of the proxy object that refers back to the original actual object, perhaps on a remote computer. Finally, the proxy-creator object is discarded and reclaimed later by garbage collection. - - For example, consider how objects are serialized. Instead of transmitting the data from the object, the system transmits a holder object with the name of the type object and information on the assembly where it is found in an object implementing . When both the type name and assembly name are available, the deserialization infrastructure calls on the holder object that has been transmitted. This holder returns the object that is inserted into the graph. - + method. At this point, the proxy-creator object creates a new instance of the proxy object that refers back to the original actual object, perhaps on a remote computer. Finally, the proxy-creator object is discarded and reclaimed later by garbage collection. + + For example, consider how objects are serialized. Instead of transmitting the data from the object, the system transmits a holder object with the name of the type object and information on the assembly where it is found in an object implementing . When both the type name and assembly name are available, the deserialization infrastructure calls on the holder object that has been transmitted. This holder returns the object that is inserted into the graph. + ]]> The caller does not have the required permission. The call will not work on a medium trusted server. diff --git a/xml/System.Runtime.Serialization/ISafeSerializationData.xml b/xml/System.Runtime.Serialization/ISafeSerializationData.xml index f29d89dc147..83ede18a4fb 100644 --- a/xml/System.Runtime.Serialization/ISafeSerializationData.xml +++ b/xml/System.Runtime.Serialization/ISafeSerializationData.xml @@ -51,9 +51,9 @@ method. Starting with .NET Framework 4.0, that method is marked with the attribute, which prevents execution in security-transparent code. To work around this condition, implement the interface and add custom data as shown in the example below. + In versions previous to.NET Framework 4.0, serialization of custom user data in a security transparent code was accomplished using the method. Starting with .NET Framework 4.0, that method is marked with the attribute, which prevents execution in security-transparent code. To work around this condition, implement the interface and add custom data as shown in the example below. - The method is called after serialization, and uses the to restore the custom data. + The method is called after serialization, and uses the to restore the custom data. ]]> diff --git a/xml/System.Runtime.Serialization/ISerializable.xml b/xml/System.Runtime.Serialization/ISerializable.xml index f12da19c41d..0ca5b719ca2 100644 --- a/xml/System.Runtime.Serialization/ISerializable.xml +++ b/xml/System.Runtime.Serialization/ISerializable.xml @@ -66,28 +66,28 @@ Allows an object to control its own serialization and deserialization through binary and XML serialization. - . If a class needs to control its binary or XML serialization process, it can implement the interface. The calls the at serialization time and populates the supplied with all the data required to represent the object. The creates a with the type of the object in the graph. Objects that need to send proxies for themselves can use the and methods on to change the transmitted information. - - In the case of class inheritance, it is possible to serialize a class that derives from a base class that implements . In this case, the derived class should call the base class implementation of inside its implementation of . Otherwise, the data from the base class will not be serialized. - - The interface implies a constructor with the signature `constructor (SerializationInfo information, StreamingContext context)`. At deserialization time, the current constructor is called only after the data in the has been deserialized by the formatter. In general, this constructor should be `protected` if the class is not `sealed`. - - The order in which objects are deserialized cannot be guaranteed. For example, if one type references a type that has not been deserialized yet, an exception will occur. If you are creating types that have such dependencies, you can work around the problem by implementing the `IDeserializationCallback` interface and the `OnDeserialization` method. - - The serialization architecture handles object types that extend the same as types that extend . These types can be marked with the and implement the interface as any other object type. Their object state will be captured and persisted onto the stream. - - When these types are being used through , the remoting infrastructure provides a surrogate that preempts typical serialization and instead serializes a proxy to the . A surrogate is a helper that knows how to serialize and deserialize objects of a particular type. The proxy, invisible to the user in most cases, will be of type . - - As a general design pattern, it would be unusual for a class to be both marked with the serializable attribute and extend . Developers should think carefully about the possible serialization and remoting scenarios when combining these two characteristics. One example where this might be applicable is with a . While the base class of () extends from , it is possible to capture the state of a and restore it at will. It might, therefore, be meaningful to serialize the state of this stream into a database and restore it at some later point in time. However, when used through remoting, an object of this type would be proxied. - + . If a class needs to control its binary or XML serialization process, it can implement the interface. The calls the at serialization time and populates the supplied with all the data required to represent the object. The creates a with the type of the object in the graph. Objects that need to send proxies for themselves can use the and methods on to change the transmitted information. + + In the case of class inheritance, it is possible to serialize a class that derives from a base class that implements . In this case, the derived class should call the base class implementation of inside its implementation of . Otherwise, the data from the base class will not be serialized. + + The interface implies a constructor with the signature `constructor (SerializationInfo information, StreamingContext context)`. At deserialization time, the current constructor is called only after the data in the has been deserialized by the formatter. In general, this constructor should be `protected` if the class is not `sealed`. + + The order in which objects are deserialized cannot be guaranteed. For example, if one type references a type that has not been deserialized yet, an exception will occur. If you are creating types that have such dependencies, you can work around the problem by implementing the `IDeserializationCallback` interface and the `OnDeserialization` method. + + The serialization architecture handles object types that extend the same as types that extend . These types can be marked with the and implement the interface as any other object type. Their object state will be captured and persisted onto the stream. + + When these types are being used through , the remoting infrastructure provides a surrogate that preempts typical serialization and instead serializes a proxy to the . A surrogate is a helper that knows how to serialize and deserialize objects of a particular type. The proxy, invisible to the user in most cases, will be of type . + + As a general design pattern, it would be unusual for a class to be both marked with the serializable attribute and extend . Developers should think carefully about the possible serialization and remoting scenarios when combining these two characteristics. One example where this might be applicable is with a . While the base class of () extends from , it is possible to capture the state of a and restore it at will. It might, therefore, be meaningful to serialize the state of this stream into a database and restore it at some later point in time. However, when used through remoting, an object of this type would be proxied. + For more information about serialization of classes that extend , see . For more information about implementing , see [Custom Serialization](/dotnet/standard/serialization/custom-serialization). > [!NOTE] > This interface does not apply to JSON serialization using . - + ]]> @@ -158,14 +158,14 @@ The destination (see ) for this serialization. Populates a with the data needed to serialize the target object. - are automatically tracked and serialized by the formatter. - + > [!NOTE] > It's not guaranteed that this method will be called only once per object instance during serialization. Therefore, the method should be implemented in such a way that its behavior will be the same regardless of the number of times it is called. - + ]]> The caller does not have the required permission. diff --git a/xml/System.Runtime.Serialization/ISerializationSurrogate.xml b/xml/System.Runtime.Serialization/ISerializationSurrogate.xml index aac11b37e2c..be1119ccbd7 100644 --- a/xml/System.Runtime.Serialization/ISerializationSurrogate.xml +++ b/xml/System.Runtime.Serialization/ISerializationSurrogate.xml @@ -107,13 +107,13 @@ The destination (see ) for this serialization. Populates the provided with the data needed to serialize the object. - `info` parameter. - + `info` parameter. + Having located the surrogate, this method stores information on the object `obj` in the `info` parameter. This information describes its view of that object, including the object's fields, properties, and current values. The might correspond to the actual object, or it can be a synthesized view of the surrogate. - + ]]> The caller does not have the required permission. @@ -182,11 +182,11 @@ Populates the object using the information in the . The populated deserialized object. - method is called during deserialization. With this method, you can take the empty `obj` that has already been created, and enter `info` data into that object. Constructors are not invoked during deserialization of information and reconstruction of the object. - + method is called during deserialization. With this method, you can take the empty `obj` that has already been created, and enter `info` data into that object. Constructors are not invoked during deserialization of information and reconstruction of the object. + ]]> The caller does not have the required permission. diff --git a/xml/System.Runtime.Serialization/ImportOptions.xml b/xml/System.Runtime.Serialization/ImportOptions.xml index 45f2c86cdd5..29664019bee 100644 --- a/xml/System.Runtime.Serialization/ImportOptions.xml +++ b/xml/System.Runtime.Serialization/ImportOptions.xml @@ -103,7 +103,7 @@ class, which provides a method to check whether it supports particular . + To support better code generation for different languages, information about what is supported by the target language needs to be passed to the schema importer. This is done by passing an instance of the class, which provides a method to check whether it supports particular . ]]> @@ -339,7 +339,7 @@ collection, that type will be used. For example, when importing schema that contains a list of integers, an array of integers will normally be generated. However, if the collection contains the of type integer, that type will be used instead of the array. + By default, an array will be generated when importing a collection schema (unless the schema has a special annotation that mentions a different type). However, if there is a matching type in the collection, that type will be used. For example, when importing schema that contains a list of integers, an array of integers will normally be generated. However, if the collection contains the of type integer, that type will be used instead of the array. ]]> diff --git a/xml/System.Runtime.Serialization/KnownTypeAttribute.xml b/xml/System.Runtime.Serialization/KnownTypeAttribute.xml index f804a743dd7..661f3ff1c60 100644 --- a/xml/System.Runtime.Serialization/KnownTypeAttribute.xml +++ b/xml/System.Runtime.Serialization/KnownTypeAttribute.xml @@ -138,7 +138,7 @@ of objects. During serialization or deserialization, the types found in the collection can be used within the root type to which the attribute is applied. + This constructor uses a method name that matches a method of the class. The method returns a of objects. During serialization or deserialization, the types found in the collection can be used within the root type to which the attribute is applied. @@ -250,7 +250,7 @@ is applied to, must be static, must accept no parameters, and must return an instance of any type that implements the generic interface, such as the class, or an array of objects. + The method must exist on the class or structure that the is applied to, must be static, must accept no parameters, and must return an instance of any type that implements the generic interface, such as the class, or an array of objects. The method is called once per application domain when the data contract is loaded for the type. diff --git a/xml/System.Runtime.Serialization/NetDataContractSerializer.xml b/xml/System.Runtime.Serialization/NetDataContractSerializer.xml index 8f3215c3092..ec298b120b1 100644 --- a/xml/System.Runtime.Serialization/NetDataContractSerializer.xml +++ b/xml/System.Runtime.Serialization/NetDataContractSerializer.xml @@ -560,9 +560,9 @@ determines whether it can read an object by examining the name and namespace of the XML element the reader is positioned at, and comparing the values to expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). + The determines whether it can read an object by examining the name and namespace of the XML element the reader is positioned at, and comparing the values to expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). - You can set the `rootName` and `rootNamespace` in the following constructors: , , and . + You can set the `rootName` and `rootNamespace` in the following constructors: , , and . ]]> @@ -712,7 +712,7 @@ ## Remarks The `verifyObjectName` parameter determines whether it can read an object by examining the name and namespace of the XML element the reader is positioned at, and comparing the values to expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). - You can set the `rootName` and `rootNamespace` in the following constructors: , , and . + You can set the `rootName` and `rootNamespace` in the following constructors: , , and . [!INCLUDE [untrusted-data-method-note](~/includes/untrusted-data-method-note.md)] @@ -753,7 +753,7 @@ ## Remarks The `verifyObjectName` parameter determines whether it can read an object by examining the name and namespace of the XML element the reader is positioned at, and comparing the values to expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). - You can set the `rootName` and `rootNamespace` in the following constructors: , , and . + You can set the `rootName` and `rootNamespace` in the following constructors: , , and . [!INCLUDE [untrusted-data-method-note](~/includes/untrusted-data-method-note.md)] @@ -838,7 +838,7 @@ , , and methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. The three methods are also called by the method. + The , , and methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. The three methods are also called by the method. ]]> @@ -870,7 +870,7 @@ , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/netdatacontractserializer/cs/source.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/netdatacontractserializer/vb/source.vb" id="Snippet5"::: @@ -948,7 +948,7 @@ , , and methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. The three methods are also called by the method. + The , , and methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. The three methods are also called by the method. ]]> @@ -982,7 +982,7 @@ , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/netdatacontractserializer/cs/source.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/netdatacontractserializer/vb/source.vb" id="Snippet5"::: @@ -1062,7 +1062,7 @@ , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/netdatacontractserializer/cs/source.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/netdatacontractserializer/vb/source.vb" id="Snippet5"::: diff --git a/xml/System.Runtime.Serialization/ObjectIDGenerator.xml b/xml/System.Runtime.Serialization/ObjectIDGenerator.xml index c2ad3b35219..a1f8101defc 100644 --- a/xml/System.Runtime.Serialization/ObjectIDGenerator.xml +++ b/xml/System.Runtime.Serialization/ObjectIDGenerator.xml @@ -64,17 +64,17 @@ Generates IDs for objects. - keeps track of previously identified objects. When you ask for the ID of an object, the knows whether to return the existing ID, or generate and remember a new ID. - - The IDs are unique for the life of the instance. Generally, a life lasts as long as the that created it. Object IDs have meaning only within a given serialized stream, and are used for tracking which objects have references to others within the serialized object graph. - - Using a hash table, the retains which ID is assigned to which object. The object references, which uniquely identify each object, are addresses in the runtime garbage-collected heap. Object reference values can change during serialization, but the table is updated automatically so the information is correct. - - Object IDs are 64-bit numbers. Allocation starts from one, so zero is never a valid object ID. A formatter can choose a zero value to represent an object reference whose value is `null`. - + keeps track of previously identified objects. When you ask for the ID of an object, the knows whether to return the existing ID, or generate and remember a new ID. + + The IDs are unique for the life of the instance. Generally, a life lasts as long as the that created it. Object IDs have meaning only within a given serialized stream, and are used for tracking which objects have references to others within the serialized object graph. + + Using a hash table, the retains which ID is assigned to which object. The object references, which uniquely identify each object, are addresses in the runtime garbage-collected heap. Object reference values can change during serialization, but the table is updated automatically so the information is correct. + + Object IDs are 64-bit numbers. Allocation starts from one, so zero is never a valid object ID. A formatter can choose a zero value to represent an object reference whose value is `null`. + ]]> @@ -220,11 +220,11 @@ Determines whether an object has already been assigned an ID. The object ID of if previously known to the ; otherwise, zero. - differs from in that it never creates an ID for an object that has not already been seen by the . - + differs from in that it never creates an ID for an object that has not already been seen by the . + ]]> The parameter is . diff --git a/xml/System.Runtime.Serialization/ObjectManager.xml b/xml/System.Runtime.Serialization/ObjectManager.xml index e4c22b68f13..850cde0097b 100644 --- a/xml/System.Runtime.Serialization/ObjectManager.xml +++ b/xml/System.Runtime.Serialization/ObjectManager.xml @@ -60,20 +60,20 @@ Keeps track of objects as they are deserialized. - queries the to determine whether a reference to an object in the serialized stream refers to an object that has already been deserialized (a backward reference), or to an object that has not yet been deserialized (a forward reference). If the reference in the serialized stream is a forward reference, then the can register a fixup with the . If the reference in the serialized stream is a backward reference, the immediately completes the reference. Fixup refers to the process of finalizing object references not already completed during the object deserialization process. After the required object has been deserialized, the will complete the reference. - - The follows a set of rules that dictate the fixup order. All objects that implement or have a can expect to have all the objects that they transmitted through available when the object tree is deserialized. However, a parent object cannot presume that all its child objects will be fully completed when it is fully deserialized. All child objects will be present but not all the grandchild objects will necessarily be present. If an object needs to take certain actions that depend on executing code on its child objects, it can delay these actions, implement the interface, and execute the code only when it is called back on this interface. - - - -## Examples - The following code example shows how to use the class to walk through an object graph, traversing to each object only once. - - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Serialization/ObjectManager/ObjectManager.cs" id="Snippet1"::: - + queries the to determine whether a reference to an object in the serialized stream refers to an object that has already been deserialized (a backward reference), or to an object that has not yet been deserialized (a forward reference). If the reference in the serialized stream is a forward reference, then the can register a fixup with the . If the reference in the serialized stream is a backward reference, the immediately completes the reference. Fixup refers to the process of finalizing object references not already completed during the object deserialization process. After the required object has been deserialized, the will complete the reference. + + The follows a set of rules that dictate the fixup order. All objects that implement or have a can expect to have all the objects that they transmitted through available when the object tree is deserialized. However, a parent object cannot presume that all its child objects will be fully completed when it is fully deserialized. All child objects will be present but not all the grandchild objects will necessarily be present. If an object needs to take certain actions that depend on executing code on its child objects, it can delay these actions, implement the interface, and execute the code only when it is called back on this interface. + + + +## Examples + The following code example shows how to use the class to walk through an object graph, traversing to each object only once. + + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Serialization/ObjectManager/ObjectManager.cs" id="Snippet1"::: + ]]> @@ -182,11 +182,11 @@ Performs all the recorded fixups. - ), or the default implementation. - + ), or the default implementation. + ]]> A fixup was not successfully completed. @@ -236,11 +236,11 @@ Returns the object with the specified object ID. The object with the specified object ID if it has been previously stored or if no such object has been registered. - method. - + method. + ]]> The parameter is less than or equal to zero. @@ -396,11 +396,11 @@ The ID of the object that the current array element will point to after fixup is completed. Records a fixup for one element in an array. - The or parameter is less than or equal to zero. @@ -453,11 +453,11 @@ The ID of the object the array elements will point to after fixup is completed. Records fixups for the specified elements in an array, to be executed later. - The or parameter is less than or equal to zero. @@ -510,11 +510,11 @@ The ID of the object required by . Records a fixup for an object member, to be executed later. - @@ -568,11 +568,11 @@ The ID of the object required by . Records a fixup for a member of an object, to be executed later. - The or parameter is less than or equal to zero. @@ -647,11 +647,11 @@ The ID of the object to register. Registers an object as it is deserialized, associating it with . - retains information about both the object and its ID. Later during deserialization, can be used to determine whether a particular object ID has already been deserialized, or whether it is a forward reference to an object that has not yet been deserialized. - + retains information about both the object and its ID. Later during deserialization, can be used to determine whether a particular object ID has already been deserialized, or whether it is a forward reference to an object that has not yet been deserialized. + ]]> The parameter is . @@ -719,11 +719,11 @@ The used if implements or has a . will be completed with any required fixup information and then passed to the required object when that object is completed. Registers an object as it is deserialized, associating it with , and recording the used with it. - retains the information about both the object and its ID. Later during deserialization, you can use to discover whether a particular object ID has already been deserialized, or if it is a forward reference to an object that has not yet been deserialized. - + retains the information about both the object and its ID. Later during deserialization, you can use to discover whether a particular object ID has already been deserialized, or if it is a forward reference to an object that has not yet been deserialized. + ]]> The parameter is . @@ -803,13 +803,13 @@ The field in the containing object where exists. This parameter has meaning only if is a value type. Registers a member of an object as it is deserialized, associating it with , and recording the . - because of the way fixups are performed on objects. The space to store the information for a is allocated inline with its containing object. However, when the is boxed to be registered with the , it loses the connection with its containing object. To guarantee that fixups occur in the instance of the stored in the containing object and not in the boxed instance, the retains some additional information. - - retains information about both the object and its ID. Later during deserialization, can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized. - + because of the way fixups are performed on objects. The space to store the information for a is allocated inline with its containing object. However, when the is boxed to be registered with the , it loses the connection with its containing object. To guarantee that fixups occur in the instance of the stored in the containing object and not in the boxed instance, the retains some additional information. + + retains information about both the object and its ID. Later during deserialization, can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized. + ]]> The parameter is . @@ -891,13 +891,13 @@ If is a and a member of an array, contains the index within that array where exists. is ignored if is not both a and a member of an array. Registers a member of an array contained in an object while it is deserialized, associating it with , and recording the . - because of the way fixups are performed on objects. The space to store the information for a is allocated inline with its containing object. However, when the is boxed to be registered with the , it loses the connection with its containing object. To guarantee that fixups occur in the instance of the stored in the containing object and not in the boxed instance, the retains some additional information. - - retains information about both the object and its ID. Later during deserialization, can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized. - + because of the way fixups are performed on objects. The space to store the information for a is allocated inline with its containing object. However, when the is boxed to be registered with the , it loses the connection with its containing object. To guarantee that fixups occur in the instance of the stored in the containing object and not in the boxed instance, the retains some additional information. + + retains information about both the object and its ID. Later during deserialization, can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized. + ]]> The parameter is . diff --git a/xml/System.Runtime.Serialization/SerializationException.xml b/xml/System.Runtime.Serialization/SerializationException.xml index 6b9056c1aa6..e2b45f302ba 100644 --- a/xml/System.Runtime.Serialization/SerializationException.xml +++ b/xml/System.Runtime.Serialization/SerializationException.xml @@ -88,9 +88,9 @@ ## Remarks uses the `HRESULT` COR_E_SERIALIZATION with the value 0x8013150C. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. - For a list of initial property values for an instance of , see the constructors. + For a list of initial property values for an instance of , see the constructors. ]]> @@ -155,8 +155,8 @@ |Property|Condition| |--------------|---------------| -||`null`| -||Localized error message for .| +||`null`| +||Localized error message for .| ]]> @@ -215,8 +215,8 @@ |Property|Condition| |--------------|---------------| -||`null`| -||The `message` string.| +||`null`| +||The `message` string.| ]]> @@ -348,8 +348,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.Serialization/SerializationInfo.xml b/xml/System.Runtime.Serialization/SerializationInfo.xml index 270dfb8072e..d7b9dca77dd 100644 --- a/xml/System.Runtime.Serialization/SerializationInfo.xml +++ b/xml/System.Runtime.Serialization/SerializationInfo.xml @@ -75,9 +75,9 @@ method on either or populates the store with the name, type, and value of each piece of information it wants to serialize. During deserialization, the appropriate function can extract this information. + This class is used by objects with custom serialization behavior. The method on either or populates the store with the name, type, and value of each piece of information it wants to serialize. During deserialization, the appropriate function can extract this information. - Objects are added to the store at serialization time using the methods and extracted from the store at deserialization using the methods. + Objects are added to the store at serialization time using the methods and extracted from the store at deserialization using the methods. For more information about customizing serialization, see [Custom Serialization](/dotnet/standard/serialization/custom-serialization). @@ -1335,7 +1335,7 @@ End Sub is the same as the value returned by property of the assembly of the containing type. This is the assembly name that the formatter uses when serializing type information for this object. + The is the same as the value returned by property of the assembly of the containing type. This is the assembly name that the formatter uses when serializing type information for this object. The assembly name contains the name of the assembly, version, culture, and some security information about the object. @@ -1397,7 +1397,7 @@ End Sub is the same as what would be returned by calling the on . This is the type name the formatter uses when serializing type information for this object. + The is the same as what would be returned by calling the on . This is the type name the formatter uses when serializing type information for this object. Users who are changing the type to serialize (for example, to send a proxy for a particular type) will want to set the value of this property. @@ -2492,14 +2492,14 @@ End Sub is of the type requested (or one of its derived classes), that value is returned directly. Otherwise, is called to convert it to the appropriate type. + If the data stored in the is of the type requested (or one of its derived classes), that value is returned directly. Otherwise, is called to convert it to the appropriate type. - The value returned by the method can always be safely cast to the type specified in the `type` parameter. + The value returned by the method can always be safely cast to the type specified in the `type` parameter. ## Examples - The following code example demonstrates the use of the method: + The following code example demonstrates the use of the method: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Serialization/SerializationInfo/GetValue/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Serialization/SerializationInfo/GetValue/source.vb" id="Snippet1"::: @@ -2749,7 +2749,7 @@ End Sub is responsible for setting the of the instance before passing it to . However, users who want to send proxies for their objects will need to change the type represented by this instance. Using the method is equivalent to setting both the and the . + The is responsible for setting the of the instance before passing it to . However, users who want to send proxies for their objects will need to change the type represented by this instance. Using the method is equivalent to setting both the and the . ]]> diff --git a/xml/System.Runtime.Serialization/SerializationInfoEnumerator.xml b/xml/System.Runtime.Serialization/SerializationInfoEnumerator.xml index 0d19d46ce69..2e6e6ae6c51 100644 --- a/xml/System.Runtime.Serialization/SerializationInfoEnumerator.xml +++ b/xml/System.Runtime.Serialization/SerializationInfoEnumerator.xml @@ -190,7 +190,7 @@ and go through each item until you reach the last element. + To initialize the enumerator, call and go through each item until you reach the last element. ]]> diff --git a/xml/System.Runtime.Serialization/SerializationObjectManager.xml b/xml/System.Runtime.Serialization/SerializationObjectManager.xml index 7a55266dc10..57b7b4f068f 100644 --- a/xml/System.Runtime.Serialization/SerializationObjectManager.xml +++ b/xml/System.Runtime.Serialization/SerializationObjectManager.xml @@ -50,11 +50,11 @@ Manages serialization processes at run time. This class cannot be inherited. - . The main difference is that the performs its tasks during serialization while the performs its tasks during deserialization. - + . The main difference is that the performs its tasks during serialization while the performs its tasks during deserialization. + ]]> @@ -138,11 +138,11 @@ Invokes the OnSerializing callback event if the type of the object has one; and registers the object for raising the OnSerialized event if the type of the object has one. - attribute to a method on the registered object. Similarly, the OnSerialized event is created by applying the attribute to a method on the registered object. - + attribute to a method on the registered object. Similarly, the OnSerialized event is created by applying the attribute to a method on the registered object. + ]]> @@ -202,11 +202,11 @@ The object to register. Registers the object upon which events will be raised. - method will be called on the registered object. - + method will be called on the registered object. + ]]> diff --git a/xml/System.Runtime.Serialization/StreamingContext.xml b/xml/System.Runtime.Serialization/StreamingContext.xml index b05dc514716..7f4b1b1fb0e 100644 --- a/xml/System.Runtime.Serialization/StreamingContext.xml +++ b/xml/System.Runtime.Serialization/StreamingContext.xml @@ -319,7 +319,7 @@ and . + Two code groups are equivalent if they have the same and . ]]> diff --git a/xml/System.Runtime.Serialization/XPathQueryGenerator.xml b/xml/System.Runtime.Serialization/XPathQueryGenerator.xml index df77aa56509..2a1818a2823 100644 --- a/xml/System.Runtime.Serialization/XPathQueryGenerator.xml +++ b/xml/System.Runtime.Serialization/XPathQueryGenerator.xml @@ -50,32 +50,32 @@ When given a class representing a data contract, and metadata representing a member of the contract, produces an XPath query for the member. - and as appropriate to the type and its fields or properties. - -2. Use the method of the class to generate the MemberInfo array. - -3. Pass the type and the array to the method. - -4. If needed, use the returned by the `namespaces` parameter to examine the XML namespaces referenced by the namespaces prefixes in the XPath query. - + and as appropriate to the type and its fields or properties. + +2. Use the method of the class to generate the MemberInfo array. + +3. Pass the type and the array to the method. + +4. If needed, use the returned by the `namespaces` parameter to examine the XML namespaces referenced by the namespaces prefixes in the XPath query. + > [!NOTE] -> The namespace prefix "xg" (for "XPath Generator") is used as the default in the XPath. This cannot be changed. Instead, refer to the NameTable collection to see what namespace the prefix is associated with. - - - -## Examples - The following example creates XPath queries from two classes to which the and attributes have been applied. - +> The namespace prefix "xg" (for "XPath Generator") is used as the default in the XPath. This cannot be changed. Instead, refer to the NameTable collection to see what namespace the prefix is associated with. + + + +## Examples + The following example creates XPath queries from two classes to which the and attributes have been applied. + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xpathquerygenerator/cs/source.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xpathquerygenerator/vb/source.vb" id="Snippet0"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xpathquerygenerator/vb/source.vb" id="Snippet0"::: + ]]> @@ -145,23 +145,23 @@ The XML namespaces and their prefixes found in the data contract. Creates an XPath from a data contract using the specified data contract type, array of metadata elements, and namespaces. - - + + The XPath generated from the type and member data. - and attributes have been applied. - + and attributes have been applied. + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xpathquerygenerator/cs/source.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xpathquerygenerator/vb/source.vb" id="Snippet0"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xpathquerygenerator/vb/source.vb" id="Snippet0"::: + ]]> @@ -231,8 +231,8 @@ The XML namespaces and their prefixes found in the data contract. Creates an XPath from a data contract using the specified contract data type, array of metadata elements, the top level element, and namespaces. - - + + The XPath generated from the type and member data. To be added. diff --git a/xml/System.Runtime.Serialization/XmlObjectSerializer.xml b/xml/System.Runtime.Serialization/XmlObjectSerializer.xml index bded7c2aa59..ee0b8cae2f0 100644 --- a/xml/System.Runtime.Serialization/XmlObjectSerializer.xml +++ b/xml/System.Runtime.Serialization/XmlObjectSerializer.xml @@ -54,19 +54,19 @@ Provides the base class used to serialize objects as XML streams or documents. This class is abstract. - to create your own serializer to serialize and deserialize objects. Both the class and the class inherit from the and are used to serialize and deserialize objects that conform to data contract rules (objects created using the and the ). - - - -## Examples - The following example shows a method named `WriteObjectWithInstance` that includes an as a parameter. The method serializes an object using either the or by calling the method. - + to create your own serializer to serialize and deserialize objects. Both the class and the class inherit from the and are used to serialize and deserialize objects that conform to data contract rules (objects created using the and the ). + + + +## Examples + The following example shows a method named `WriteObjectWithInstance` that includes an as a parameter. The method serializes an object using either the or by calling the method. + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xmlobjectserializer/cs/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xmlobjectserializer/vb/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xmlobjectserializer/vb/source.vb" id="Snippet1"::: + ]]> @@ -115,11 +115,11 @@ Initializes a new instance of the class. - @@ -132,13 +132,13 @@ Gets a value that specifies whether the serializer can read the object. - , the starting element is specified in the constructor of the extension class. For an example, see the constructors for the class. - + , the starting element is specified in the constructor of the extension class. For an example, see the constructors for the class. + ]]> @@ -199,13 +199,13 @@ if the reader can read the data; otherwise, . - implementation determines when to return `true`. Implementations may check that they are positioned on an element or look for an expected element name. One implementation of the , the , checks that it is positioned on an element and also checks that the element name is the top level expected name for the type currently being deserialized. - - If needed, additional attributes in the XML stream can be read while positioned on the top level element before reading XML contents using the method. - + implementation determines when to return `true`. Implementations may check that they are positioned on an element or look for an expected element name. One implementation of the , the , checks that it is positioned on an element and also checks that the element name is the top level expected name for the type currently being deserialized. + + If needed, additional attributes in the XML stream can be read while positioned on the top level element before reading XML contents using the method. + ]]> @@ -266,13 +266,13 @@ if the reader is positioned over the starting element; otherwise, . - , the starting element is specified in the constructor of the extension class. For an example, see the constructors for the class. - + , the starting element is specified in the constructor of the extension class. For an example, see the constructors for the class. + ]]> @@ -343,11 +343,11 @@ Reads the XML stream or document with a and returns the deserialized object. The deserialized object. - @@ -408,11 +408,11 @@ Reads the XML document or stream with an and returns the deserialized object. The deserialized object. - @@ -534,11 +534,11 @@ Reads the XML stream or document with an and returns the deserialized object; it also enables you to specify whether the serializer can read the data before attempting to read it. The deserialized object. - method to determine whether the element is the start of the object. - + method to determine whether the element is the start of the object. + ]]> @@ -602,11 +602,11 @@ Reads the XML document or stream with an and returns the deserialized object; it also enables you to specify whether the serializer can read the data before attempting to read it. The deserialized object. - method to determine whether the element is the start of the object. - + method to determine whether the element is the start of the object. + ]]> @@ -619,11 +619,11 @@ Writes the closing XML element to an XML stream or document. - , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. Users can insert XML attributes during the writing of the object between the calls to and . The three methods are also called by the virtual implementation of the method. - + , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. Users can insert XML attributes during the writing of the object between the calls to and . The three methods are also called by the virtual implementation of the method. + ]]> @@ -892,11 +892,11 @@ The object that contains the content to write. Writes the complete content (start, content, and end) of the object to the XML document or stream with the specified . - , , and methods. Because of this, this method is intended to be the most commonly used method on a serializer. - + , , and methods. Because of this, this method is intended to be the most commonly used method on a serializer. + ]]> the type being serialized does not conform to data contract rules. For example, the attribute has not been applied to the type. @@ -968,11 +968,11 @@ The object that contains the content to write. Writes the complete content (start, content, and end) of the object to the XML document or stream with the specified . - overload. - + overload. + ]]> the type being serialized does not conform to data contract rules. For example, the attribute has not been applied to the type. @@ -988,11 +988,11 @@ Writes only the content of an object to an XML document or stream. - , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. If the implementation writes using XML elements, attributes can be inserted before writing the contents of the object. The three methods are also called by the virtual implementation of the method. - + , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. If the implementation writes using XML elements, attributes can be inserted before writing the contents of the object. The three methods are also called by the virtual implementation of the method. + ]]> @@ -1143,11 +1143,11 @@ Writes only the starting XML element to an XML document or stream. - , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. If the implementation writes using XML elements, attributes can be inserted before writing the contents of the object. The three methods are also called by the virtual implementation of the method. - + , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. If the implementation writes using XML elements, attributes can be inserted before writing the contents of the object. The three methods are also called by the virtual implementation of the method. + ]]> diff --git a/xml/System.Runtime.Serialization/XmlSerializableServices.xml b/xml/System.Runtime.Serialization/XmlSerializableServices.xml index 8ab73ae72c3..5d8db1ed488 100644 --- a/xml/System.Runtime.Serialization/XmlSerializableServices.xml +++ b/xml/System.Runtime.Serialization/XmlSerializableServices.xml @@ -162,7 +162,7 @@ objects. It is a helper method used by the types that implement and that use the method. + This method reads all XML contained within the node the reader is positioned on when this call is made. This enables it to read and store all XML as an array of objects. It is a helper method used by the types that implement and that use the method. ]]> diff --git a/xml/System.Runtime.Serialization/XsdDataContractExporter.xml b/xml/System.Runtime.Serialization/XsdDataContractExporter.xml index 8be7a92b6e2..d217f4dc007 100644 --- a/xml/System.Runtime.Serialization/XsdDataContractExporter.xml +++ b/xml/System.Runtime.Serialization/XsdDataContractExporter.xml @@ -53,7 +53,7 @@ For more information about this API, see Supplemental API remarks for XsdDataContractExporter. and calls the method. +The following example creates an instance of the and calls the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractexporter/cs/overview.cs" id="Snippet0"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractexporter/vb/overview.vb" id="Snippet0"::: @@ -155,7 +155,7 @@ The following example creates an instance of the to which you want to add new schemas. After you construct a with this overload, call the method to add new types to the existing set. + Use this overload when you have an existing to which you want to add new schemas. After you construct a with this overload, call the method to add new types to the existing set. ]]> @@ -348,7 +348,7 @@ The following example creates an instance of the method before calling the method. + The following example calls the method before calling the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractexporter/cs/overview.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractexporter/vb/overview.vb" id="Snippet1"::: @@ -369,9 +369,9 @@ The following example creates an instance of the overloads to determine whether the specified type or set of types can be exported. + As a recommended practice, use one of the overloads to determine whether the specified type or set of types can be exported. - After calling the method, retrieve the schemas from the property. + After calling the method, retrieve the schemas from the property. ]]> @@ -544,7 +544,7 @@ The following example creates an instance of the to determine whether the type can be exported. After calling the method, the schema can be retrieved through the property. + Call the to determine whether the type can be exported. After calling the method, the schema can be retrieved through the property. ]]> @@ -677,7 +677,7 @@ The following example creates an instance of the . This method returns the definition for such types. The types for which the method returns a valid name, this method returns `null`. + The main purpose of this method is to allow anonymous types in XML schema to be represented. Because anonymous types do not have a contract name and namespace, they cannot be looked up using the . This method returns the definition for such types. The types for which the method returns a valid name, this method returns `null`. ]]> diff --git a/xml/System.Runtime.Serialization/XsdDataContractImporter.xml b/xml/System.Runtime.Serialization/XsdDataContractImporter.xml index 73efc6e3c57..ecca5cbb5b6 100644 --- a/xml/System.Runtime.Serialization/XsdDataContractImporter.xml +++ b/xml/System.Runtime.Serialization/XsdDataContractImporter.xml @@ -40,7 +40,7 @@ Web service, or to create data contract types from XML schemas. will transform a set of XML schemas and create the .NET Framework types that represent the data contract in a selected programming language. To create the code, use the classes in the namespace. - + Conversely, use the class when you have created a Web service that incorporates data represented by CLR types and when you need to export XML schemas for each data type to be consumed by other Web services.That is, transforms a set of CLR types into a set of XML schemas. @@ -117,7 +117,7 @@ ## Examples - The following example creates an and calls the method to create a . The is then used to create both Visual C# and Visual Basic code files. + The following example creates an and calls the method to create a . The is then used to create both Visual C# and Visual Basic code files. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractimporter/cs/xsddatacontractimporterexample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractimporter/vb/xsddatacontractimporterexample.vb" id="Snippet1"::: @@ -183,7 +183,7 @@ method to determine whether the can be generated. + The following example calls the method to determine whether the can be generated. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractimporter/cs/xsddatacontractimporterexample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractimporter/vb/xsddatacontractimporterexample.vb" id="Snippet2"::: @@ -430,7 +430,7 @@ method. The contains the name of the generated type and can be used to look up the corresponding in the . + Use this method to look up the reference to a generated CLR type after calling the method. The contains the name of the generated type and can be used to look up the corresponding in the . ]]> @@ -477,7 +477,7 @@ . The element is passed in so that this importer can look up the element-level information and return the correct type reference accordingly. + The schema element is needed for data about the type that is specified at the element scope. The main example of this is the XSD attribute `nillable`. In schema, setting `nillable` to `true` is specified on the containing schema element whereas the concept of null is expressed in the CLR type . The element is passed in so that this importer can look up the element-level information and return the correct type reference accordingly. When importing WSDL, each parameter is imported separately and therefore the parameter elements need to be passed in separately. @@ -588,7 +588,7 @@ method to test whether a set of schemas can be imported. If the method returns `true`, the code invokes the method. + The following example uses the method to test whether a set of schemas can be imported. If the method returns `true`, the code invokes the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractimporter/cs/xsddatacontractimporterexample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractimporter/vb/xsddatacontractimporterexample.vb" id="Snippet2"::: diff --git a/xml/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml b/xml/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml index 9b2276f7da6..f93d5080eb4 100644 --- a/xml/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml +++ b/xml/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml @@ -157,7 +157,7 @@ property corresponds to the `guarantees` parameter of the constructor. + The value of the property corresponds to the `guarantees` parameter of the constructor. ]]> diff --git a/xml/System.Runtime.Versioning/FrameworkName.xml b/xml/System.Runtime.Versioning/FrameworkName.xml index 19d8f1dee01..5550c0ab821 100644 --- a/xml/System.Runtime.Versioning/FrameworkName.xml +++ b/xml/System.Runtime.Versioning/FrameworkName.xml @@ -130,7 +130,7 @@ constructor parses a string in the following format. + The constructor parses a string in the following format. `*identifier*,Version=*versionNumber*[,Profile=*profileName*]` @@ -148,11 +148,11 @@ - Any leading or trailing white space in the *identifier* component is removed and the resulting string is assigned to the property. -- Any leading or trailing white space and the initial "v" or "V", if present, are removed from the `versionNumber`. The returned string is then passed to the constructor, and the resulting object is assigned to the property. +- Any leading or trailing white space and the initial "v" or "V", if present, are removed from the `versionNumber`. The returned string is then passed to the constructor, and the resulting object is assigned to the property. - Any leading or trailing white space in the `profileName` component is removed and the resulting string is assigned to the property. - The following are examples of valid strings that can be passed to the constructor: + The following are examples of valid strings that can be passed to the constructor: - .NET Framework, Version=4.0 @@ -238,7 +238,7 @@ class requires that a object include at least a major and minor version number. + The class requires that a object include at least a major and minor version number. ]]> @@ -310,7 +310,7 @@ class requires that a object include at least a major and minor version number. + The class requires that a object include at least a major and minor version number. ]]> @@ -394,7 +394,7 @@ object and calls the overload to test for equality. If the conversion does not succeed or if `obj` is `null`, the method returns `false`. + The method converts `obj` to a object and calls the overload to test for equality. If the conversion does not succeed or if `obj` is `null`, the method returns `false`. ]]> @@ -468,7 +468,7 @@ - An ordinal comparison of the property values of the current instance and `other`. -- A comparison of the version properties by calling the method. +- A comparison of the version properties by calling the method. ]]> @@ -524,9 +524,9 @@ *identifier*, Version=*version*[, Profile=*profile*] - where *identifier* corresponds to the property, `version` is equivalent to calling on the value of the property, and `profile` corresponds to the property. If a profile has not been assigned to the object, the profile component is not included in the string. + where *identifier* corresponds to the property, `version` is equivalent to calling on the value of the property, and `profile` corresponds to the property. If a profile has not been assigned to the object, the profile component is not included in the string. - The value of the property is identical to the string returned by the method. + The value of the property is identical to the string returned by the method. ]]> @@ -630,7 +630,7 @@ property is set in the class constructor. + The value of the read-only property is set in the class constructor. ]]> @@ -690,9 +690,9 @@ method defines the operation of the equality operator for objects. + The method defines the operation of the equality operator for objects. - Languages that do not support custom operators can call the method instead. + Languages that do not support custom operators can call the method instead. @@ -760,9 +760,9 @@ method defines the operation of the inequality operator for objects. + The method defines the operation of the inequality operator for objects. - Languages that do not support custom operators can test for inequality by calling the method and reversing its value. + Languages that do not support custom operators can test for inequality by calling the method and reversing its value. @@ -828,7 +828,7 @@ property is set in the class constructor. + The value of the read-only property is set in the class constructor. ]]> @@ -887,13 +887,13 @@ method has the following format: + The string returned by the method has the following format: *identifier*, Version=*version*[, Profile=*profile*] - where *identifier* corresponds to the property, `version` is equivalent to calling on the value of the property, and `profile` corresponds to the property. If a profile has not been assigned to the object, the profile component is not included in the returned string. + where *identifier* corresponds to the property, `version` is equivalent to calling on the value of the property, and `profile` corresponds to the property. If a profile has not been assigned to the object, the profile component is not included in the returned string. - The value returned by the method is identical to the value of the property. + The value returned by the method is identical to the value of the property. ]]> @@ -951,7 +951,7 @@ property is set in the class constructor. + The value of the read-only property is set in the class constructor. ]]> diff --git a/xml/System.Runtime.Versioning/TargetFrameworkAttribute.xml b/xml/System.Runtime.Versioning/TargetFrameworkAttribute.xml index f72c680d8c7..d79ed990d27 100644 --- a/xml/System.Runtime.Versioning/TargetFrameworkAttribute.xml +++ b/xml/System.Runtime.Versioning/TargetFrameworkAttribute.xml @@ -122,7 +122,7 @@ method. + The string that is assigned to the `frameworkName` parameter generally takes the same form as the string that is returned by the method. ]]> @@ -234,7 +234,7 @@ property maps to the `frameworkName` parameter of the constructor. It represents the .NET version in a compact form and typically corresponds to the string that is returned by the method. + The property maps to the `frameworkName` parameter of the constructor. It represents the .NET version in a compact form and typically corresponds to the string that is returned by the method. ]]> diff --git a/xml/System.Runtime/GCSettings.xml b/xml/System.Runtime/GCSettings.xml index 7d37853b32e..6dcebbfab75 100644 --- a/xml/System.Runtime/GCSettings.xml +++ b/xml/System.Runtime/GCSettings.xml @@ -274,7 +274,7 @@ For information about server garbage collection, see [Workstation and Server Gar ## Remarks You can reduce the level of intrusiveness of garbage collection in your application by setting the to during critical operations. After such operations are completed, return to a higher latency mode so that more objects can be reclaimed to increase memory. - Ordinarily, you set the value of the property to define the garbage collector's latency mode. However, you cannot set the no GC region latency mode by assigning the enumeration value to the property. Instead, you call the method to begin the no GC region latency mode, and you call the to end it. + Ordinarily, you set the value of the property to define the garbage collector's latency mode. However, you cannot set the no GC region latency mode by assigning the enumeration value to the property. Instead, you call the method to begin the no GC region latency mode, and you call the to end it. See [Latency Modes](/dotnet/standard/garbage-collection/latency) for a discussion of how the runtime configuration settings for garbage collection affect the default value of the enumeration. diff --git a/xml/System.Runtime/MemoryFailPoint.xml b/xml/System.Runtime/MemoryFailPoint.xml index 880ffbe8d4e..f142f55ee61 100644 --- a/xml/System.Runtime/MemoryFailPoint.xml +++ b/xml/System.Runtime/MemoryFailPoint.xml @@ -50,35 +50,35 @@ Checks for sufficient memory resources before executing an operation. This class cannot be inherited. - [!NOTE] -> This class is intended for use in advanced development. - - Creating an instance of the class creates a memory gate. A memory gate checks for sufficient resources before initiating an activity that requires a large amount of memory. Failing the check results in an exception being thrown. This exception prevents an operation from being started and reduces the possibility of failure due to lack of resources. This enables you decrease performance to avoid an exception and any state corruption that may result from improper handling of the exception in arbitrary locations in your code. - +> This class is intended for use in advanced development. + + Creating an instance of the class creates a memory gate. A memory gate checks for sufficient resources before initiating an activity that requires a large amount of memory. Failing the check results in an exception being thrown. This exception prevents an operation from being started and reduces the possibility of failure due to lack of resources. This enables you decrease performance to avoid an exception and any state corruption that may result from improper handling of the exception in arbitrary locations in your code. + > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. - - By throwing an exception, an application can distinguish between an estimate that an operation will not be able to complete and a partially completed operation that may have corrupted the application state. This allows an application to reduce the frequency of a pessimistic escalation policy, which may require unloading the current or recycling the process. - - checks to see whether sufficient memory and consecutive virtual address space are available in all garbage collection heaps, and may increase the size of the swap file. makes no guarantees regarding the long-term availability of the memory during the lifetime of the gate, but callers should always use the method to ensure that resources associated with are released. - - To use a memory gate, you must create a object and specify the number of megabytes (MB) of memory that the next operation is expected to use. If enough memory is not available, an exception is thrown. - - The parameter of the constructor must be a positive integer. A negative value or 0 raises an exception. - - operates at a granularity of 16 MB. Any values smaller than 16 MB are treated as 16 MB, and other values are treated as the next largest multiple of 16 MB. - - - -## Examples - enables an application to slow itself to avoid running out of memory in a corrupting manner. It should be used within a lexical scope. The following example launches threads to process items in a work queue. Before each thread is launched, the available memory resources are checked using . If an exception is thrown, the main method waits until memory is available before launching the next thread. - - :::code language="csharp" source="~/snippets/csharp/System.Runtime/MemoryFailPoint/Overview/program.cs" id="Snippet1"::: - +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. + + By throwing an exception, an application can distinguish between an estimate that an operation will not be able to complete and a partially completed operation that may have corrupted the application state. This allows an application to reduce the frequency of a pessimistic escalation policy, which may require unloading the current or recycling the process. + + checks to see whether sufficient memory and consecutive virtual address space are available in all garbage collection heaps, and may increase the size of the swap file. makes no guarantees regarding the long-term availability of the memory during the lifetime of the gate, but callers should always use the method to ensure that resources associated with are released. + + To use a memory gate, you must create a object and specify the number of megabytes (MB) of memory that the next operation is expected to use. If enough memory is not available, an exception is thrown. + + The parameter of the constructor must be a positive integer. A negative value or 0 raises an exception. + + operates at a granularity of 16 MB. Any values smaller than 16 MB are treated as 16 MB, and other values are treated as the next largest multiple of 16 MB. + + + +## Examples + enables an application to slow itself to avoid running out of memory in a corrupting manner. It should be used within a lexical scope. The following example launches threads to process items in a work queue. Before each thread is launched, the available memory resources are checked using . If an exception is thrown, the main method waits until memory is available before launching the next thread. + + :::code language="csharp" source="~/snippets/csharp/System.Runtime/MemoryFailPoint/Overview/program.cs" id="Snippet1"::: + ]]> @@ -128,18 +128,18 @@ The required memory size, in megabytes. This must be a positive value. Initializes a new instance of the class, specifying the amount of memory required for successful execution. - method to determine the amount of memory available before and after calling the method that processes the work item. See the class for a code example that dynamically determines the value for the `sizeInMegabytes` parameter. - - - -## Examples - The following example demonstrates how to determine the amount of memory a method requires when executing. This code example is part of a larger example provided for the class. - - :::code language="csharp" source="~/snippets/csharp/System.Runtime/MemoryFailPoint/Overview/program.cs" id="Snippet2"::: - + method to determine the amount of memory available before and after calling the method that processes the work item. See the class for a code example that dynamically determines the value for the `sizeInMegabytes` parameter. + + + +## Examples + The following example demonstrates how to determine the amount of memory a method requires when executing. This code example is part of a larger example provided for the class. + + :::code language="csharp" source="~/snippets/csharp/System.Runtime/MemoryFailPoint/Overview/program.cs" id="Snippet2"::: + ]]> The specified memory size is negative or 0. @@ -194,14 +194,14 @@ Releases all resources used by the . - when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - + when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. - +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. + ]]> @@ -249,11 +249,11 @@ Ensures that resources are freed and other cleanup operations are performed when the garbage collector reclaims the object. - method when the current object is ready to be finalized. - + method when the current object is ready to be finalized. + ]]> diff --git a/xml/System.Runtime/ProfileOptimization.xml b/xml/System.Runtime/ProfileOptimization.xml index a7475b113fd..2e696413129 100644 --- a/xml/System.Runtime/ProfileOptimization.xml +++ b/xml/System.Runtime/ProfileOptimization.xml @@ -40,23 +40,23 @@ Improves the startup performance of application domains in applications that require the just-in-time (JIT) compiler by performing background compilation of methods that are likely to be executed, based on profiles created during previous compilations. - [!IMPORTANT] -> Profile optimization requires a multicore computer. The methods are ignored on other computers. - - Each time you initiate profile optimization in an application domain, the profile that was created during the previous use is read. The information in the profile is used to guide background compilation by identifying the methods that are most likely to be executed during startup. On multicore computers, this increases the chances that a method is already compiled by the time it is needed so that the main application thread does not have to call the JIT compiler. - - The profile file is overwritten on each use, so it always contains the most recent information about which methods are used during startup. - - Optimization profiles are not restricted to application domain startup. They can be used for any activity that will require heavy use of the JIT compiler. You can maintain multiple profiles for an application domain so that each such activity has its own profile. - - To use optimization profiles in an application domain, you must call the method and specify the folder where profiles are stored. The folder must already exist. To begin using a profile, call the method and specify the file name of the profile. If the file was not recorded previously, it is created on first use. There is no performance benefit the first time a profile is created. - - Profile optimization does not change the order in which methods are executed. Methods are not executed on the background thread; if a method is compiled but never called, it is simply not used. If a profile file is corrupt or cannot be written to the specified folder (for example, because the folder does not exist), program execution continues without optimization profiling. - +> Profile optimization requires a multicore computer. The methods are ignored on other computers. + + Each time you initiate profile optimization in an application domain, the profile that was created during the previous use is read. The information in the profile is used to guide background compilation by identifying the methods that are most likely to be executed during startup. On multicore computers, this increases the chances that a method is already compiled by the time it is needed so that the main application thread does not have to call the JIT compiler. + + The profile file is overwritten on each use, so it always contains the most recent information about which methods are used during startup. + + Optimization profiles are not restricted to application domain startup. They can be used for any activity that will require heavy use of the JIT compiler. You can maintain multiple profiles for an application domain so that each such activity has its own profile. + + To use optimization profiles in an application domain, you must call the method and specify the folder where profiles are stored. The folder must already exist. To begin using a profile, call the method and specify the file name of the profile. If the file was not recorded previously, it is created on first use. There is no performance benefit the first time a profile is created. + + Profile optimization does not change the order in which methods are executed. Methods are not executed on the background thread; if a method is compiled but never called, it is simply not used. If a profile file is corrupt or cannot be written to the specified folder (for example, because the folder does not exist), program execution continues without optimization profiling. + ]]> @@ -104,15 +104,15 @@ The full path to the folder where profile files are stored for the current application domain. Enables optimization profiling for the current application domain, and sets the folder where the optimization profile files are stored. On a single-core computer, the method is ignored. - method for the first time in the current application domain. If you call more than once in the same application domain, all calls after the first are ignored. - - The specified folder must already exist. If it does not exist, calling this method does not create it, and no profiling occurs. - - On computers that do not have multiple cores, this method is ignored. - + method for the first time in the current application domain. If you call more than once in the same application domain, all calls after the first are ignored. + + The specified folder must already exist. If it does not exist, calling this method does not create it, and no profiling occurs. + + On computers that do not have multiple cores, this method is ignored. + ]]> @@ -161,19 +161,19 @@ The file name of the profile to use. Starts just-in-time (JIT) compilation of the methods that were previously recorded in the specified profile file, on a background thread. Starts the process of recording current method use, which later overwrites the specified profile file. - method, the information it contains is used to determine the order in which methods are compiled on the background thread. The method creates the profile if it does not already exist, and initiates the recording of method use. - - Only methods that are actually called are recorded, regardless of whether they were compiled on the background thread or on the main application thread. A method is compiled on the main application thread if the application needs to call it before the background thread has compiled it. - - The code that performs the recording tracks the rate at which methods are compiled, including methods that are compiled on both the background thread and on the main thread. When the rate falls below a predetermined level, recording stops. Recording also stops if the rate of JIT compilation exceeds a predetermined upper limit. - + method, the information it contains is used to determine the order in which methods are compiled on the background thread. The method creates the profile if it does not already exist, and initiates the recording of method use. + + Only methods that are actually called are recorded, regardless of whether they were compiled on the background thread or on the main application thread. A method is compiled on the main application thread if the application needs to call it before the background thread has compiled it. + + The code that performs the recording tracks the rate at which methods are compiled, including methods that are compiled on both the background thread and on the main thread. When the rate falls below a predetermined level, recording stops. Recording also stops if the rate of JIT compilation exceeds a predetermined upper limit. + Calling this method stops any previous recording in progress. Calling this method with a null profile file name stops any recording in progress and does not start a new recording. - - If the method has not been called for the current application domain, or if the computer does not have multiple cores, the method has no effect. - + + If the method has not been called for the current application domain, or if the computer does not have multiple cores, the method has no effect. + ]]> From 948e06ab20d7343958e946f7f867b263a440efe3 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:47:08 -0700 Subject: [PATCH 6/8] Revert "System.Linq" This reverts commit b9a8751a5cbb7cd9bc45497f41ba8c84d47b0e8c. --- .../BinaryExpression.xml | 4 +- .../BlockExpression.xml | 34 +- xml/System.Linq.Expressions/CatchBlock.xml | 10 +- .../ConditionalExpression.xml | 38 +- .../ConstantExpression.xml | 38 +- .../DebugInfoExpression.xml | 10 +- .../DefaultExpression.xml | 14 +- .../DynamicExpression.xml | 2 +- xml/System.Linq.Expressions/Expression.xml | 212 ++-- .../ExpressionVisitor.xml | 2 +- xml/System.Linq.Expressions/Expression`1.xml | 16 +- .../GotoExpression.xml | 14 +- .../IArgumentProvider.xml | 26 +- .../IndexExpression.xml | 14 +- .../InvocationExpression.xml | 28 +- xml/System.Linq.Expressions/LabelTarget.xml | 24 +- .../LambdaExpression.xml | 8 +- .../ListInitExpression.xml | 2 +- .../LoopExpression.xml | 14 +- .../MemberAssignment.xml | 2 +- .../MemberExpression.xml | 4 +- .../MemberInitExpression.xml | 2 +- .../MemberListBinding.xml | 2 +- .../MemberMemberBinding.xml | 2 +- .../MethodCallExpression.xml | 4 +- .../NewArrayExpression.xml | 52 +- xml/System.Linq.Expressions/NewExpression.xml | 6 +- .../ParameterExpression.xml | 6 +- .../RuntimeVariablesExpression.xml | 10 +- xml/System.Linq.Expressions/SwitchCase.xml | 14 +- .../SwitchExpression.xml | 14 +- xml/System.Linq.Expressions/TryExpression.xml | 44 +- .../TypeBinaryExpression.xml | 2 +- .../UnaryExpression.xml | 24 +- xml/System.Linq/Enumerable.xml | 950 +++++++++--------- xml/System.Linq/IGrouping`2.xml | 18 +- xml/System.Linq/ILookup`2.xml | 28 +- xml/System.Linq/IOrderedEnumerable`1.xml | 46 +- xml/System.Linq/IOrderedQueryable.xml | 18 +- xml/System.Linq/IOrderedQueryable`1.xml | 18 +- xml/System.Linq/IQueryProvider.xml | 14 +- xml/System.Linq/IQueryable.xml | 4 +- xml/System.Linq/IQueryable`1.xml | 28 +- xml/System.Linq/ImmutableArrayExtensions.xml | 6 +- xml/System.Linq/Lookup`2.xml | 20 +- xml/System.Linq/ParallelEnumerable.xml | 44 +- xml/System.Linq/Queryable.xml | 842 ++++++++-------- 47 files changed, 1367 insertions(+), 1367 deletions(-) diff --git a/xml/System.Linq.Expressions/BinaryExpression.xml b/xml/System.Linq.Expressions/BinaryExpression.xml index fce8589fb94..165f93fdfc1 100644 --- a/xml/System.Linq.Expressions/BinaryExpression.xml +++ b/xml/System.Linq.Expressions/BinaryExpression.xml @@ -121,7 +121,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> @@ -331,7 +331,7 @@ is `true`, the operator returns a nullable type, and if a nullable operand evaluates to `null`, the operator returns `null`. + An operator call is lifted if the operator expects non-nullable operands but nullable operands are passed to it. If the value of is `true`, the operator returns a nullable type, and if a nullable operand evaluates to `null`, the operator returns `null`. ]]> diff --git a/xml/System.Linq.Expressions/BlockExpression.xml b/xml/System.Linq.Expressions/BlockExpression.xml index 20b4f7d964b..d3c6319b30c 100644 --- a/xml/System.Linq.Expressions/BlockExpression.xml +++ b/xml/System.Linq.Expressions/BlockExpression.xml @@ -58,19 +58,19 @@ Represents a block that contains a sequence of expressions where variables can be defined. - methods can be used to create a . - - - -## Examples - The following code example shows how to create a block expression. The block expression consists of two objects and one object. - + methods can be used to create a . + + + +## Examples + The following code example shows how to create a block expression. The block expression consists of two objects and one object. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet13"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet13"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet13"::: + ]]> @@ -120,11 +120,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/CatchBlock.xml b/xml/System.Linq.Expressions/CatchBlock.xml index a232cb62dac..8ccb9293597 100644 --- a/xml/System.Linq.Expressions/CatchBlock.xml +++ b/xml/System.Linq.Expressions/CatchBlock.xml @@ -58,11 +58,11 @@ Represents a catch statement in a try block. - methods can be used to create a . - + methods can be used to create a . + ]]> diff --git a/xml/System.Linq.Expressions/ConditionalExpression.xml b/xml/System.Linq.Expressions/ConditionalExpression.xml index ba9014afb12..69c0d5f7ba9 100644 --- a/xml/System.Linq.Expressions/ConditionalExpression.xml +++ b/xml/System.Linq.Expressions/ConditionalExpression.xml @@ -63,21 +63,21 @@ Represents an expression that has a conditional operator. - factory method to create a . - - The of a is . - - - -## Examples - The following code example shows how to create an expression that represents a conditional statement. If the first argument evaluates to `true`, the second argument is executed; otherwise, the third argument is executed. - + factory method to create a . + + The of a is . + + + +## Examples + The following code example shows how to create an expression that represents a conditional statement. If the first argument evaluates to `true`, the second argument is executed; otherwise, the third argument is executed. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet3"::: + ]]> @@ -127,11 +127,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/ConstantExpression.xml b/xml/System.Linq.Expressions/ConstantExpression.xml index fe36a28b634..4e3d6eed902 100644 --- a/xml/System.Linq.Expressions/ConstantExpression.xml +++ b/xml/System.Linq.Expressions/ConstantExpression.xml @@ -63,21 +63,21 @@ Represents an expression that has a constant value. - factory methods to create a . - - The of a is . - - - -## Examples - The following code example shows how to create an expression that represents a constant value by using the method. - + factory methods to create a . + + The of a is . + + + +## Examples + The following code example shows how to create an expression that represents a constant value by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet4"::: + ]]> @@ -127,11 +127,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/DebugInfoExpression.xml b/xml/System.Linq.Expressions/DebugInfoExpression.xml index 0d1f54e828c..6ba8aef45ae 100644 --- a/xml/System.Linq.Expressions/DebugInfoExpression.xml +++ b/xml/System.Linq.Expressions/DebugInfoExpression.xml @@ -105,11 +105,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/DefaultExpression.xml b/xml/System.Linq.Expressions/DefaultExpression.xml index 82c11d21c78..8d3cd9c4080 100644 --- a/xml/System.Linq.Expressions/DefaultExpression.xml +++ b/xml/System.Linq.Expressions/DefaultExpression.xml @@ -58,14 +58,14 @@ Represents the default value of a type or an empty expression. - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet6"::: + ]]> diff --git a/xml/System.Linq.Expressions/DynamicExpression.xml b/xml/System.Linq.Expressions/DynamicExpression.xml index 944eb47b568..106f6267d91 100644 --- a/xml/System.Linq.Expressions/DynamicExpression.xml +++ b/xml/System.Linq.Expressions/DynamicExpression.xml @@ -137,7 +137,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> diff --git a/xml/System.Linq.Expressions/Expression.xml b/xml/System.Linq.Expressions/Expression.xml index fb3370d4a7a..473ff427daf 100644 --- a/xml/System.Linq.Expressions/Expression.xml +++ b/xml/System.Linq.Expressions/Expression.xml @@ -232,7 +232,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> @@ -862,7 +862,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -958,7 +958,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1067,7 +1067,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1171,7 +1171,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1280,7 +1280,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1393,7 +1393,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1712,7 +1712,7 @@ The following code example shows how to create an expression that adds two integ method, or through or . + The expression that represents the array can be obtained by using the method, or through or . @@ -1788,9 +1788,9 @@ The following code example shows how to create an expression that adds two integ method, or through or . + The expression that represents the array can be obtained by using the method, or through or . - For multidimensional arrays, use the method. + For multidimensional arrays, use the method. @@ -1867,7 +1867,7 @@ The following code example shows how to create an expression that adds two integ equal to . The property of `array` must represent an array type whose rank matches the number of elements in `indexes`. + Each element of `indexes` must have equal to . The property of `array` must represent an array type whose rank matches the number of elements in `indexes`. If the rank of `array`.Type is 1, this method returns a . The property is set to `array` and the property is set to the single element of `indexes`. The property of the represents the element type of `array`.Type. @@ -1876,7 +1876,7 @@ The following code example shows how to create an expression that adds two integ ## Examples - The following example demonstrates how to use the method to create a that represents indexing into a two-dimensional array. + The following example demonstrates how to use the method to create a that represents indexing into a two-dimensional array. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet3"::: @@ -1950,7 +1950,7 @@ The following code example shows how to create an expression that adds two integ ## Remarks `index` must represent an index of type . - The property of the resulting is `null`, and both and are set to `false`. The property is equal to the element type of `array`.Type. The property is `null`. + The property of the resulting is `null`, and both and are set to `false`. The property is equal to the element type of `array`.Type. The property is `null`. ]]> @@ -2026,7 +2026,7 @@ The following code example shows how to create an expression that adds two integ equal to . The property of `array` must represent an array type whose rank matches the number of elements in `indexes`. + Each element of `indexes` must have equal to . The property of `array` must represent an array type whose rank matches the number of elements in `indexes`. If the rank of `array`.Type is 1, this method returns a . The property is set to `array` and the property is set to the single element of `indexes`. The property of the represents the element type of `array`.Type. @@ -2035,7 +2035,7 @@ The following code example shows how to create an expression that adds two integ ## Examples - The following example demonstrates how to use the method to create a that represents indexing into a two-dimensional array. + The following example demonstrates how to use the method to create a that represents indexing into a two-dimensional array. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet3"::: @@ -2107,7 +2107,7 @@ The following code example shows how to create an expression that adds two integ ## Remarks The property of `array` must represent an array type. - The property of the resulting is equal to . The property is `null`, and both and are set to `false`. + The property of the resulting is equal to . The property is `null`, and both and are set to `false`. ]]> @@ -2244,7 +2244,7 @@ The following code example shows how to create an expression that adds two integ property of `expression` must be assignable to the type represented by the or property of `member`. + The property of `expression` must be assignable to the type represented by the or property of `member`. ]]> @@ -3141,7 +3141,7 @@ The following code example shows how to create an expression that adds two integ object that uses the method. + The following example demonstrates how to create an expression that contains a object that uses the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet44"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet44"::: @@ -3705,7 +3705,7 @@ The following code example shows how to create an expression that adds two integ instead. + To represent a call to a `static` (`Shared` in Visual Basic) method, pass in `null` for the `instance` parameter when you call this method, or call instead. If `method` represents an instance method, the property of `instance` must be assignable to the declaring type of the method represented by `method`. @@ -3810,7 +3810,7 @@ The following code example shows how to create an expression that adds two integ instead. + To represent a call to a `static` (`Shared` in Visual Basic) method, pass in `null` for the `instance` parameter when you call this method, or call instead. If `method` represents an instance method, the property of `instance` must be assignable to the declaring type of the method represented by `method`. @@ -4567,7 +4567,7 @@ The following code example shows how to create an expression that adds two integ of to be caught can be specified but no reference to the object will be available for use in the . + The of to be caught can be specified but no reference to the object will be available for use in the . ]]> @@ -4813,7 +4813,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is `null` and both and are set to `false`. The property is equal to the result type of the coalescing operation. The property is `null`. + The property of the resulting is `null` and both and are set to `false`. The property is equal to the result type of the coalescing operation. The property is `null`. #### Result Type The following rules determine the result type: @@ -4895,7 +4895,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is `null` and both and are set to `false`. + The property of the resulting is `null` and both and are set to `false`. The property of the resulting is equal to the result type of the coalescing operation. @@ -5146,9 +5146,9 @@ The following code example shows how to create an expression that adds two integ property of the resulting is equal to the type of `value`. If `value` is `null`, is equal to . + The property of the resulting is equal to the type of `value`. If `value` is `null`, is equal to . - To represent `null`, you can also use the method, with which you can explicitly specify the type. + To represent `null`, you can also use the method, with which you can explicitly specify the type. @@ -5299,7 +5299,7 @@ The following code example shows how to create an expression that adds two integ method. + The following example demonstrates how to create a loop expression that uses the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet46"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet46"::: @@ -5432,7 +5432,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. + The property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -5534,7 +5534,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. + The property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -5653,7 +5653,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. + The property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -5747,7 +5747,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. + The property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -6122,7 +6122,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -6226,7 +6226,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -6932,7 +6932,7 @@ The following code example shows how to create an expression that adds two integ ## Examples - The following example demonstrates how to use the method to create an that represents calling the method to initialize an element of a dictionary collection. + The following example demonstrates how to use the method to create an that represents calling the method to initialize an element of a dictionary collection. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet4"::: @@ -7028,7 +7028,7 @@ The following code example shows how to create an expression that adds two integ ## Examples - The following example demonstrates how to use the method to create an that represents calling the method to initialize an element of a dictionary collection. + The following example demonstrates how to use the method to create an that represents calling the method to initialize an element of a dictionary collection. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet4"::: @@ -7392,7 +7392,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -7496,7 +7496,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -7880,7 +7880,7 @@ The following code example shows how to create an expression that adds two integ ## Remarks The property of the resulting is equal to the property of the that represents the field denoted by `fieldName`. - This method searches `expression`.Type and its base types for a field that has the name `fieldName`. Public fields are given preference over non-public fields. If a matching field is found, this method passes `expression` and the that represents that field to . + This method searches `expression`.Type and its base types for a field that has the name `fieldName`. Public fields are given preference over non-public fields. If a matching field is found, this method passes `expression` and the that represents that field to . @@ -9213,7 +9213,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an that represents the invocation of a lambda expression with specified arguments. + The following example demonstrates how to use the method to create an that represents the invocation of a lambda expression with specified arguments. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet6"::: @@ -9305,7 +9305,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an that represents the invocation of a lambda expression with specified arguments. + The following example demonstrates how to use the method to create an that represents the invocation of a lambda expression with specified arguments. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet6"::: @@ -10366,7 +10366,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V . The type is used to represent the returned object because the concrete type of the lambda expression is not known at compile time. + The object that is returned from this function is of type . The type is used to represent the returned object because the concrete type of the lambda expression is not known at compile time. The number of parameters for the delegate type represented by`delegateType` must equal the length of `parameters`. @@ -10477,7 +10477,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V . The type is used to represent the returned object because the concrete type of the lambda expression is not known at compile time. + The object that is returned from this function is of type . The type is used to represent the returned object because the concrete type of the lambda expression is not known at compile time. The number of parameters for the delegate type represented by `delegateType` must equal the length of `parameters`. @@ -11450,7 +11450,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -11546,7 +11546,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -12574,7 +12574,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create a that represents the initialization of a new dictionary instance with two key-value pairs. + The following example demonstrates how to use the method to create a that represents the initialization of a new dictionary instance with two key-value pairs. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet7"::: @@ -12654,9 +12654,9 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Remarks The property of `newExpression` must represent a type that implements . - In order to use this overload of , `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. The type of the argument must be assignable from the type represented by the property of the first element of `initializers`. + In order to use this overload of , `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. The type of the argument must be assignable from the type represented by the property of the first element of `initializers`. - The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of represents the add method that was discovered on `newExpression`.Type or its base type. + The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of represents the add method that was discovered on `newExpression`.Type or its base type. The property of the resulting is equal to `newExpression`.Type. @@ -12750,7 +12750,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create a that represents the initialization of a new dictionary instance with two key-value pairs. + The following example demonstrates how to use the method to create a that represents the initialization of a new dictionary instance with two key-value pairs. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet7"::: @@ -12837,9 +12837,9 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Remarks The property of `newExpression` must represent a type that implements . - In order to use this overload of , `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. The type of the argument must be assignable from the type represented by the property of the first element of `initializers`. + In order to use this overload of , `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. The type of the argument must be assignable from the type represented by the property of the first element of `initializers`. - The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of represents the add method that was discovered on `newExpression`.Type or its base type. + The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of represents the add method that was discovered on `newExpression`.Type or its base type. The property of the resulting is equal to `newExpression`.Type. @@ -12943,7 +12943,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V If `addMethod` is `null`, `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. If `addMethod` is not `null`, it must represent an instance method named "Add" (case insensitive) that has exactly one parameter. The type represented by the property of each element of `initializers` must be assignable to the argument type of the add method. - The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of is equal to `addMethod`. + The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of is equal to `addMethod`. The property of the resulting is equal to `newExpression`.Type. @@ -13051,7 +13051,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V If `addMethod` is `null`, `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. If `addMethod` is not `null`, it must represent an instance method named "Add" (case insensitive) that has exactly one parameter. The type represented by the property of each element of `initializers` must be assignable to the argument type of the add method. - The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of is equal to `addMethod`. + The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of is equal to `addMethod`. The property of the resulting is equal to `newExpression`.Type. @@ -13352,12 +13352,12 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method calls. For example, if `binaryType` is , this method invokes . + The `binaryType` parameter determines which factory method this method calls. For example, if `binaryType` is , this method invokes . ## Examples - The following example demonstrates how to use the method to create a that represents the subtraction of one number from another. + The following example demonstrates how to use the method to create a that represents the subtraction of one number from another. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet8"::: @@ -13442,7 +13442,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method will call. For example, if `binaryType` is , this method invokes . The `liftToNull` and `method` parameters are ignored if the appropriate factory method does not have a corresponding parameter. + The `binaryType` parameter determines which factory method this method will call. For example, if `binaryType` is , this method invokes . The `liftToNull` and `method` parameters are ignored if the appropriate factory method does not have a corresponding parameter. ]]> @@ -13527,7 +13527,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method will call. For example, if `binaryType` is , this method invokes . The `liftToNull`, `method` and `conversion` parameters are ignored if the appropriate factory method does not have a corresponding parameter. + The `binaryType` parameter determines which factory method this method will call. For example, if `binaryType` is , this method invokes . The `liftToNull`, `method` and `conversion` parameters are ignored if the appropriate factory method does not have a corresponding parameter. ]]> @@ -14164,7 +14164,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V that represents accessing either a field or a property, depending on the type of `member`. If `member` is of type , this method calls to create the . If `member` is of type , this method calls to create the . + This method can be used to create a that represents accessing either a field or a property, depending on the type of `member`. If `member` is of type , this method calls to create the . If `member` is of type , this method calls to create the . ]]> @@ -14315,7 +14315,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method calls. For example, if `unaryType` is equal to , this method invokes . The `type`parameter is ignored if it does not apply to the factory method that is called. + The `unaryType` parameter determines which factory method this method calls. For example, if `unaryType` is equal to , this method invokes . The `type`parameter is ignored if it does not apply to the factory method that is called. ]]> @@ -14388,7 +14388,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method calls. For example, if `unaryType` is equal to , this method invokes . The `type` and `method` parameters are ignored if they do not apply to the factory method that is called. + The `unaryType` parameter determines which factory method this method calls. For example, if `unaryType` is equal to , this method invokes . The `type` and `method` parameters are ignored if they do not apply to the factory method that is called. ]]> @@ -14825,7 +14825,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create a that represents the initialization of two members of a new object. + The following example demonstrates how to use the method to create a that represents the initialization of two members of a new object. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet9"::: @@ -14906,7 +14906,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -15002,7 +15002,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -15311,7 +15311,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -15415,7 +15415,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -15924,7 +15924,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -16020,7 +16020,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -16127,7 +16127,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -16223,7 +16223,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -16328,7 +16328,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -16416,7 +16416,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -16521,7 +16521,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V and properties of the resulting are empty collections. The property represents the declaring type of the constructor represented by `constructor`. + The and properties of the resulting are empty collections. The property represents the declaring type of the constructor represented by `constructor`. ]]> @@ -16588,12 +16588,12 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Remarks The `type` parameter must represent a type that has a constructor without parameters. - The and properties of the resulting are empty collections. The property is equal to `type`. + The and properties of the resulting are empty collections. The property is equal to `type`. ## Examples - The following example demonstrates how to use the method to create a that represents constructing a new instance of a dictionary object by calling the constructor without parameters. + The following example demonstrates how to use the method to create a that represents constructing a new instance of a dictionary object by calling the constructor without parameters. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet10"::: @@ -17059,7 +17059,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an expression tree that represents creating a string array that has a rank of 2. + The following example demonstrates how to use the method to create an expression tree that represents creating a string array that has a rank of 2. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet2"::: @@ -17146,7 +17146,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an expression tree that represents creating a string array that has a rank of 2. + The following example demonstrates how to use the method to create an expression tree that represents creating a string array that has a rank of 2. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet2"::: @@ -17241,7 +17241,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an expression tree that represents creating a one-dimensional string array that is initialized with a list of string expressions. + The following example demonstrates how to use the method to create an expression tree that represents creating a one-dimensional string array that is initialized with a list of string expressions. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet1"::: @@ -17331,7 +17331,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an expression tree that represents creating a one-dimensional string array that is initialized with a list of string expressions. + The following example demonstrates how to use the method to create an expression tree that represents creating a one-dimensional string array that is initialized with a list of string expressions. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet1"::: @@ -17470,7 +17470,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -17566,7 +17566,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -18003,7 +18003,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -18107,7 +18107,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -18416,7 +18416,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -18529,7 +18529,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -19038,7 +19038,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -19047,7 +19047,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V - If the property of either `left` or `right` represents a user-defined type that overloads the exponentiation operator, the that represents that method is the implementing method. -- Otherwise, if `left`.Type and `right`.Type are both , the implementing method is . +- Otherwise, if `left`.Type and `right`.Type are both , the implementing method is . #### Node Type and Lifted versus Non-Lifted @@ -19131,7 +19131,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -19142,7 +19142,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V - Otherwise, if the property of either `left` or `right` represents a user-defined type that overloads the exponentiation operator, the that represents that method is the implementing method. -- Otherwise, if `left`.Type and `right`.Type are both , the implementing method is . +- Otherwise, if `left`.Type and `right`.Type are both , the implementing method is . #### Node Type and Lifted versus Non-Lifted @@ -19701,7 +19701,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is equal to the property of . + The property of the resulting is equal to the property of . If the method represented by `propertyAccessor` is `static` (`Shared` in Visual Basic), `expression` can be `null`. @@ -19780,7 +19780,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is equal to the property of . + The property of the resulting is equal to the property of . If the property represented by `property` is `static` (`Shared` in Visual Basic), `expression` can be `null`. @@ -19855,7 +19855,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Remarks The property of the resulting is equal to the property of the that represents the property denoted by `propertyName`. - This method searches `expression`.Type and its base types for a property that has the name `propertyName`. Public properties are given preference over non-public properties. If a matching property is found, this method passes `expression` and the that represents that property to . + This method searches `expression`.Type and its base types for a property that has the name `propertyName`. Public properties are given preference over non-public properties. If a matching property is found, this method passes `expression` and the that represents that property to . @@ -20200,9 +20200,9 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is equal to the or properties of the or , respectively, that represents the property or field denoted by `propertyOrFieldName`. + The property of the resulting is equal to the or properties of the or , respectively, that represents the property or field denoted by `propertyOrFieldName`. - This method searches `expression`.Type and its base types for an instance property or field that has the name `propertyOrFieldName`. Static properties or fields are not supported. Public properties and fields are given preference over non-public properties and fields. Also, properties are given preference over fields. If a matching property or field is found, this method passes `expression` and the or that represents that property or field to or , respectively. + This method searches `expression`.Type and its base types for an instance property or field that has the name `propertyOrFieldName`. Static properties or fields are not supported. Public properties and fields are given preference over non-public properties and fields. Also, properties are given preference over fields. If a matching property or field is found, this method passes `expression` and the or that represents that property or field to or , respectively. @@ -20268,7 +20268,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting represents the constructed type , where the type argument is the type represented by `expression`.Type. The property is `null`. Both and are `false`. + The property of the resulting represents the constructed type , where the type argument is the type represented by `expression`.Type. The property is `null`. Both and are `false`. ]]> @@ -20745,7 +20745,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V method. + The following example demonstrates how to create an expression that contains the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet43"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet43"::: @@ -20943,7 +20943,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -21039,7 +21039,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -21461,7 +21461,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -21565,7 +21565,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -22074,7 +22074,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -22170,7 +22170,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -23109,7 +23109,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V object that uses the method. + The following example demonstrates how to create a object that uses the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet47"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet47"::: @@ -23693,7 +23693,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V is the type of the expression tree node, whereas the represents the static common language runtime (CLR) type of the expression that the node represents. For example, two nodes with different node types can have the same , as shown in the following code example. + The is the type of the expression tree node, whereas the represents the static common language runtime (CLR) type of the expression that the node represents. For example, two nodes with different node types can have the same , as shown in the following code example. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet36"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet36"::: @@ -23753,12 +23753,12 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is `null`. The and properties are both `false`. + The property of the resulting is `null`. The and properties are both `false`. ## Examples - The following example demonstrates how to use the method to create a that represents the reference conversion of a non-nullable integer expression to the nullable integer type. + The following example demonstrates how to use the method to create a that represents the reference conversion of a non-nullable integer expression to the nullable integer type. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet11"::: @@ -23874,7 +23874,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create a that represents a type test of a string value against the type. + The following example demonstrates how to use the method to create a that represents a type test of a string value against the type. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet12"::: @@ -23952,7 +23952,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -24040,7 +24040,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: diff --git a/xml/System.Linq.Expressions/ExpressionVisitor.xml b/xml/System.Linq.Expressions/ExpressionVisitor.xml index 8b95c23b69d..48e9994c361 100644 --- a/xml/System.Linq.Expressions/ExpressionVisitor.xml +++ b/xml/System.Linq.Expressions/ExpressionVisitor.xml @@ -894,7 +894,7 @@ ## Remarks This can be overridden to visit or rewrite specific extension nodes. - If it is not overridden, this method will call , which gives the node a chance to walk its children. By default, will try to reduce the node. + If it is not overridden, this method will call , which gives the node a chance to walk its children. By default, will try to reduce the node. ]]> diff --git a/xml/System.Linq.Expressions/Expression`1.xml b/xml/System.Linq.Expressions/Expression`1.xml index f23d33e2dae..800d96faf08 100644 --- a/xml/System.Linq.Expressions/Expression`1.xml +++ b/xml/System.Linq.Expressions/Expression`1.xml @@ -69,7 +69,7 @@ , the compiler emits instructions to build an expression tree. + When a lambda expression is assigned to a variable, field, or parameter whose type is , the compiler emits instructions to build an expression tree. > [!NOTE] > A conversion from a lambda expression to type `Expression` (`Expression(Of D)` in Visual Basic) exists if a conversion from the lambda expression to a delegate of type `D` exists. However, the conversion may fail, for example, if the body of the lambda expression is a block. This means that delegates and expression trees behave similarly with regard to overload resolution. @@ -78,16 +78,16 @@ The ability to treat expressions as data structures enables APIs to receive user code in a format that can be inspected, transformed, and processed in a custom manner. For example, the LINQ to SQL data access implementation uses this facility to translate expression trees to Transact-SQL statements that can be evaluated by the database. - Many standard query operators defined in the class have one or more parameters of type . + Many standard query operators defined in the class have one or more parameters of type . - The of an is . + The of an is . - Use the or method to create an object. + Use the or method to create an object. ## Examples - The following code example demonstrates how to represent a lambda expression both as executable code in the form of a delegate and as data in the form of an expression tree. It also demonstrates how to turn the expression tree back into executable code by using the method. + The following code example demonstrates how to represent a lambda expression both as executable code in the form of a delegate and as data in the form of an expression tree. It also demonstrates how to turn the expression tree back into executable code by using the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/ExpressionTDelegate/Overview/ExpressionT.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/ExpressionTDelegate/Overview/ExpressionT.vb" id="Snippet1"::: @@ -191,14 +191,14 @@ method produces a delegate of type `TDelegate` at runtime. When that delegate is executed, it has the behavior described by the semantics of the . + The method produces a delegate of type `TDelegate` at runtime. When that delegate is executed, it has the behavior described by the semantics of the . - The method can be used to obtain the value of any expression tree. First, create a lambda expression that has the expression as its body by using the method. Then call to obtain a delegate, and execute the delegate to obtain the value of the expression. + The method can be used to obtain the value of any expression tree. First, create a lambda expression that has the expression as its body by using the method. Then call to obtain a delegate, and execute the delegate to obtain the value of the expression. ## Examples - The following code example demonstrates how is used to execute an expression tree. + The following code example demonstrates how is used to execute an expression tree. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/ExpressionTDelegate/Overview/ExpressionT.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/ExpressionTDelegate/Overview/ExpressionT.vb" id="Snippet2"::: diff --git a/xml/System.Linq.Expressions/GotoExpression.xml b/xml/System.Linq.Expressions/GotoExpression.xml index 0c94445eae1..97173335b71 100644 --- a/xml/System.Linq.Expressions/GotoExpression.xml +++ b/xml/System.Linq.Expressions/GotoExpression.xml @@ -58,14 +58,14 @@ Represents an unconditional jump. This includes return statements, break and continue statements, and other jumps. - object by using the method. - + object by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet45"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet45"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet45"::: + ]]> diff --git a/xml/System.Linq.Expressions/IArgumentProvider.xml b/xml/System.Linq.Expressions/IArgumentProvider.xml index 864fe72c5ea..6cbf175a1f5 100644 --- a/xml/System.Linq.Expressions/IArgumentProvider.xml +++ b/xml/System.Linq.Expressions/IArgumentProvider.xml @@ -45,22 +45,22 @@ Provides an internal interface for accessing the arguments of multiple tree nodes (DynamicExpression, ElementInit, MethodCallExpression, InvocationExpression, NewExpression, and IndexExpression). This API is for internal use only. instead of a . This saves the cost of allocating the read-only collection for each node. - -2. It enables specialized subclasses to be created that hold on to a specific number of arguments (for example, `Block2`, `Block2`, `Block4`). Therefore, these nodes avoid allocating both a and an array for storing their elements, thus saving 32 bytes per node. This technique is used by various nodes, including , , and . - -The expression tree nodes continue to expose the original LINQ properties of objects. They do this by reusing a field for storing both the array or an element that would normally be stored in the array. - -For the array case, the collection is typed to instead of . When the node is initially constructed, it is an array. The compiler or utilities in this library access the elements through this interface. Accessing array elements promotes the array to a . - -For the object case, the first argument is stored in a field typed to . When the node is initially constructed, this field holds the of the first argument. When the compiler and utilities in this library access the arguments, they again use this interface, and the accessor for the first argument uses the internal `Expression.ReturnObject(System.Object)` helper method to return the object that handles the or case. When the user accesses the , the object field is updated to hold directly onto the . - -It is important that properties consistently return the same . Otherwise, the rewriter tree walker used by expression visitors will break. It is a breaking change from LINQ v1 to return different from the same node. Currently, users can rely on object identity to tell if the node has changed. Storing the in an overloaded field both reduces memory usage and maintains compatibility for the public API. + +1. It enables the nodes to hold onto an instead of a . This saves the cost of allocating the read-only collection for each node. + +2. It enables specialized subclasses to be created that hold on to a specific number of arguments (for example, `Block2`, `Block2`, `Block4`). Therefore, these nodes avoid allocating both a and an array for storing their elements, thus saving 32 bytes per node. This technique is used by various nodes, including , , and . + +The expression tree nodes continue to expose the original LINQ properties of objects. They do this by reusing a field for storing both the array or an element that would normally be stored in the array. + +For the array case, the collection is typed to instead of . When the node is initially constructed, it is an array. The compiler or utilities in this library access the elements through this interface. Accessing array elements promotes the array to a . + +For the object case, the first argument is stored in a field typed to . When the node is initially constructed, this field holds the of the first argument. When the compiler and utilities in this library access the arguments, they again use this interface, and the accessor for the first argument uses the internal `Expression.ReturnObject(System.Object)` helper method to return the object that handles the or case. When the user accesses the , the object field is updated to hold directly onto the . + +It is important that properties consistently return the same . Otherwise, the rewriter tree walker used by expression visitors will break. It is a breaking change from LINQ v1 to return different from the same node. Currently, users can rely on object identity to tell if the node has changed. Storing the in an overloaded field both reduces memory usage and maintains compatibility for the public API. ]]> diff --git a/xml/System.Linq.Expressions/IndexExpression.xml b/xml/System.Linq.Expressions/IndexExpression.xml index 3c7b2b2b650..475fc671ba7 100644 --- a/xml/System.Linq.Expressions/IndexExpression.xml +++ b/xml/System.Linq.Expressions/IndexExpression.xml @@ -67,14 +67,14 @@ Represents indexing a property or array. - type and use it to change a value of an array element by using the method. - + type and use it to change a value of an array element by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet20"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet20"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet20"::: + ]]> diff --git a/xml/System.Linq.Expressions/InvocationExpression.xml b/xml/System.Linq.Expressions/InvocationExpression.xml index d527c2e07c4..f4293c40706 100644 --- a/xml/System.Linq.Expressions/InvocationExpression.xml +++ b/xml/System.Linq.Expressions/InvocationExpression.xml @@ -68,21 +68,21 @@ Represents an expression that applies a delegate or lambda expression to a list of argument expressions. - factory methods to create an . - - The of an is . - - - -## Examples - The following example creates an that represents invoking a lambda expression with specified arguments. - + factory methods to create an . + + The of an is . + + + +## Examples + The following example creates an that represents invoking a lambda expression with specified arguments. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet6"::: + ]]> diff --git a/xml/System.Linq.Expressions/LabelTarget.xml b/xml/System.Linq.Expressions/LabelTarget.xml index 5bfa5b181d2..b7e10583510 100644 --- a/xml/System.Linq.Expressions/LabelTarget.xml +++ b/xml/System.Linq.Expressions/LabelTarget.xml @@ -54,14 +54,14 @@ Used to represent the target of a . - object by using the method. - + object by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet43"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet43"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet43"::: + ]]> @@ -118,11 +118,11 @@ Gets the name of the label. The name of the label. - diff --git a/xml/System.Linq.Expressions/LambdaExpression.xml b/xml/System.Linq.Expressions/LambdaExpression.xml index 1bb4320fae9..d3994a47eba 100644 --- a/xml/System.Linq.Expressions/LambdaExpression.xml +++ b/xml/System.Linq.Expressions/LambdaExpression.xml @@ -66,16 +66,16 @@ type represents a lambda expression in the form of an expression tree. The type, which derives from and captures the type of the lambda expression more explicitly, can also be used to represent a lambda expression. At runtime, an expression tree node that represents a lambda expression is always of type . + The type represents a lambda expression in the form of an expression tree. The type, which derives from and captures the type of the lambda expression more explicitly, can also be used to represent a lambda expression. At runtime, an expression tree node that represents a lambda expression is always of type . The value of the property of a is . - Use the factory methods to create a object. + Use the factory methods to create a object. ## Examples - The following example demonstrates how to create an expression that represents a lambda expression that adds 1 to the passed argument by using the method. + The following example demonstrates how to create an expression that represents a lambda expression that adds 1 to the passed argument by using the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet42"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet42"::: @@ -192,7 +192,7 @@ method can be used to convert a expression tree into the delegate that it represents. + The method can be used to convert a expression tree into the delegate that it represents. ]]> diff --git a/xml/System.Linq.Expressions/ListInitExpression.xml b/xml/System.Linq.Expressions/ListInitExpression.xml index e5aa058537d..6db829e98d2 100644 --- a/xml/System.Linq.Expressions/ListInitExpression.xml +++ b/xml/System.Linq.Expressions/ListInitExpression.xml @@ -62,7 +62,7 @@ factory methods to create a . + Use the factory methods to create a . The value of the property of a is . diff --git a/xml/System.Linq.Expressions/LoopExpression.xml b/xml/System.Linq.Expressions/LoopExpression.xml index 2949742248e..6e781f561b2 100644 --- a/xml/System.Linq.Expressions/LoopExpression.xml +++ b/xml/System.Linq.Expressions/LoopExpression.xml @@ -58,14 +58,14 @@ Represents an infinite loop. It can be exited with "break". - object by using the method. - + object by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet44"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet44"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet44"::: + ]]> diff --git a/xml/System.Linq.Expressions/MemberAssignment.xml b/xml/System.Linq.Expressions/MemberAssignment.xml index f3fdf9b788e..b805ca93122 100644 --- a/xml/System.Linq.Expressions/MemberAssignment.xml +++ b/xml/System.Linq.Expressions/MemberAssignment.xml @@ -58,7 +58,7 @@ factory methods to create a . + Use the factory methods to create a . A has the property equal to . diff --git a/xml/System.Linq.Expressions/MemberExpression.xml b/xml/System.Linq.Expressions/MemberExpression.xml index fae68214a81..e9a27ff1846 100644 --- a/xml/System.Linq.Expressions/MemberExpression.xml +++ b/xml/System.Linq.Expressions/MemberExpression.xml @@ -66,7 +66,7 @@ , or factory methods to create a . + Use the , or factory methods to create a . The value of the property of a is . @@ -130,7 +130,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> diff --git a/xml/System.Linq.Expressions/MemberInitExpression.xml b/xml/System.Linq.Expressions/MemberInitExpression.xml index 363274f6a6f..be52dce92de 100644 --- a/xml/System.Linq.Expressions/MemberInitExpression.xml +++ b/xml/System.Linq.Expressions/MemberInitExpression.xml @@ -62,7 +62,7 @@ factory methods to create a . + Use the factory methods to create a . The value of the property of a is . diff --git a/xml/System.Linq.Expressions/MemberListBinding.xml b/xml/System.Linq.Expressions/MemberListBinding.xml index f0f8dbcead0..35b36bdceb4 100644 --- a/xml/System.Linq.Expressions/MemberListBinding.xml +++ b/xml/System.Linq.Expressions/MemberListBinding.xml @@ -58,7 +58,7 @@ factory methods to create a . + Use the factory methods to create a . A has the property equal to . diff --git a/xml/System.Linq.Expressions/MemberMemberBinding.xml b/xml/System.Linq.Expressions/MemberMemberBinding.xml index ec650c32432..bf25533b4c1 100644 --- a/xml/System.Linq.Expressions/MemberMemberBinding.xml +++ b/xml/System.Linq.Expressions/MemberMemberBinding.xml @@ -58,7 +58,7 @@ factory methods to create a . + Use the factory methods to create a . The value of the property of a object is . diff --git a/xml/System.Linq.Expressions/MethodCallExpression.xml b/xml/System.Linq.Expressions/MethodCallExpression.xml index 48c895ded79..1ff0340775b 100644 --- a/xml/System.Linq.Expressions/MethodCallExpression.xml +++ b/xml/System.Linq.Expressions/MethodCallExpression.xml @@ -75,7 +75,7 @@ , , or factory method to create a . + Use the , , or factory method to create a . The value of the property of a object is . @@ -139,7 +139,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> diff --git a/xml/System.Linq.Expressions/NewArrayExpression.xml b/xml/System.Linq.Expressions/NewArrayExpression.xml index 861e5cbfcaf..ded5efd7733 100644 --- a/xml/System.Linq.Expressions/NewArrayExpression.xml +++ b/xml/System.Linq.Expressions/NewArrayExpression.xml @@ -67,29 +67,29 @@ Represents creating a new array and possibly initializing the elements of the new array. - depending on the you require. - -||Factory Methods| -|----------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| -||| -||| - - - -## Examples - The following example creates a object that represents creating and initializing a one-dimensional array of strings. - + depending on the you require. + +||Factory Methods| +|----------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| +||| +||| + + + +## Examples + The following example creates a object that represents creating and initializing a one-dimensional array of strings. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet1"::: - - The next example creates a object that represents creating a two-dimensional array of strings. - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet1"::: + + The next example creates a object that represents creating a two-dimensional array of strings. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet2"::: + ]]> @@ -139,11 +139,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/NewExpression.xml b/xml/System.Linq.Expressions/NewExpression.xml index cec20d2d74d..a32e7246aa5 100644 --- a/xml/System.Linq.Expressions/NewExpression.xml +++ b/xml/System.Linq.Expressions/NewExpression.xml @@ -75,7 +75,7 @@ factory methods to create a . + Use the factory methods to create a . The value of the property of a object is . @@ -139,7 +139,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> @@ -307,7 +307,7 @@ property provides a mapping between the constructor arguments and the type members that correspond to those values. In the case of the construction of an anonymous type, this property maps the constructor arguments to the properties that are exposed by the anonymous type. This mapping information is important because the fields that are initialized by the construction of an anonymous type, or the properties that access those fields, are not discoverable through the or properties of a node. + The property provides a mapping between the constructor arguments and the type members that correspond to those values. In the case of the construction of an anonymous type, this property maps the constructor arguments to the properties that are exposed by the anonymous type. This mapping information is important because the fields that are initialized by the construction of an anonymous type, or the properties that access those fields, are not discoverable through the or properties of a node. ]]> diff --git a/xml/System.Linq.Expressions/ParameterExpression.xml b/xml/System.Linq.Expressions/ParameterExpression.xml index f3ad1b3054a..568ef97d2ce 100644 --- a/xml/System.Linq.Expressions/ParameterExpression.xml +++ b/xml/System.Linq.Expressions/ParameterExpression.xml @@ -66,14 +66,14 @@ factory method to create a . + Use the factory method to create a . The value of the property of a object is . ## Examples - The following example demonstrates how to create a object that prints the value of a object by using the method. + The following example demonstrates how to create a object that prints the value of a object by using the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet49"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet49"::: @@ -130,7 +130,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> diff --git a/xml/System.Linq.Expressions/RuntimeVariablesExpression.xml b/xml/System.Linq.Expressions/RuntimeVariablesExpression.xml index 3da9a641412..c4b72136b8b 100644 --- a/xml/System.Linq.Expressions/RuntimeVariablesExpression.xml +++ b/xml/System.Linq.Expressions/RuntimeVariablesExpression.xml @@ -58,11 +58,11 @@ An expression that provides runtime read/write permission for variables. - at run time. - + at run time. + ]]> diff --git a/xml/System.Linq.Expressions/SwitchCase.xml b/xml/System.Linq.Expressions/SwitchCase.xml index d771bc2bacb..9154800a054 100644 --- a/xml/System.Linq.Expressions/SwitchCase.xml +++ b/xml/System.Linq.Expressions/SwitchCase.xml @@ -58,14 +58,14 @@ Represents one case of a . - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet34"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet34"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet34"::: + ]]> diff --git a/xml/System.Linq.Expressions/SwitchExpression.xml b/xml/System.Linq.Expressions/SwitchExpression.xml index a1571f87dfe..15211bbd604 100644 --- a/xml/System.Linq.Expressions/SwitchExpression.xml +++ b/xml/System.Linq.Expressions/SwitchExpression.xml @@ -58,14 +58,14 @@ Represents a control expression that handles multiple selections by passing control to . - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet35"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet35"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet35"::: + ]]> diff --git a/xml/System.Linq.Expressions/TryExpression.xml b/xml/System.Linq.Expressions/TryExpression.xml index 4ea43e96742..d97451389b8 100644 --- a/xml/System.Linq.Expressions/TryExpression.xml +++ b/xml/System.Linq.Expressions/TryExpression.xml @@ -58,29 +58,29 @@ Represents a try/catch/finally/fault block. - expressions that can be either catch statements or filters. - - The fault block runs if an exception is thrown. - - The finally block runs regardless of how control exits the body. - - Only one of fault or finally blocks can be supplied. - - The return type of the try block must match the return type of any associated catch statements. - - - -## Examples - The following example demonstrates how to create a object that contains a catch statement by using the method. - + expressions that can be either catch statements or filters. + + The fault block runs if an exception is thrown. + + The finally block runs regardless of how control exits the body. + + Only one of fault or finally blocks can be supplied. + + The return type of the try block must match the return type of any associated catch statements. + + + +## Examples + The following example demonstrates how to create a object that contains a catch statement by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet47"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet47"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet47"::: + ]]> diff --git a/xml/System.Linq.Expressions/TypeBinaryExpression.xml b/xml/System.Linq.Expressions/TypeBinaryExpression.xml index f277cf739ae..0bb4a36b9f5 100644 --- a/xml/System.Linq.Expressions/TypeBinaryExpression.xml +++ b/xml/System.Linq.Expressions/TypeBinaryExpression.xml @@ -64,7 +64,7 @@ ## Remarks A type test is an example of an operation between an expression and a type. - Use the factory method to create a . + Use the factory method to create a . The value of the property of a object is . diff --git a/xml/System.Linq.Expressions/UnaryExpression.xml b/xml/System.Linq.Expressions/UnaryExpression.xml index cacc9b1997f..eaa38422001 100644 --- a/xml/System.Linq.Expressions/UnaryExpression.xml +++ b/xml/System.Linq.Expressions/UnaryExpression.xml @@ -64,19 +64,19 @@ ## Remarks The following table summarizes the factory methods that can be used to create a that has a specific node type. -||Factory Method| +||Factory Method| |----------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------| -||| -||| -||| -||| -||| -||| -||| -||| -||| +||| +||| +||| +||| +||| +||| +||| +||| +||| - In addition, the methods can also be used to create a . These factory methods can be used to create a of any node type that represents a unary operation. The parameter of these methods that is of type specifies the desired node type. + In addition, the methods can also be used to create a . These factory methods can be used to create a of any node type that represents a unary operation. The parameter of these methods that is of type specifies the desired node type. @@ -279,7 +279,7 @@ is `true`, the operator returns a nullable type and if the nullable operand evaluates to `null`, the operator returns `null`. + An operator call is *lifted* if the operator expects a non-nullable operand but a nullable operand is passed to it. If the value of is `true`, the operator returns a nullable type and if the nullable operand evaluates to `null`, the operator returns `null`. ]]> diff --git a/xml/System.Linq/Enumerable.xml b/xml/System.Linq/Enumerable.xml index 1e3bb2f8ea9..724effb2ced 100644 --- a/xml/System.Linq/Enumerable.xml +++ b/xml/System.Linq/Enumerable.xml @@ -57,9 +57,9 @@ . The standard query operators are general purpose methods that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data in any .NET-based programming language. + The methods in this class provide an implementation of the standard query operators for querying data sources that implement . The standard query operators are general purpose methods that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data in any .NET-based programming language. - The majority of the methods in this class are defined as extension methods that extend . This means they can be called like an instance method on any object that implements . + The majority of the methods in this class are defined as extension methods that extend . This means they can be called like an instance method on any object that implements . Methods that are used in a query that returns a sequence of values do not consume the target data until the query object is enumerated. This is known as deferred execution. Methods that are used in a query that returns a singleton value execute and consume the target data immediately. @@ -132,14 +132,14 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source` except the first one. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The first element of `source` is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + The method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source` except the first one. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The first element of `source` is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. - This overload of the method isn't suitable for all cases because it uses the first element of `source` as the initial aggregate value. You should choose another overload if the return value should include only the elements of `source` that meet a certain condition. For example, this overload isn't reliable if you want to calculate the sum of the even numbers in `source`. The result will be incorrect if the first element is odd instead of even. + This overload of the method isn't suitable for all cases because it uses the first element of `source` as the initial aggregate value. You should choose another overload if the return value should include only the elements of `source` that meet a certain condition. For example, this overload isn't reliable if you want to calculate the sum of the even numbers in `source`. The result will be incorrect if the first element is odd instead of even. - To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to reverse the order of words in a string by using . + The following code example demonstrates how to reverse the order of words in a string by using . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet1"::: @@ -224,12 +224,12 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source`. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + The method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source`. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. - To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to apply an accumulator function and use a seed value. + The following code example demonstrates how to use to apply an accumulator function and use a seed value. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet2"::: @@ -323,12 +323,12 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source`. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. The final result of `func` is passed to `resultSelector` to obtain the final result of . + The method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source`. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. The final result of `func` is passed to `resultSelector` to obtain the final result of . - To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to apply an accumulator function and a result selector. + The following code example demonstrates how to use to apply an accumulator function and a result selector. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet3"::: @@ -561,15 +561,15 @@ The enumeration of `source` is stopped as soon as the result can be determined. - In Visual Basic query expression syntax, an `Aggregate Into All()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into All()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine whether all the elements in a sequence satisfy a condition. Variable `allStartWithB` is true if all the pet names start with "B" or if the `pets` array is empty. + The following code example demonstrates how to use to determine whether all the elements in a sequence satisfy a condition. Variable `allStartWithB` is true if all the pet names start with "B" or if the `pets` array is empty. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet4"::: - The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `All` method. + The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `All` method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet129"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet129"::: @@ -658,15 +658,15 @@ The enumeration of `source` is stopped as soon as the result can be determined. - In Visual Basic query expression syntax, an `Aggregate Into Any()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Any()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine whether a sequence contains any elements. + The following code example demonstrates how to use to determine whether a sequence contains any elements. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet5"::: - The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `Any` method. + The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `Any` method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet130"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet130"::: @@ -747,10 +747,10 @@ The enumeration of `source` is stopped as soon as the result can be determined. - In Visual Basic query expression syntax, an `Aggregate Into Any()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Any()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine whether any element in a sequence satisfies a condition. + The following code example demonstrates how to use to determine whether any element in a sequence satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet6"::: @@ -832,7 +832,7 @@ > This method does not modify the elements of the collection. Instead, it creates a copy of the collection with the new element. ## Examples - The following code example demonstrates how to use to append a value to the end of the sequence. + The following code example demonstrates how to use to append a value to the end of the sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet201"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet201"::: @@ -902,12 +902,12 @@ method has no effect other than to change the compile-time type of `source` from a type that implements to itself. + The method has no effect other than to change the compile-time type of `source` from a type that implements to itself. - can be used to choose between query implementations when a sequence implements but also has a different set of public query methods available. For example, given a generic class `Table` that implements and has its own methods such as `Where`, `Select`, and `SelectMany`, a call to `Where` would invoke the public `Where` method of `Table`. A `Table` type that represents a database table could have a `Where` method that takes the predicate argument as an expression tree and converts the tree to SQL for remote execution. If remote execution is not desired, for example because the predicate invokes a local method, the method can be used to hide the custom methods and instead make the standard query operators available. + can be used to choose between query implementations when a sequence implements but also has a different set of public query methods available. For example, given a generic class `Table` that implements and has its own methods such as `Where`, `Select`, and `SelectMany`, a call to `Where` would invoke the public `Where` method of `Table`. A `Table` type that represents a database table could have a `Where` method that takes the predicate argument as an expression tree and converts the tree to SQL for remote execution. If remote execution is not desired, for example because the predicate invokes a local method, the method can be used to hide the custom methods and instead make the standard query operators available. ## Examples - The following code example demonstrates how to use to hide a type's custom `Where` method when the standard query operator implementation is desired. + The following code example demonstrates how to use to hide a type's custom `Where` method when the standard query operator implementation is desired. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet108"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet108"::: @@ -975,7 +975,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1036,7 +1036,7 @@ ## Remarks If the sum of the elements is too large to represent as a , this method returns positive or negative infinity. - In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1094,10 +1094,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet8"::: @@ -1159,7 +1159,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1218,7 +1218,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1278,7 +1278,7 @@ ## Remarks If the sum of the elements is too large to represent as a , this method returns positive or negative infinity. - In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1335,7 +1335,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1393,10 +1393,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet12"::: @@ -1457,7 +1457,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1514,7 +1514,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1586,10 +1586,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1667,10 +1667,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1747,10 +1747,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet18"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet18"::: @@ -1826,10 +1826,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet16"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet16"::: @@ -1905,10 +1905,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1984,10 +1984,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2062,10 +2062,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2141,10 +2141,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2217,10 +2217,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2295,10 +2295,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2375,15 +2375,15 @@ ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method enables the standard query operators to be invoked on non-generic collections by supplying the necessary type information. For example, does not implement , but by calling on the object, the standard query operators can then be used to query the sequence. + The method enables the standard query operators to be invoked on non-generic collections by supplying the necessary type information. For example, does not implement , but by calling on the object, the standard query operators can then be used to query the sequence. If an element cannot be converted to type `TResult`, this method throws a . The source sequence for this method is , which means the elements have the compile-time static type of `object`. The only type conversions that are performed by this method are reference conversions and unboxing conversions. The runtime type of the elements in the collection must match the target type, or in the case of value types, the runtime type of elements must be the result of a boxing conversion of the target type. Other conversion types, such as those between different numeric types, are not allowed. - To obtain only those elements that can be converted to type `TResult`, use the method instead of . + To obtain only those elements that can be converted to type `TResult`, use the method instead of . - In a query expression, an explicitly typed iteration variable translates to an invocation of . This example shows the syntax for an explicitly typed range variable. + In a query expression, an explicitly typed iteration variable translates to an invocation of . This example shows the syntax for an explicitly typed range variable. ```csharp from int i in objects @@ -2408,7 +2408,7 @@ Dim doubles = From item As Integer In sequence ``` ## Examples - The following code example demonstrates how to use to enable the use of the standard query operators on an . + The following code example demonstrates how to use to enable the use of the standard query operators on an . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet19"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet19"::: @@ -2547,15 +2547,15 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method differs from the method because the method returns all the original elements in the input sequences. The method returns only unique elements. + The method differs from the method because the method returns all the original elements in the input sequences. The method returns only unique elements. ## Examples - The following code example demonstrates how to use to concatenate two sequences. + The following code example demonstrates how to use to concatenate two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet20"::: - An alternative way of concatenating two sequences is to construct a collection, for example an array, of sequences and then apply the method, passing it the identity selector function. The following example demonstrates this use of . + An alternative way of concatenating two sequences is to construct a collection, for example an array, of sequences and then apply the method, passing it the identity selector function. The following example demonstrates this use of . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet112"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet112"::: @@ -2639,14 +2639,14 @@ Each chunk except the last one will be of size `size`. The last chunk will conta , the `Contains` method in that implementation is invoked to obtain the result. Otherwise, this method determines whether `source` contains the specified element. + If the type of `source` implements , the `Contains` method in that implementation is invoked to obtain the result. Otherwise, this method determines whether `source` contains the specified element. Enumeration is terminated as soon as a matching element is found. - Elements are compared to the specified value by using the default equality comparer, . + Elements are compared to the specified value by using the default equality comparer, . ## Examples - The following code example demonstrates how to use to determine whether an array contains a specific element. + The following code example demonstrates how to use to determine whether an array contains a specific element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet21"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet21"::: @@ -2731,15 +2731,15 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks Enumeration is terminated as soon as a matching element is found. - If `comparer` is `null`, the default equality comparer, , is used to compare elements to the specified value. + If `comparer` is `null`, the default equality comparer, , is used to compare elements to the specified value. ## Examples - The following example shows how to implement an equality comparer that can be used in the method. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use a sequence of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use a sequence of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Contains"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet6"::: @@ -2820,14 +2820,14 @@ Each chunk except the last one will be of size `size`. The last chunk will conta , that implementation is used to obtain the count of elements. Otherwise, this method determines the count. + If the type of `source` implements , that implementation is used to obtain the count of elements. Otherwise, this method determines the count. - Use the method when you expect and want to allow the result to be greater than . + Use the method when you expect and want to allow the result to be greater than . - In Visual Basic query expression syntax, an `Aggregate Into Count()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Count()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to count the elements in an array. + The following code example demonstrates how to use to count the elements in an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet22"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet22"::: @@ -2901,14 +2901,14 @@ Each chunk except the last one will be of size `size`. The last chunk will conta , that implementation is used to obtain the count of elements. Otherwise, this method determines the count. + If the type of `source` implements , that implementation is used to obtain the count of elements. Otherwise, this method determines the count. - You should use the method when you expect and want to allow the result to be greater than . + You should use the method when you expect and want to allow the result to be greater than . - In Visual Basic query expression syntax, an `Aggregate Into Count()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Count()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to count the elements in an array that satisfy a condition. + The following code example demonstrates how to use to count the elements in an array that satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet23"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet23"::: @@ -3058,10 +3058,10 @@ Each chunk except the last one will be of size `size`. The last chunk will conta The default value for reference and nullable types is `null`. - This method can be used to produce a left outer join when it is combined with the method. + This method can be used to produce a left outer join when it is combined with the method. ## Examples - The following code examples demonstrate how to use to provide a default value in case the source sequence is empty. + The following code examples demonstrate how to use to provide a default value in case the source sequence is empty. This example uses a non-empty sequence. @@ -3144,10 +3144,10 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - This method can be used to produce a left outer join when it is combined with the method. + This method can be used to produce a left outer join when it is combined with the method. ## Examples - The following code example demonstrates how to use the method and specify a default value. The first sequence is not empty and the second sequence is empty. + The following code example demonstrates how to use the method and specify a default value. The first sequence is not empty and the second sequence is empty. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet26"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet26"::: @@ -3238,26 +3238,26 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method returns an unordered sequence that contains no duplicate values. It uses the default equality comparer, , to compare values. + The method returns an unordered sequence that contains no duplicate values. It uses the default equality comparer, , to compare values. - In Visual Basic query expression syntax, a `Distinct` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Distinct` clause translates to an invocation of . - The default equality comparer, , is used to compare values of the types that implement the generic interface. To compare a custom data type, you need to implement this interface and provide your own and methods for the type. + The default equality comparer, , is used to compare values of the types that implement the generic interface. To compare a custom data type, you need to implement this interface and provide your own and methods for the type. - For an example that uses to define a custom comparer, see . + For an example that uses to define a custom comparer, see . ## Examples - The following code example demonstrates how to use to return distinct elements from a sequence of integers. + The following code example demonstrates how to use to return distinct elements from a sequence of integers. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet27"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet27"::: - If you want to return distinct elements from sequences of objects of some custom data type, you have to implement the generic interface in the class. The following code example shows how to implement this interface in a custom data type and provide and methods. + If you want to return distinct elements from sequences of objects of some custom data type, you have to implement the generic interface in the class. The following code example shows how to implement this interface in a custom data type and provide and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet1"::: - After you implement this interface, you can use a sequence of `Product` objects in the method, as shown in the following example: + After you implement this interface, you can use a sequence of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Distinct"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet5"::: @@ -3341,15 +3341,15 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method returns an unordered sequence that contains no duplicate values. If `comparer` is `null`, the default equality comparer, , is used to compare values. + The method returns an unordered sequence that contains no duplicate values. If `comparer` is `null`, the default equality comparer, , is used to compare values. ## Examples - The following example shows how to implement an equality comparer that can be used in the method. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use a sequence of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use a sequence of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Distinct"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet5"::: @@ -3564,7 +3564,7 @@ The , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. -This method throws an exception if `index` is out of range. To instead return a default value when the specified index is out of range, use the method. +This method throws an exception if `index` is out of range. To instead return a default value when the specified index is out of range, use the method. ]]> @@ -3635,12 +3635,12 @@ This method throws an exception if `index` is out of range. To instead return a , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. + If the type of `source` implements , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. - This method throws an exception if `index` is out of range. To instead return a default value when the specified index is out of range, use the method. + This method throws an exception if `index` is out of range. To instead return a default value when the specified index is out of range, use the method. ## Examples - The following code example demonstrates how to use to return an element at a specific position. + The following code example demonstrates how to use to return an element at a specific position. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet28"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet28"::: @@ -3778,12 +3778,12 @@ The default value for reference and nullable types is `null`. , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. + If the type of `source` implements , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. The default value for reference and nullable types is `null`. ## Examples - The following code example demonstrates how to use . This example uses an index that is outside the bounds of the array. + The following code example demonstrates how to use . This example uses an index that is outside the bounds of the array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet29"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet29"::: @@ -3850,17 +3850,17 @@ The default value for reference and nullable types is `null`. method caches an empty sequence of type `TResult`. When the object it returns is enumerated, it yields no elements. + The method caches an empty sequence of type `TResult`. When the object it returns is enumerated, it yields no elements. - In some cases, this method is useful for passing an empty sequence to a user-defined method that takes an . It can also be used to generate a neutral element for methods such as . See the Example section for an example of this use of . + In some cases, this method is useful for passing an empty sequence to a user-defined method that takes an . It can also be used to generate a neutral element for methods such as . See the Example section for an example of this use of . ## Examples - The following code example demonstrates how to use to generate an empty . + The following code example demonstrates how to use to generate an empty . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet30"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet30"::: - The following code example demonstrates a possible application of the method. The method is applied to a collection of string arrays. The elements of each array in the collection are added to the resulting only if that array contains four or more elements. is used to generate the seed value for because if no array in the collection has four or more elements, only the empty sequence is returned. + The following code example demonstrates a possible application of the method. The method is applied to a collection of string arrays. The elements of each array in the collection are added to the resulting only if that array contains four or more elements. is used to generate the seed value for because if no array in the collection has four or more elements, only the empty sequence is returned. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet31"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet31"::: @@ -3954,8 +3954,8 @@ Only unique elements are returned. ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The default equality comparer, , is used to compare values of the types. - To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. + The default equality comparer, , is used to compare values of the types. + To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. ## Examples The following code example demonstrates how to use the `Except(IEnumerable, IEnumerable)` method to compare two sequences of numbers and return elements that appear only in the first sequence. @@ -3963,7 +3963,7 @@ Only unique elements are returned. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet34"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet34"::: - If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override the and methods. + If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override the and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet9"::: @@ -4049,16 +4049,16 @@ Only unique elements are returned. , is used to compare values. + If `comparer` is `null`, the default equality comparer, , is used to compare values. ## Examples - If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and provide and methods. - The following example shows how to implement an equality comparer that can be used in the method. + If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and provide and methods. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Except"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet7"::: @@ -4271,10 +4271,10 @@ Only unique elements are returned. method throws an exception if `source` contains no elements. To instead return a default value when the source sequence is empty, use the method. + The method throws an exception if `source` contains no elements. To instead return a default value when the source sequence is empty, use the method. ## Examples - The following code example demonstrates how to use to return the first element of an array. + The following code example demonstrates how to use to return the first element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet35"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet35"::: @@ -4347,10 +4347,10 @@ Only unique elements are returned. method throws an exception if no matching element is found in `source`. To instead return a default value when no matching element is found, use the method. + The method throws an exception if no matching element is found in `source`. To instead return a default value when no matching element is found, use the method. ## Examples - The following code example demonstrates how to use to return the first element of an array that satisfies a condition. + The following code example demonstrates how to use to return the first element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet36"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet36"::: @@ -4440,15 +4440,15 @@ Only unique elements are returned. ## Remarks The default value for reference and nullable types is `null`. - The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use on an empty array. + The following code example demonstrates how to use on an empty array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet37"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet37"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the first element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric months is empty. Because the default value for an integer is 0, which does not correspond to any month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the first element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric months is empty. Because the default value for an integer is 0, which does not correspond to any month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet126"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet126"::: @@ -4525,7 +4525,7 @@ Only unique elements are returned. The default value for reference and nullable types is `null`. ## Examples - The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the array that satisfies the condition. + The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the array that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet38"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet38"::: @@ -4728,17 +4728,17 @@ Only unique elements are returned. > [!NOTE] > For examples of `GroupBy`, see the following articles: > -> - -> - -> - +> - +> - +> - - The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. + The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. - The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order they appear in `source`. + The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order they appear in `source`. - The default equality comparer is used to compare keys. + The default equality comparer is used to compare keys. - In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). ]]> @@ -4833,19 +4833,19 @@ Only unique elements are returned. > [!NOTE] > For examples of `GroupBy`, see the following articles: > -> - -> - -> - +> - +> - +> - - The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. + The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. - The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order they appear in `source`. + The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order they appear in `source`. - If `comparer` is `null`, the default equality comparer is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. If two keys are considered equal according to `comparer`, the first key is chosen as the key for that grouping. - In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). ]]> @@ -4938,25 +4938,25 @@ Only unique elements are returned. ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. + The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. - The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order that the elements that produced them appear in `source`. + The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order that the elements that produced them appear in `source`. - The default equality comparer is used to compare keys. + The default equality comparer is used to compare keys. ## Examples - The following code example demonstrates how to use to group the elements of a sequence. + The following code example demonstrates how to use to group the elements of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet39"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet39"::: - In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . The translation of the query expression in the following example is equivalent to the query in the example above. + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . The translation of the query expression in the following example is equivalent to the query in the example above. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet122"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet122"::: > [!NOTE] -> In a C# or Visual Basic query expression, the element and key selection expressions occur in the reverse order from their argument positions in a call to the method. +> In a C# or Visual Basic query expression, the element and key selection expressions occur in the reverse order from their argument positions in a call to the method. ]]> @@ -5062,19 +5062,19 @@ Only unique elements are returned. > [!NOTE] > For examples of `GroupBy`, see the following articles: > -> - -> - -> - +> - +> - +> - - The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. + The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. - The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order that the elements that produced them appear in `source`. + The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order that the elements that produced them appear in `source`. - If `comparer` is `null`, the default equality comparer is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. If two keys are considered equal according to `comparer`, the first key is chosen as the key for that grouping. - In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). ]]> @@ -5165,10 +5165,10 @@ Only unique elements are returned. . + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. + The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet15"::: @@ -5367,10 +5367,10 @@ Only unique elements are returned. . + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to group the projected elements of a sequence and then project a sequence of results of type `TResult`. + The following code example demonstrates how to use to group the projected elements of a sequence and then project a sequence of results of type `TResult`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet125"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet125"::: @@ -5595,23 +5595,23 @@ Only unique elements are returned. ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The default equality comparer, , is used to hash and compare keys. + The default equality comparer, , is used to hash and compare keys. - produces hierarchical results, which means that elements from `outer` are paired with collections of matching elements from `inner`. `GroupJoin` enables you to base your results on a whole set of matches for each element of `outer`. + produces hierarchical results, which means that elements from `outer` are paired with collections of matching elements from `inner`. `GroupJoin` enables you to base your results on a whole set of matches for each element of `outer`. > [!NOTE] > If there are no correlated elements in `inner` for a given element of `outer`, the sequence of matches for that element will be empty but will still appear in the results. - The `resultSelector` function is called only one time for each `outer` element together with a collection of all the `inner` elements that match the `outer` element. This differs from the method, in which the result selector function is invoked on pairs that contain one element from `outer` and one element from `inner`. + The `resultSelector` function is called only one time for each `outer` element together with a collection of all the `inner` elements that match the `outer` element. This differs from the method, in which the result selector function is invoked on pairs that contain one element from `outer` and one element from `inner`. `GroupJoin` preserves the order of the elements of `outer`, and for each element of `outer`, the order of the matching elements from `inner`. - has no direct equivalent in traditional relational database terms. However, this method does implement a superset of inner joins and left outer joins. Both of these operations can be written in terms of a grouped join. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). + has no direct equivalent in traditional relational database terms. However, this method does implement a superset of inner joins and left outer joins. Both of these operations can be written in terms of a grouped join. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). - In query expression syntax, a `join ... into` (C#) or `Group Join` (Visual Basic) clause translates to an invocation of . + In query expression syntax, a `join ... into` (C#) or `Group Join` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to perform a grouped join on two sequences. + The following code example demonstrates how to use to perform a grouped join on two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet40"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet40"::: @@ -5732,18 +5732,18 @@ Only unique elements are returned. ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. + If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. - produces hierarchical results, which means that elements from `outer` are paired with collections of matching elements from `inner`. `GroupJoin` enables you to base your results on a whole set of matches for each element of `outer`. + produces hierarchical results, which means that elements from `outer` are paired with collections of matching elements from `inner`. `GroupJoin` enables you to base your results on a whole set of matches for each element of `outer`. > [!NOTE] > If there are no correlated elements in `inner` for a given element of `outer`, the sequence of matches for that element will be empty but will still appear in the results. - The `resultSelector` function is called only one time for each `outer` element together with a collection of all the `inner` elements that match the `outer` element. This differs from the method in which the result selector function is invoked on pairs that contain one element from `outer` and one element from `inner`. + The `resultSelector` function is called only one time for each `outer` element together with a collection of all the `inner` elements that match the `outer` element. This differs from the method in which the result selector function is invoked on pairs that contain one element from `outer` and one element from `inner`. `GroupJoin` preserves the order of the elements of `outer`, and for each element of `outer`, the order of the matching elements from `inner`. - has no direct equivalent in traditional relational database terms. However, this method does implement a superset of inner joins and left outer joins. Both of these operations can be written in terms of a grouped join. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). + has no direct equivalent in traditional relational database terms. However, this method does implement a superset of inner joins and left outer joins. Both of these operations can be written in terms of a grouped join. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). ]]> @@ -5937,8 +5937,8 @@ Only unique elements are returned. When the object returned by this method is enumerated, `Intersect` yields distinct elements occurring in both sequences in the order in which they appear in `first`. - The default equality comparer, , is used to compare values of the types. - To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. + The default equality comparer, , is used to compare values of the types. + To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. ## Examples The following code example demonstrates how to use `Intersect(IEnumerable, IEnumerable)` to return the elements that appear in each of two sequences of integers. @@ -5946,7 +5946,7 @@ Only unique elements are returned. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet41"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet41"::: - If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override and methods. + If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet9"::: @@ -6042,7 +6042,7 @@ Only unique elements are returned. When the object returned by this method is enumerated, `Intersect` yields distinct elements occurring in both sequences in the order in which they appear in `first`. - If `comparer` is `null`, the default equality comparer, , is used to compare values. + If `comparer` is `null`, the default equality comparer, , is used to compare values. ## Examples The following example shows how to implement an equality comparer that can be used in the `Intersect` method. @@ -6333,18 +6333,18 @@ If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. + The default equality comparer, , is used to hash and compare keys. - A join refers to the operation of correlating the elements of two sources of information based on a common key. brings the two information sources and the keys by which they are matched together in one method call. This differs from the use of `SelectMany`, which requires more than one method call to perform the same operation. + A join refers to the operation of correlating the elements of two sources of information based on a common key. brings the two information sources and the keys by which they are matched together in one method call. This differs from the use of `SelectMany`, which requires more than one method call to perform the same operation. - preserves the order of the elements of `outer`, and for each of these elements, the order of the matching elements of `inner`. + preserves the order of the elements of `outer`, and for each of these elements, the order of the matching elements of `inner`. - In query expression syntax, a `join` (C#) or `Join` (Visual Basic) clause translates to an invocation of . + In query expression syntax, a `join` (C#) or `Join` (Visual Basic) clause translates to an invocation of . - In relational database terms, the method implements an inner equijoin. 'Inner' means that only elements that have a match in the other sequence are included in the results. An 'equijoin' is a join in which the keys are compared for equality. A left outer join operation has no dedicated standard query operator, but can be performed by using the method. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). + In relational database terms, the method implements an inner equijoin. 'Inner' means that only elements that have a match in the other sequence are included in the results. An 'equijoin' is a join in which the keys are compared for equality. A left outer join operation has no dedicated standard query operator, but can be performed by using the method. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). ## Examples - The following code example demonstrates how to use to perform an inner join of two sequences based on a common key. + The following code example demonstrates how to use to perform an inner join of two sequences based on a common key. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet42"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet42"::: @@ -6465,13 +6465,13 @@ If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. + If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. - A join refers to the operation of correlating the elements of two sources of information based on a common key. brings the two information sources and the keys by which they are matched together in one method call. This differs from the use of `SelectMany`, which requires more than one method call to perform the same operation. + A join refers to the operation of correlating the elements of two sources of information based on a common key. brings the two information sources and the keys by which they are matched together in one method call. This differs from the use of `SelectMany`, which requires more than one method call to perform the same operation. - preserves the order of the elements of `outer`, and for each of these elements, the order of the matching elements of `inner`. + preserves the order of the elements of `outer`, and for each of these elements, the order of the matching elements of `inner`. - In relational database terms, the method implements an inner equijoin. 'Inner' means that only elements that have a match in the other sequence are included in the results. An 'equijoin' is a join in which the keys are compared for equality. A left outer join operation has no dedicated standard query operator, but can be performed by using the method. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). + In relational database terms, the method implements an inner equijoin. 'Inner' means that only elements that have a match in the other sequence are included in the results. An 'equijoin' is a join in which the keys are compared for equality. A left outer join operation has no dedicated standard query operator, but can be performed by using the method. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). ]]> @@ -6551,10 +6551,10 @@ If `comparer` is `null`, the default equality comparer, method throws an exception if `source` contains no elements. To instead return a default value when the source sequence is empty, use the method. + The method throws an exception if `source` contains no elements. To instead return a default value when the source sequence is empty, use the method. ## Examples - The following code example demonstrates how to use to return the last element of an array. + The following code example demonstrates how to use to return the last element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet43"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet43"::: @@ -6627,10 +6627,10 @@ If `comparer` is `null`, the default equality comparer, method throws an exception if no matching element is found in `source`. To instead return a default value when no matching element is found, use the method. + The method throws an exception if no matching element is found in `source`. To instead return a default value when no matching element is found, use the method. ## Examples - The following code example demonstrates how to use to return the last element of an array that satisfies a condition. + The following code example demonstrates how to use to return the last element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet44"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet44"::: @@ -6720,15 +6720,15 @@ If `comparer` is `null`, the default equality comparer, method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use on an empty array. + The following code example demonstrates how to use on an empty array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet45"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet45"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the last element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric days of the month is empty. Because the default value for an integer is 0, which does not correspond to any day of the month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the last element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric days of the month is empty. Because the default value for an integer is 0, which does not correspond to any day of the month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet127"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet127"::: @@ -6805,7 +6805,7 @@ If `comparer` is `null`, the default equality comparer, by passing in a predicate. In the second call to the method, there is no element in the sequence that satisfies the condition. + The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the sequence that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet46"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet46"::: @@ -7197,12 +7197,12 @@ If `comparer` is `null`, the default equality comparer, when you expect the result to be greater than . + Use this method rather than when you expect the result to be greater than . - In Visual Basic query expression syntax, an `Aggregate Into LongCount()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into LongCount()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to count the elements in an array. + The following code example demonstrates how to use to count the elements in an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet47"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet47"::: @@ -7276,12 +7276,12 @@ If `comparer` is `null`, the default equality comparer, when you expect the result to be greater than . + Use this method rather than when you expect the result to be greater than . - In Visual Basic query expression syntax, an `Aggregate Into LongCount()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into LongCount()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to count the elements in an array that satisfy a condition. + The following code example demonstrates how to use to count the elements in an array that satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet48"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet48"::: @@ -7353,9 +7353,9 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7414,9 +7414,9 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7475,9 +7475,9 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7536,12 +7536,12 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence. + The following code example demonstrates how to use to determine the maximum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet52"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet52"::: @@ -7603,11 +7603,11 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7664,14 +7664,14 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence. + The following code example demonstrates how to use to determine the maximum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet54"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet54"::: @@ -7731,11 +7731,11 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7792,11 +7792,11 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7853,11 +7853,11 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7914,9 +7914,9 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7987,14 +7987,14 @@ If `comparer` is `null`, the default equality comparer, , the method uses that implementation to compare values. Otherwise, if type `TSource` implements , that implementation is used to compare values. + If type `TSource` implements , the method uses that implementation to compare values. Otherwise, if type `TSource` implements , that implementation is used to compare values. If `TSource` is a reference type and the source sequence is empty or contains only values that are `null`, this method returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of objects. + The following code example demonstrates how to use to determine the maximum value in a sequence of objects. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet57"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet57"::: @@ -8069,7 +8069,7 @@ If type `TSource` implements , the . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -8139,14 +8139,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8223,14 +8223,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8307,14 +8307,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet58"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet58"::: @@ -8389,14 +8389,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8473,14 +8473,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Decimal)` in Visual Basic. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8555,14 +8555,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Double)` in Visual Basic. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8637,14 +8637,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int32)` in Visual Basic. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8720,15 +8720,15 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int64)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. +The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8804,15 +8804,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Single)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. +The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8888,15 +8888,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. +The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8984,13 +8984,13 @@ The following code example demonstrates how to use , this method uses that implementation to compare values. Otherwise, if type `TResult` implements , that implementation is used to compare values. +If type `TResult` implements , this method uses that implementation to compare values. Otherwise, if type `TResult` implements , that implementation is used to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. +The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -9206,9 +9206,9 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9268,13 +9268,13 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence. +The following code example demonstrates how to use to determine the minimum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet60"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet60"::: @@ -9337,9 +9337,9 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9399,9 +9399,9 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9461,11 +9461,11 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9523,11 +9523,11 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9585,15 +9585,15 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence. +The following code example demonstrates how to use to determine the minimum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet63"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet63"::: @@ -9654,11 +9654,11 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9716,11 +9716,11 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9778,9 +9778,9 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9852,15 +9852,15 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -If type `TSource` implements , this method uses that implementation to compare values. Otherwise, if type `TSource` implements , that implementation is used to compare values. +If type `TSource` implements , this method uses that implementation to compare values. Otherwise, if type `TSource` implements , that implementation is used to compare values. If `TSource` is a reference type and the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of objects. +The following code example demonstrates how to use to determine the minimum value in a sequence of objects. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet67"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet67"::: @@ -9935,7 +9935,7 @@ If type `TSource` implements , the . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -10006,15 +10006,15 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10092,15 +10092,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10178,15 +10178,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet68"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet68"::: @@ -10262,15 +10262,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10348,15 +10348,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Decimal)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10432,15 +10432,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Double)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10516,15 +10516,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of source into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int32)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10600,15 +10600,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int64)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10684,15 +10684,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Single)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10768,15 +10768,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10864,13 +10864,13 @@ The following code example demonstrates how to use , this method uses that implementation to compare values. Otherwise, if type `TResult` implements , that implementation is used to compare values. +If type `TResult` implements , this method uses that implementation to compare values. Otherwise, if type `TResult` implements , that implementation is used to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -11087,14 +11087,14 @@ The following code example demonstrates how to use method returns only those elements in `source` that are non-null and compatible with type `TResult`. To receive an exception if an element cannot be cast to type `TResult`, use . + The method returns only those elements in `source` that are non-null and compatible with type `TResult`. To receive an exception if an element cannot be cast to type `TResult`, use . - This method is one of the few standard query operator methods that can be applied to a collection that has a non-parameterized type, such as an . This is because extends the type . cannot only be applied to collections that are based on the parameterized type, but collections that are based on the non-parameterized type also. + This method is one of the few standard query operator methods that can be applied to a collection that has a non-parameterized type, such as an . This is because extends the type . cannot only be applied to collections that are based on the parameterized type, but collections that are based on the non-parameterized type also. - By applying to a collection that implements , you gain the ability to query the collection by using the standard query operators. For example, specifying a type argument of to would return an object of type `IEnumerable` in C# or `IEnumerable(Of Object)` in Visual Basic, to which the standard query operators can be applied. + By applying to a collection that implements , you gain the ability to query the collection by using the standard query operators. For example, specifying a type argument of to would return an object of type `IEnumerable` in C# or `IEnumerable(Of Object)` in Visual Basic, to which the standard query operators can be applied. ## Examples - The following code example demonstrates how to use to filter the elements of an . + The following code example demonstrates how to use to filter the elements of an . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet69"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet69"::: @@ -11322,19 +11322,19 @@ If comparer is `null`, the default comparer x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - For an example of this method, see . + For an example of this method, see . - Two methods are defined to extend the type , which is the return type of this method. These two methods, namely `ThenBy` and `ThenByDescending`, enable you to specify additional sort criteria to sort a sequence. `ThenBy` and `ThenByDescending` also return an , which means any number of consecutive calls to `ThenBy` or `ThenByDescending` can be made. + Two methods are defined to extend the type , which is the return type of this method. These two methods, namely `ThenBy` and `ThenByDescending`, enable you to specify additional sort criteria to sort a sequence. `ThenBy` and `ThenByDescending` also return an , which means any number of consecutive calls to `ThenBy` or `ThenByDescending` can be made. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - This method compares keys by using the default comparer . + This method compares keys by using the default comparer . This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. - In query expression syntax, an `orderby descending` (C#) or `Order By Descending` (Visual Basic) clause translates to an invocation of . + In query expression syntax, an `orderby descending` (C#) or `Order By Descending` (Visual Basic) clause translates to an invocation of . ]]> @@ -11642,17 +11642,17 @@ If comparer is `null`, the default comparer (IEnumerable, IEnumerable)` method enumerates the two source sequences in parallel and compares corresponding elements by using the default equality comparer for `TSource`, . + The `SequenceEqual(IEnumerable, IEnumerable)` method enumerates the two source sequences in parallel and compares corresponding elements by using the default equality comparer for `TSource`, . - The default equality comparer, , is used to compare values of the types. - To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. + The default equality comparer, , is used to compare values of the types. + To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. ## Examples The following code examples demonstrate how to use `SequenceEqual(IEnumerable, IEnumerable)` to determine whether two sequences are equal. In the first two examples, the method determines whether the compared sequences contain references to the same objects. In the third and fourth examples, the method compares the actual data of the objects within the sequences. @@ -13080,7 +13080,7 @@ If comparer is `null`, the default comparer generic interface in your class. The following code example shows how to implement this interface in a helper class and provide and methods. + If you want to compare the actual data of the objects in the sequences instead of just comparing their references, you have to implement the generic interface in your class. The following code example shows how to implement this interface in a helper class and provide and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet9"::: @@ -13168,15 +13168,15 @@ If comparer is `null`, the default comparer method enumerates the two source sequences in parallel and compares corresponding elements by using the specified . If `comparer` is `null`, the default equality comparer, , is used to compare elements. + The method enumerates the two source sequences in parallel and compares corresponding elements by using the specified . If `comparer` is `null`, the default equality comparer, , is used to compare elements. ## Examples - The following example shows how to implement an equality comparer that can be used in the method. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="SequenceEqual"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet8"::: @@ -13300,15 +13300,15 @@ If comparer is `null`, the default comparer method throws an exception if the input sequence is empty. To instead return `null` when the input sequence is empty, use . + The method throws an exception if the input sequence is empty. To instead return `null` when the input sequence is empty, use . ## Examples - The following code example demonstrates how to use to select the only element of an array. + The following code example demonstrates how to use to select the only element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet79"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet79"::: - The following code example demonstrates that throws an exception when the sequence does not contain exactly one element. + The following code example demonstrates that throws an exception when the sequence does not contain exactly one element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet80"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet80"::: @@ -13385,15 +13385,15 @@ If comparer is `null`, the default comparer method throws an exception if the input sequence contains no matching element. To instead return `null` when no matching element is found, use . + The method throws an exception if the input sequence contains no matching element. To instead return `null` when no matching element is found, use . ## Examples - The following code example demonstrates how to use to select the only element of an array that satisfies a condition. + The following code example demonstrates how to use to select the only element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet81"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet81"::: - The following code example demonstrates that throws an exception when the sequence does not contain exactly one element that satisfies the condition. + The following code example demonstrates that throws an exception when the sequence does not contain exactly one element that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet82"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet82"::: @@ -13485,20 +13485,20 @@ If comparer is `null`, the default comparer returns a default value when the sequence is empty. + The following code example demonstrates that returns a default value when the sequence is empty. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet84"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet84"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the element. The following code example uses both techniques to obtain a default value of 1 if a collection of page numbers is empty. Because the default value for an integer is 0, which is not usually a valid page number, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the element. The following code example uses both techniques to obtain a default value of 1 if a collection of page numbers is empty. Because the default value for an integer is 0, which is not usually a valid page number, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet128"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet128"::: @@ -13575,12 +13575,12 @@ If comparer is `null`, the default comparer returns a default value when the sequence contains no elements that satisfy the condition. + The following code example demonstrates that returns a default value when the sequence contains no elements that satisfy the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet86"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet86"::: @@ -13761,14 +13761,14 @@ If comparer is `null`, the default comparer method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. + The method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. This method tests each element of `source` by using `predicate` and skips the element if the result is `true`. After the predicate function returns `false` for an element, that element and the remaining elements in `source` are yielded and there are no more invocations of `predicate`. - If `predicate` returns `true` for all elements in the sequence, an empty is returned. + If `predicate` returns `true` for all elements in the sequence, an empty is returned. - The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to skip elements of an array as long as a condition is true. + The following code example demonstrates how to use to skip elements of an array as long as a condition is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet88"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet88"::: @@ -14002,18 +14002,18 @@ If `count` is not a positive number, this method returns an identical copy of th ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method tests each element of `source` by using `predicate` and skips the element if the result is `true`. After the predicate function returns `false` for an element, that element and the remaining elements in `source` are yielded and there are no more invocations of `predicate`. + The method tests each element of `source` by using `predicate` and skips the element if the result is `true`. After the predicate function returns `false` for an element, that element and the remaining elements in `source` are yielded and there are no more invocations of `predicate`. - If `predicate` returns `true` for all elements in the sequence, an empty is returned. + If `predicate` returns `true` for all elements in the sequence, an empty is returned. The first argument of `predicate` represents the element to test. The second argument represents the zero-based index of the element within `source`. - The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to skip elements of an array as long as a condition that depends on the element's index is true. + The following code example demonstrates how to use to skip elements of an array as long as a condition that depends on the element's index is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet89"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet89"::: @@ -14085,9 +14085,9 @@ If `count` is not a positive number, this method returns an identical copy of th ## Remarks -The method returns zero if `source` contains no elements. +The method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14148,7 +14148,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14209,7 +14209,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14270,7 +14270,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14331,7 +14331,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14392,7 +14392,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14453,7 +14453,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14514,7 +14514,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14575,10 +14575,10 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the values of a sequence. + The following code example demonstrates how to use to sum the values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet121"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet121"::: @@ -14641,10 +14641,10 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the values of a sequence. + The following code example demonstrates how to use to sum the values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet120"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet120"::: @@ -14722,10 +14722,10 @@ This method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -14806,10 +14806,10 @@ This method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet98"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet98"::: @@ -14888,10 +14888,10 @@ This method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -14972,10 +14972,10 @@ This method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15056,10 +15056,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Decimal)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15140,10 +15140,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Double)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15224,10 +15224,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int32)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15308,10 +15308,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int64)` in Visual Basic -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15392,10 +15392,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Single)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15471,14 +15471,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl ## Remarks -The method returns zero if `source` contains no elements. +The method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15555,16 +15555,16 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - enumerates `source` and yields elements until `count` elements have been yielded or `source` contains no more elements. If `count` exceeds the number of elements in `source`, all elements of `source` are returned. + enumerates `source` and yields elements until `count` elements have been yielded or `source` contains no more elements. If `count` exceeds the number of elements in `source`, all elements of `source` are returned. - If `count` is less than or equal to zero, `source` is not enumerated and an empty is returned. + If `count` is less than or equal to zero, `source` is not enumerated and an empty is returned. - The and methods are functional complements. Given a collection sequence `coll` and an integer `n`, concatenating the results of `coll.Take(n)` and `coll.Skip(n)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and an integer `n`, concatenating the results of `coll.Take(n)` and `coll.Skip(n)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Take` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Take` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence (after it's sorted). + The following code example demonstrates how to use to return elements from the start of a sequence (after it's sorted). :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet99"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet99"::: @@ -15629,7 +15629,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - enumerates `source` and yields elements whose indices belong to the specified `range`. + enumerates `source` and yields elements whose indices belong to the specified `range`. ]]> @@ -15775,14 +15775,14 @@ If `count` is not a positive number, this method returns an empty enumerable col ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method tests each element of `source` by using `predicate` and yields the element if the result is `true`. Enumeration stops when the predicate function returns `false` for an element or when `source` contains no more elements. + The method tests each element of `source` by using `predicate` and yields the element if the result is `true`. Enumeration stops when the predicate function returns `false` for an element or when `source` contains no more elements. - The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition is true. + The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet100"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet100"::: @@ -15857,16 +15857,16 @@ If `count` is not a positive number, this method returns an empty enumerable col ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method tests each element of `source` by using `predicate` and yields the element if the result is `true`. Enumeration stops when the predicate function returns `false` for an element or when `source` contains no more elements. + The method tests each element of `source` by using `predicate` and yields the element if the result is `true`. Enumeration stops when the predicate function returns `false` for an element or when `source` contains no more elements. The first argument of `predicate` represents the element to test. The second argument represents the zero-based index of the element within `source`. - The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition that uses the element's index is true. + The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition that uses the element's index is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet101"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet101"::: @@ -15963,19 +15963,19 @@ If `count` is not a positive number, this method returns an empty enumerable col To order a sequence by the values of the elements themselves, specify the identity function (`x => x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. + and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - This method compares keys by using the default comparer . + This method compares keys by using the default comparer . This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. - In query expression syntax, an `orderby [first criterion], [second criterion]` (C#) or `Order By [first criterion], [second criterion]` (Visual Basic) clause translates to an invocation of . + In query expression syntax, an `orderby [first criterion], [second criterion]` (C#) or `Order By [first criterion], [second criterion]` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence. + The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet102"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet102"::: @@ -16072,12 +16072,12 @@ If `count` is not a positive number, this method returns an empty enumerable col To order a sequence by the values of the elements themselves, specify the identity function (`x => x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. + and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - If `comparer` is `null`, the default comparer is used to compare keys. + If `comparer` is `null`, the default comparer is used to compare keys. This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. @@ -16172,18 +16172,18 @@ If `count` is not a positive number, this method returns an empty enumerable col To order a sequence by the values of the elements themselves, specify the identity function (`x => x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. + and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - This sorting method compares keys by using the default comparer . + This sorting method compares keys by using the default comparer . This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. - In C# query expression syntax, an `orderby [first criterion], [second criterion] descending` clause translates to an invocation of . + In C# query expression syntax, an `orderby [first criterion], [second criterion] descending` clause translates to an invocation of . - In Visual Basic query expression syntax, an `Order By [first criterion], [second criterion] Descending` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Order By [first criterion], [second criterion] Descending` clause translates to an invocation of . ]]> @@ -16277,17 +16277,17 @@ If `count` is not a positive number, this method returns an empty enumerable col To order a sequence by the values of the elements themselves, specify the identity function (`x => x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. + and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - If `comparer` is `null`, the default comparer is used to compare keys. + If `comparer` is `null`, the default comparer is used to compare keys. This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. ## Examples - The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence in descending order by using a custom comparer. + The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence in descending order by using a custom comparer. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet103"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet103"::: @@ -16357,12 +16357,12 @@ If `count` is not a positive number, this method returns an empty enumerable col method forces immediate query evaluation and returns an array that contains the query results. You can append this method to your query in order to obtain a cached copy of the query results. + The method forces immediate query evaluation and returns an array that contains the query results. You can append this method to your query in order to obtain a cached copy of the query results. - has similar behavior but returns a instead of an array. + has similar behavior but returns a instead of an array. ## Examples - The following code example demonstrates how to use to force immediate query evaluation and return an array of results. + The following code example demonstrates how to use to force immediate query evaluation and return an array of results. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet104"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet104"::: @@ -16705,10 +16705,10 @@ If `count` is not a positive number, this method returns an empty enumerable col method uses the default equality comparer to compare keys. + The method uses the default equality comparer to compare keys. ## Examples - The following code example demonstrates how to use to create a by using a key selector. + The following code example demonstrates how to use to create a by using a key selector. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet105"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet105"::: @@ -16798,7 +16798,7 @@ If `count` is not a positive number, this method returns an empty enumerable col is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. ]]> @@ -16892,7 +16892,7 @@ If `count` is not a positive number, this method returns an empty enumerable col method uses the default equality comparer to compare keys. + The method uses the default equality comparer to compare keys. ]]> @@ -16990,7 +16990,7 @@ If `count` is not a positive number, this method returns an empty enumerable col is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. ]]> @@ -17185,12 +17185,12 @@ If `count` is not a positive number, this method returns an empty enumerable col method forces immediate query evaluation and returns a that contains the query results. You can append this method to your query in order to obtain a cached copy of the query results. + The method forces immediate query evaluation and returns a that contains the query results. You can append this method to your query in order to obtain a cached copy of the query results. - has similar behavior but returns an array instead of a . + has similar behavior but returns an array instead of a . ## Examples - The following code example demonstrates how to use to force immediate query evaluation and return a that contains the query results. + The following code example demonstrates how to use to force immediate query evaluation and return a that contains the query results. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet106"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet106"::: @@ -17282,9 +17282,9 @@ If `count` is not a positive number, this method returns an empty enumerable col method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. + The method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. - The default equality comparer is used to compare keys. + The default equality comparer is used to compare keys. ]]> @@ -17372,9 +17372,9 @@ If `count` is not a positive number, this method returns an empty enumerable col method returns a , a one-to-many dictionary that maps keys to collections of values. A is different to a , which performs a one-to-one mapping of keys to single values. + The method returns a , a one-to-many dictionary that maps keys to collections of values. A is different to a , which performs a one-to-one mapping of keys to single values. - If `comparer` is `null`, the default equality comparer is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. ]]> @@ -17463,12 +17463,12 @@ If `count` is not a positive number, this method returns an empty enumerable col method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. + The method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. - The default equality comparer is used to compare keys. + The default equality comparer is used to compare keys. ## Examples - The following code example demonstrates how to use to create a by using a key selector function and an element selector function. + The following code example demonstrates how to use to create a by using a key selector function and an element selector function. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet107"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet107"::: @@ -17570,9 +17570,9 @@ If `count` is not a positive number, this method returns an empty enumerable col method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. + The method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. - If `comparer` is `null`, the default equality comparer is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. ]]> @@ -17715,9 +17715,9 @@ The method is typically a constant-time operation, but ultimately this depends o ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - This method excludes duplicates from the return set. This is different behavior to the method, which returns all the elements in the input sequences including duplicates. + This method excludes duplicates from the return set. This is different behavior to the method, which returns all the elements in the input sequences including duplicates. - The default equality comparer, , is used to compare values of the types that implement the generic interface. To compare a custom data type, you need to implement this interface and provide your own and methods for the type. + The default equality comparer, , is used to compare values of the types that implement the generic interface. To compare a custom data type, you need to implement this interface and provide your own and methods for the type. When the object returned by this method is enumerated, `Union` enumerates `first` and `second` in that order and yields each element that has not already been yielded. @@ -17727,7 +17727,7 @@ The method is typically a constant-time operation, but ultimately this depends o :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet109"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet109"::: - If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override and methods. + If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet9"::: @@ -17819,19 +17819,19 @@ The method is typically a constant-time operation, but ultimately this depends o ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - If `comparer` is `null`, the default equality comparer, , is used to compare values. + If `comparer` is `null`, the default equality comparer, , is used to compare values. - When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. + When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. - The method differs from the method because the method returns all the elements in the input sequences including duplicates, whereas returns only unique values. + The method differs from the method because the method returns all the elements in the input sequences including duplicates, whereas returns only unique values. ## Examples - The following example shows how to implement an equality comparer that can be used in the method. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Union"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet2"::: @@ -17910,7 +17910,7 @@ This method is implemented by using deferred execution. The immediate return val The default equality comparer, , is used to compare values. -When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. +When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. ]]> @@ -17994,7 +17994,7 @@ This method is implemented by using deferred execution. The immediate return val If `comparer` is `null`, the default equality comparer, , is used to compare values. -When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. +When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. ]]> @@ -18077,10 +18077,10 @@ When the object returned by this method is enumerated, . + In query expression syntax, a `where` (C#) or `Where` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to filter a sequence. + The following code example demonstrates how to use to filter a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet110"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet110"::: @@ -18159,7 +18159,7 @@ When the object returned by this method is enumerated, to filter a sequence based on a predicate that involves the index of each element. + The following code example demonstrates how to use to filter a sequence based on a predicate that involves the index of each element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet111"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet111"::: @@ -18327,7 +18327,7 @@ When the object returned by this method is enumerated, method to merge two sequences. + The following code example demonstrates how to use the method to merge two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet200"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet200"::: diff --git a/xml/System.Linq/IGrouping`2.xml b/xml/System.Linq/IGrouping`2.xml index 5b62fdd5dd4..93a0ee441e1 100644 --- a/xml/System.Linq/IGrouping`2.xml +++ b/xml/System.Linq/IGrouping`2.xml @@ -85,22 +85,22 @@ is an that additionally has a key. The key represents the attribute that is common to each value in the . + An is an that additionally has a key. The key represents the attribute that is common to each value in the . - The values of an are accessed much as the elements of an are accessed. For example, you can access the values by using a `foreach` in Visual C# or `For Each` in Visual Basic loop to iterate through the object. The Example section contains a code example that shows you how to access both the key and the values of an object. + The values of an are accessed much as the elements of an are accessed. For example, you can access the values by using a `foreach` in Visual C# or `For Each` in Visual Basic loop to iterate through the object. The Example section contains a code example that shows you how to access both the key and the values of an object. - The type is used by the standard query operator methods, which return a sequence of elements of type . + The type is used by the standard query operator methods, which return a sequence of elements of type . ## Examples - The following example demonstrates how to work with an object. + The following example demonstrates how to work with an object. - In this example, is called on the array of objects returned by . groups the objects based on the value of their property. Each unique value for in the array of objects becomes a key for a new object, and the objects that have that key form the object's sequence of values. + In this example, is called on the array of objects returned by . groups the objects based on the value of their property. Each unique value for in the array of objects becomes a key for a new object, and the objects that have that key form the object's sequence of values. - Finally, the method is called on the sequence of objects to obtain just the first object. + Finally, the method is called on the sequence of objects to obtain just the first object. - The example then outputs the key of the object and the property of each value in the object's sequence of values. Notice that to access an object's sequence of values, you simply use the variable itself. + The example then outputs the key of the object and the property of each value in the object's sequence of values. Notice that to access an object's sequence of values, you simply use the variable itself. :::code language="csharp" source="~/snippets/csharp/System.Linq/IGroupingTKey,TElement/Overview/igrouping.cs" interactive="try-dotnet-method" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/IGroupingTKey,TElement/Overview/IGrouping.vb" id="Snippet1"::: @@ -153,12 +153,12 @@ represents the attribute that is common to each value in the . + The key of an represents the attribute that is common to each value in the . ## Examples - The following example demonstrates how to use the property to label each object in a sequence of objects. The method is used to obtain a sequence of objects. The `foreach` in Visual C# or `For Each` in Visual Basic loop then iterates through each object, outputting its key and the number of values it contains. + The following example demonstrates how to use the property to label each object in a sequence of objects. The method is used to obtain a sequence of objects. The `foreach` in Visual C# or `For Each` in Visual Basic loop then iterates through each object, outputting its key and the number of values it contains. :::code language="csharp" source="~/snippets/csharp/System.Linq/IGroupingTKey,TElement/Overview/igrouping.cs" interactive="try-dotnet-method" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/IGroupingTKey,TElement/Overview/IGrouping.vb" id="Snippet2"::: diff --git a/xml/System.Linq/ILookup`2.xml b/xml/System.Linq/ILookup`2.xml index b4e34f47b39..f39b4755f79 100644 --- a/xml/System.Linq/ILookup`2.xml +++ b/xml/System.Linq/ILookup`2.xml @@ -73,21 +73,21 @@ The type of the elements in the sequences that make up the values in the . Defines an indexer, size property, and Boolean search method for data structures that map keys to sequences of values. - implements the interface. - - The extension method , which can be appended to the end of a LINQ query, returns an object of type . - - - -## Examples - The following code example creates an object and iterates through its contents. - + implements the interface. + + The extension method , which can be appended to the end of a LINQ query, returns an object of type . + + + +## Examples + The following code example creates an object and iterates through its contents. + :::code language="csharp" source="~/snippets/csharp/System.Linq/ILookupTKey,TElement/Overview/ILookup.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq/ILookupTKey,TElement/Overview/ILookup.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq/ILookupTKey,TElement/Overview/ILookup.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Linq/IOrderedEnumerable`1.xml b/xml/System.Linq/IOrderedEnumerable`1.xml index a7f017d2566..f71899bdcdb 100644 --- a/xml/System.Linq/IOrderedEnumerable`1.xml +++ b/xml/System.Linq/IOrderedEnumerable`1.xml @@ -67,22 +67,22 @@ The type of the elements of the sequence. Represents a sorted sequence. - . - - The extension methods and operate on objects of type . An object of type can be obtained by calling one of the primary sort methods, or , which return an . and , the subordinate sort methods, in turn also return an object of type . This design allows for any number of consecutive calls to or , where each call performs a subordinate ordering on the sorted data returned from the previous call. - - - -## Examples - The following example demonstrates how to perform a primary and secondary ordering on an array of strings. It also demonstrates that the resulting is enumerable. - + . + + The extension methods and operate on objects of type . An object of type can be obtained by calling one of the primary sort methods, or , which return an . and , the subordinate sort methods, in turn also return an object of type . This design allows for any number of consecutive calls to or , where each call performs a subordinate ordering on the sorted data returned from the previous call. + + + +## Examples + The following example demonstrates how to perform a primary and secondary ordering on an array of strings. It also demonstrates that the resulting is enumerable. + :::code language="csharp" source="~/snippets/csharp/System.Linq/IOrderedEnumerableTElement/Overview/IOrderedEnumerable.cs" interactive="try-dotnet-method" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/IOrderedEnumerableTElement/Overview/IOrderedEnumerable.vb" id="Snippet1"::: - + ]]> @@ -158,16 +158,16 @@ Performs a subsequent ordering on the elements of an according to a key. An whose elements are sorted according to a key. - or , depending on whether `descending` is `true` or `false`. They both perform a subordinate ordering of an already sorted sequence of type . - - - -## Examples - The following code example demonstrates how to use to perform a secondary ordering on an . - + or , depending on whether `descending` is `true` or `false`. They both perform a subordinate ordering of an already sorted sequence of type . + + + +## Examples + The following code example demonstrates how to use to perform a secondary ordering on an . + :::code language="csharp" source="~/snippets/csharp/System.Linq/IOrderedEnumerableTElement/Overview/IOrderedEnumerable.cs" interactive="try-dotnet-method" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/IOrderedEnumerableTElement/Overview/IOrderedEnumerable.vb" id="Snippet2"::: diff --git a/xml/System.Linq/IOrderedQueryable.xml b/xml/System.Linq/IOrderedQueryable.xml index 3e0a8eb5118..51f2b94f5a8 100644 --- a/xml/System.Linq/IOrderedQueryable.xml +++ b/xml/System.Linq/IOrderedQueryable.xml @@ -58,15 +58,15 @@ Represents the result of a sorting operation. - interface is intended for implementation by query providers. - - This interface represents the result of a sorting query that calls the method(s) , , or . When is called and passed an expression tree that represents a sorting query, the resulting object must be of a type that implements . - - For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). - + interface is intended for implementation by query providers. + + This interface represents the result of a sorting query that calls the method(s) , , or . When is called and passed an expression tree that represents a sorting query, the resulting object must be of a type that implements . + + For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). + ]]> diff --git a/xml/System.Linq/IOrderedQueryable`1.xml b/xml/System.Linq/IOrderedQueryable`1.xml index d2e322efc36..fd78b42386b 100644 --- a/xml/System.Linq/IOrderedQueryable`1.xml +++ b/xml/System.Linq/IOrderedQueryable`1.xml @@ -83,15 +83,15 @@ The type of the content of the data source. Represents the result of a sorting operation. - interface is intended for implementation by query providers. - - This interface represents the result of a sorting query that calls the method(s) , , or . When is called and passed an expression tree that represents a sorting query, the resulting object must be of a type that implements . - - For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). - + interface is intended for implementation by query providers. + + This interface represents the result of a sorting query that calls the method(s) , , or . When is called and passed an expression tree that represents a sorting query, the resulting object must be of a type that implements . + + For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). + ]]> diff --git a/xml/System.Linq/IQueryProvider.xml b/xml/System.Linq/IQueryProvider.xml index e8929c3a75a..c0b44cf1223 100644 --- a/xml/System.Linq/IQueryProvider.xml +++ b/xml/System.Linq/IQueryProvider.xml @@ -113,9 +113,9 @@ > [!NOTE] > The property of the returned object is equal to `expression`. - The method is used to create new objects, given an expression tree. The query that is represented by the returned object is associated with a specific LINQ provider. + The method is used to create new objects, given an expression tree. The query that is represented by the returned object is associated with a specific LINQ provider. - Several of the standard query operator methods defined in , such as and , call this method. They pass it a that represents a LINQ query. + Several of the standard query operator methods defined in , such as and , call this method. They pass it a that represents a LINQ query. ]]> @@ -183,9 +183,9 @@ ## Remarks > [!NOTE] -> The property of the returned object is equal to `expression`. +> The property of the returned object is equal to `expression`. - The method is used to create new objects, given an expression tree. The query that is represented by the returned object is associated with a specific LINQ provider. + The method is used to create new objects, given an expression tree. The query that is represented by the returned object is associated with a specific LINQ provider. Most of the standard query operator methods that return enumerable results call this method. They pass it a that represents a LINQ query. @@ -243,7 +243,7 @@ method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when their associated object is enumerated. + The method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when their associated object is enumerated. ]]> @@ -309,9 +309,9 @@ method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when the object that contains the expression tree is enumerated. + The method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when the object that contains the expression tree is enumerated. - The standard query operator methods that return singleton results call . They pass it a that represents a LINQ query. + The standard query operator methods that return singleton results call . They pass it a that represents a LINQ query. ]]> diff --git a/xml/System.Linq/IQueryable.xml b/xml/System.Linq/IQueryable.xml index edd777babe4..7bccc13a41e 100644 --- a/xml/System.Linq/IQueryable.xml +++ b/xml/System.Linq/IQueryable.xml @@ -54,9 +54,9 @@ interface is intended for implementation by query providers. It is only supposed to be implemented by providers that also implement . If the provider does not also implement , the standard query operators cannot be used on the provider's data source. + The interface is intended for implementation by query providers. It is only supposed to be implemented by providers that also implement . If the provider does not also implement , the standard query operators cannot be used on the provider's data source. - The interface inherits the interface so that if it represents a query, the results of that query can be enumerated. Enumeration causes the expression tree associated with an object to be executed. The definition of "executing an expression tree" is specific to a query provider. For example, it may involve translating the expression tree to an appropriate query language for the underlying data source. Queries that do not return enumerable results are executed when the method is called. + The interface inherits the interface so that if it represents a query, the results of that query can be enumerated. Enumeration causes the expression tree associated with an object to be executed. The definition of "executing an expression tree" is specific to a query provider. For example, it may involve translating the expression tree to an appropriate query language for the underlying data source. Queries that do not return enumerable results are executed when the method is called. For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). diff --git a/xml/System.Linq/IQueryable`1.xml b/xml/System.Linq/IQueryable`1.xml index 0e98d11f97d..e89636147a2 100644 --- a/xml/System.Linq/IQueryable`1.xml +++ b/xml/System.Linq/IQueryable`1.xml @@ -75,21 +75,21 @@ The type of the data in the data source. Provides functionality to evaluate queries against a specific data source wherein the type of the data is known. - interface is intended for implementation by query providers. - - This interface inherits the interface so that if it represents a query, the results of that query can be enumerated. Enumeration forces the expression tree associated with an object to be executed. Queries that do not return enumerable results are executed when the method is called. - - The definition of "executing an expression tree" is specific to a query provider. For example, it may involve translating the expression tree to a query language appropriate for an underlying data source. - - The interface enables queries to be polymorphic. That is, because a query against an `IQueryable` data source is represented as an expression tree, it can be executed against different types of data sources. - - The `static` (`Shared` in Visual Basic) methods defined in the class (except for , , and ) extend objects of types that implement the interface. - + interface is intended for implementation by query providers. + + This interface inherits the interface so that if it represents a query, the results of that query can be enumerated. Enumeration forces the expression tree associated with an object to be executed. Queries that do not return enumerable results are executed when the method is called. + + The definition of "executing an expression tree" is specific to a query provider. For example, it may involve translating the expression tree to a query language appropriate for an underlying data source. + + The interface enables queries to be polymorphic. That is, because a query against an `IQueryable` data source is represented as an expression tree, it can be executed against different types of data sources. + + The `static` (`Shared` in Visual Basic) methods defined in the class (except for , , and ) extend objects of types that implement the interface. + For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). - + ]]> diff --git a/xml/System.Linq/ImmutableArrayExtensions.xml b/xml/System.Linq/ImmutableArrayExtensions.xml index d19266d2a94..a8996ba829c 100644 --- a/xml/System.Linq/ImmutableArrayExtensions.xml +++ b/xml/System.Linq/ImmutableArrayExtensions.xml @@ -99,7 +99,7 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. ]]> @@ -175,7 +175,7 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. ]]> @@ -262,7 +262,7 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. ]]> diff --git a/xml/System.Linq/Lookup`2.xml b/xml/System.Linq/Lookup`2.xml index 83915fcbc50..0b03098a5f6 100644 --- a/xml/System.Linq/Lookup`2.xml +++ b/xml/System.Linq/Lookup`2.xml @@ -88,17 +88,17 @@ resembles a . The difference is that a maps keys to single values, whereas a maps keys to collections of values. + A resembles a . The difference is that a maps keys to single values, whereas a maps keys to collections of values. - You can create an instance of a by calling on an object that implements . + You can create an instance of a by calling on an object that implements . > [!NOTE] -> There is no public constructor to create a new instance of a . Additionally, objects are immutable, that is, you cannot add or remove elements or keys from a object after it has been created. +> There is no public constructor to create a new instance of a . Additionally, objects are immutable, that is, you cannot add or remove elements or keys from a object after it has been created. ## Examples - The following example creates a from a collection of objects. It then enumerates the and outputs each key and each value in the key's associated collection of values. It also demonstrates how to use the properties and and the methods and . + The following example creates a from a collection of objects. It then enumerates the and outputs each key and each value in the key's associated collection of values. It also demonstrates how to use the properties and and the methods and . :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet1"::: @@ -228,7 +228,7 @@ to determine whether a contains a specified key. This code example is part of a larger example provided for the class. + The following example demonstrates how to use to determine whether a contains a specified key. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet4"::: @@ -290,12 +290,12 @@ property does not change because items cannot be added to or removed from a object after it has been created. + The value of the property does not change because items cannot be added to or removed from a object after it has been created. ## Examples - The following example demonstrates how to use to determine the number of key/value collection pairs in a . This code example is part of a larger example provided for the class. + The following example demonstrates how to use to determine the number of key/value collection pairs in a . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet2"::: @@ -363,7 +363,7 @@ to iterate through the keys and values of a . This code example is part of a larger example provided for the class. + The following example demonstrates how to use to iterate through the keys and values of a . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet5"::: @@ -423,12 +423,12 @@ by using the following syntax: `myLookup[key]` in Visual C# or `myLookup(key)` in Visual Basic. If the `key` is not found in the collection, an empty sequence is returned. + This indexed property provides the ability to index a specific collection of values in the by using the following syntax: `myLookup[key]` in Visual C# or `myLookup(key)` in Visual Basic. If the `key` is not found in the collection, an empty sequence is returned. ## Examples - The following example demonstrates how to use to index directly into a . This code example is part of a larger example provided for the class. + The following example demonstrates how to use to index directly into a . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet3"::: diff --git a/xml/System.Linq/ParallelEnumerable.xml b/xml/System.Linq/ParallelEnumerable.xml index 32fe8686b2e..233165fccea 100644 --- a/xml/System.Linq/ParallelEnumerable.xml +++ b/xml/System.Linq/ParallelEnumerable.xml @@ -955,7 +955,7 @@ operator can be used to convert a ParallelQuery to a ParallelQuery(T). + The operator can be used to convert a ParallelQuery to a ParallelQuery(T). ]]> @@ -2521,7 +2521,7 @@ and a right data source of type . Otherwise, the Concat operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Concat with a left data source of type and a right data source of type . Otherwise, the Concat operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -3404,7 +3404,7 @@ and a right data source of type . Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Except with a left data source of type and a right data source of type . Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -3554,7 +3554,7 @@ and a right data source of type . Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Except with a left data source of type and a right data source of type . Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -4825,7 +4825,7 @@ and a right data source of type . Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of GroupJoin with a left data source of type and a right data source of type . Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5041,7 +5041,7 @@ and a right data source of type . Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of GroupJoin with a left data source of type and a right data source of type . Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5228,7 +5228,7 @@ and a right data source of type . Otherwise, the Intersect operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Intersect with a left data source of type and a right data source of type . Otherwise, the Intersect operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5378,7 +5378,7 @@ and a right data source of type . Otherwise, the Intersect operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Intersect with a left data source of type and a right data source of type . Otherwise, the Intersect operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5565,7 +5565,7 @@ and a right data source of type . Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage Join with a left data source of type and a right data source of type . Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5781,7 +5781,7 @@ and a right data source of type . Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Join with a left data source of type and a right data source of type . Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -9144,7 +9144,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -9232,7 +9232,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -9320,7 +9320,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -10046,7 +10046,7 @@ and a right data source of type . Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of SequenceEqual with a left data source of type and a right data source of type . Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -10191,7 +10191,7 @@ and a right data source of type . Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation. + This overload exists to disallow usage of SequenceEqual with a left data source of type and a right data source of type . Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation. ]]> @@ -12143,7 +12143,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -12231,7 +12231,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -12319,7 +12319,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -12407,7 +12407,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -13232,7 +13232,7 @@ and a right data source of type . Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation. + This overload exists to disallow usage of Union with a left data source of type and a right data source of type . Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation. ]]> @@ -13384,7 +13384,7 @@ and a right data source of type . Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Union with a left data source of type and a right data source of type . Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -13959,7 +13959,7 @@ and a right data source of type . Otherwise, the Zip operator would appear to be bind to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Zip with a left data source of type and a right data source of type . Otherwise, the Zip operator would appear to be bind to the parallel implementation, but would in reality bind to the sequential implementation. ]]> diff --git a/xml/System.Linq/Queryable.xml b/xml/System.Linq/Queryable.xml index a95a29e23ba..976c3b7e326 100644 --- a/xml/System.Linq/Queryable.xml +++ b/xml/System.Linq/Queryable.xml @@ -55,13 +55,13 @@ class provides an implementation of the standard query operators for querying data sources that implement . The standard query operators are general purpose methods that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data in any .NET-based programming language. + The set of methods declared in the class provides an implementation of the standard query operators for querying data sources that implement . The standard query operators are general purpose methods that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data in any .NET-based programming language. - The majority of the methods in this class are defined as extension methods that extend the type. This means they can be called like an instance method on any object that implements . These methods that extend do not perform any querying directly. Instead, their functionality is to build an object, which is an expression tree that represents the cumulative query. The methods then pass the new expression tree to either the method or the method of the input . The method that is called depends on whether the method returns a singleton value, in which case is called, or has enumerable results, in which case is called. + The majority of the methods in this class are defined as extension methods that extend the type. This means they can be called like an instance method on any object that implements . These methods that extend do not perform any querying directly. Instead, their functionality is to build an object, which is an expression tree that represents the cumulative query. The methods then pass the new expression tree to either the method or the method of the input . The method that is called depends on whether the method returns a singleton value, in which case is called, or has enumerable results, in which case is called. - The actual query execution on the target data is performed by a class that implements . The expectation of any implementation is that the result of executing an expression tree that was constructed by a standard query operator method is equivalent to the result of calling the corresponding method in the class, if the data source were an . + The actual query execution on the target data is performed by a class that implements . The expectation of any implementation is that the result of executing an expression tree that was constructed by a standard query operator method is equivalent to the result of calling the corresponding method in the class, if the data source were an . - In addition to the standard query operator methods that operate on objects, this class also contains a method, , which types objects as objects. + In addition to the standard query operator methods that operate on objects, this class also contains a method, , which types objects as objects. ]]> @@ -136,18 +136,18 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The first value in `source` is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The first value in `source` is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. - To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to build a sentence from an array of strings. + The following code example demonstrates how to use to build a sentence from an array of strings. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet1"::: @@ -236,18 +236,18 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The `seed` parameter is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The `seed` parameter is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. - To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to apply an accumulator function when a seed value is provided to the function. + The following code example demonstrates how to use to apply an accumulator function when a seed value is provided to the function. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet2"::: @@ -345,18 +345,18 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The `seed` parameter is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. The final accumulated value is passed to `selector` to obtain the result value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The `seed` parameter is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. The final accumulated value is passed to `selector` to obtain the result value. - To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to apply an accumulator function and a result selector. + The following code example demonstrates how to use to apply an accumulator function and a result selector. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet3"::: @@ -587,21 +587,21 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the `source` parameter's type. The expected behavior is that it determines if all the elements in `source` satisfy the condition in `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the `source` parameter's type. The expected behavior is that it determines if all the elements in `source` satisfy the condition in `predicate`. ## Examples - The following code example demonstrates how to use to determine whether all the elements in a sequence satisfy a condition. + The following code example demonstrates how to use to determine whether all the elements in a sequence satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet4"::: - The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `All` method. + The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `All` method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet134"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet134"::: @@ -686,19 +686,19 @@ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains any elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains any elements. ## Examples - The following code example demonstrates how to use to determine whether a sequence contains any elements. + The following code example demonstrates how to use to determine whether a sequence contains any elements. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet5"::: - The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `Any` method. + The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `Any` method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet135"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet135"::: @@ -775,16 +775,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if any of the elements of `source` satisfy the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if any of the elements of `source` satisfy the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to determine whether any element in a sequence satisfies a condition. + The following code example demonstrates how to use to determine whether any element in a sequence satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet6"::: @@ -916,9 +916,9 @@ , returns it directly. Otherwise, it returns an that executes queries by calling the equivalent query operator methods in instead of those in . + If the type of `source` implements , returns it directly. Otherwise, it returns an that executes queries by calling the equivalent query operator methods in instead of those in . - This method assumes that `source` implements for some `T`. At runtime, the result is of type for the same `T`. This method is useful in dynamic scenarios when you do not statically know the type of `T`. + This method assumes that `source` implements for some `T`. At runtime, the result is of type for the same `T`. This method is useful in dynamic scenarios when you do not statically know the type of `T`. ]]> @@ -999,12 +999,12 @@ , returns it directly. Otherwise, it returns an that executes queries by calling the equivalent query operator methods in instead of those in . + If the type of `source` implements , returns it directly. Otherwise, it returns an that executes queries by calling the equivalent query operator methods in instead of those in . ## Examples - The following code example demonstrates how to use to convert an to an . + The following code example demonstrates how to use to convert an to an . :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet125"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet125"::: @@ -1071,14 +1071,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1139,14 +1139,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1207,14 +1207,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet8"::: @@ -1273,14 +1273,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1341,14 +1341,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1407,14 +1407,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1473,14 +1473,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1539,14 +1539,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet12"::: @@ -1603,14 +1603,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1669,14 +1669,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1756,16 +1756,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1845,16 +1845,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1934,16 +1934,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet18"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet18"::: @@ -2021,16 +2021,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2110,16 +2110,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2197,16 +2197,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2284,16 +2284,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2371,16 +2371,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2458,16 +2458,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2545,16 +2545,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2632,12 +2632,12 @@ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it converts the values in `source` to type `TResult`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it converts the values in `source` to type `TResult`. ## Examples - The following code example demonstrates how to use to convert objects in a sequence to type . + The following code example demonstrates how to use to convert objects in a sequence to type . :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet19"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet19"::: @@ -2785,14 +2785,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the elements in `source2` are concatenated to those of `source1` to create a new sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the elements in `source2` are concatenated to those of `source1` to create a new sequence. ## Examples - The following code example demonstrates how to use to concatenate two sequences. + The following code example demonstrates how to use to concatenate two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet20"::: @@ -2879,14 +2879,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains `item`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains `item`. ## Examples - The following code example demonstrates how to use to determine whether a sequence contains a specific element. + The following code example demonstrates how to use to determine whether a sequence contains a specific element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet21"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet21"::: @@ -2973,9 +2973,9 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains `item` by using `comparer` to compare values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains `item` by using `comparer` to compare values. ]]> @@ -3056,14 +3056,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source`. ## Examples - The following code example demonstrates how to use to count the elements in a sequence. + The following code example demonstrates how to use to count the elements in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet22"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet22"::: @@ -3140,16 +3140,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` that satisfy the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` that satisfy the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to count the elements in a sequence that satisfy a condition. + The following code example demonstrates how to use to count the elements in a sequence that satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet23"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet23"::: @@ -3299,14 +3299,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns `source` if it is not empty. Otherwise, it returns an that contains `default(TSource)`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns `source` if it is not empty. Otherwise, it returns an that contains `default(TSource)`. ## Examples - The following code examples demonstrate how to use to provide a default value in case the source sequence is empty. + The following code examples demonstrate how to use to provide a default value in case the source sequence is empty. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet24"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet24"::: @@ -3382,14 +3382,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns `source` if it is not empty. Otherwise, it returns an that contains `defaultValue`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns `source` if it is not empty. Otherwise, it returns an that contains `defaultValue`. ## Examples - The following code example shows a situation in which it is useful to call in a LINQ query. A default value is passed to in this example. + The following code example shows a situation in which it is useful to call in a LINQ query. A default value is passed to in this example. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet25"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet25"::: @@ -3473,14 +3473,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns an unordered sequence of the unique items in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns an unordered sequence of the unique items in `source`. ## Examples - The following code example demonstrates how to use to return distinct elements from a sequence. + The following code example demonstrates how to use to return distinct elements from a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet27"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet27"::: @@ -3564,9 +3564,9 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns an unordered sequence of the unique items in `source` by using `comparer` to compare values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns an unordered sequence of the unique items in `source` by using `comparer` to compare values. ]]> @@ -3839,14 +3839,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the item at position `index` in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the item at position `index` in `source`. ## Examples - The following code example demonstrates how to use to return an element at a specific position in a sequence. + The following code example demonstrates how to use to return an element at a specific position in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet28"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet28"::: @@ -3984,14 +3984,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the item at position `index` in `source`, or `default(TSource)` if `index` is outside the bounds of `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the item at position `index` in `source`, or `default(TSource)` if `index` is outside the bounds of `source`. ## Examples - The following code example demonstrates how to use . This example uses a value for `index` that is outside the bounds of the source sequence. + The following code example demonstrates how to use . This example uses a value for `index` that is outside the bounds of the source sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet29"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet29"::: @@ -4077,14 +4077,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the`source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the`source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` are returned except for those that are also in `source2`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` are returned except for those that are also in `source2`. ## Examples - The following code example demonstrates how to use to return those elements that only appear in the first source sequence. + The following code example demonstrates how to use to return those elements that only appear in the first source sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet34"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet34"::: @@ -4170,9 +4170,9 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the`source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the`source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` are returned except for those that are also in `source2`, and `comparer` is used to compare values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` are returned except for those that are also in `source2`, and `comparer` is used to compare values. ]]> @@ -4394,14 +4394,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source`. ## Examples - The following code example demonstrates how to use to return the first element in a sequence. + The following code example demonstrates how to use to return the first element in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet35"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet35"::: @@ -4478,16 +4478,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source` that satisfies the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source` that satisfies the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to return the first element of a sequence that satisfies a condition. + The following code example demonstrates how to use to return the first element of a sequence that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet36"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet36"::: @@ -4578,21 +4578,21 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source`, or a default value if `source` is empty. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source`, or a default value if `source` is empty. - The method does not provide a way to specify the default value to return if `source` is empty. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify the default value to return if `source` is empty. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use on an empty sequence. + The following code example demonstrates how to use on an empty sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet37"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet37"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the first element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric months is empty. Because the default value for an integer is 0, which does not correspond to any month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the first element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric months is empty. Because the default value for an integer is 0, which does not correspond to any month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet131"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet131"::: @@ -4670,16 +4670,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source` that satisfies the condition in `predicate`, or a default value if no element satisfies the condition. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source` that satisfies the condition in `predicate`, or a default value if no element satisfies the condition. ## Examples - The following code example demonstrates how to use by passing in a predicate. In the second query, there is no element in the sequence that satisfies the condition. + The following code example demonstrates how to use by passing in a predicate. In the second query, there is no element in the sequence that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet38"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet38"::: @@ -4892,16 +4892,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. ## Examples - The following code example demonstrates how to use to group the elements of a sequence. + The following code example demonstrates how to use to group the elements of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet14"::: @@ -4996,11 +4996,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value. The key value is obtained by invoking `keySelector` on each element, and key values are compared by using `comparer`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value. The key value is obtained by invoking `keySelector` on each element, and key values are compared by using `comparer`. ]]> @@ -5093,16 +5093,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. It invokes `elementSelector` on each element to obtain a result element. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. It invokes `elementSelector` on each element to obtain a result element. ## Examples - The following code example demonstrates how to use to group the elements of a sequence. + The following code example demonstrates how to use to group the elements of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet39"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet39"::: @@ -5208,11 +5208,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. Key values are compared by using `comparer`. The `elementSelector` parameter is invoked on each element to obtain a result element. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. Key values are compared by using `comparer`. The `elementSelector` parameter is invoked on each element to obtain a result element. ]]> @@ -5305,16 +5305,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. The `resultSelector` parameter is used to obtain a result value from each group and its key. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. The `resultSelector` parameter is used to obtain a result value from each group and its key. ## Examples - The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. + The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet15"::: @@ -5420,11 +5420,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `comparer` parameter is used to compare keys and the `resultSelector` parameter is used to obtain a result value from each group and its key. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `comparer` parameter is used to compare keys and the `resultSelector` parameter is used to obtain a result value from each group and its key. ]]> @@ -5528,16 +5528,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `elementSelector` parameter is used to project the elements of each group, and the `resultSelector` parameter is used to obtain a result value from each group and its key. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `elementSelector` parameter is used to project the elements of each group, and the `resultSelector` parameter is used to obtain a result value from each group and its key. ## Examples - The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. + The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet130"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet130"::: @@ -5654,11 +5654,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `comparer` parameter is used to compare key values. The `elementSelector` parameter is used to project the elements of each group, and the `resultSelector` parameter is used to obtain a result value from each group and its key. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `comparer` parameter is used to compare key values. The `elementSelector` parameter is used to project the elements of each group, and the `resultSelector` parameter is used to obtain a result value from each group and its key. ]]> @@ -5774,16 +5774,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that the `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality to match each element in `outer` with zero or more elements from `inner`. Then the `resultSelector` function is invoked to project a result object from each group of correlated elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that the `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality to match each element in `outer` with zero or more elements from `inner`. Then the `resultSelector` function is invoked to project a result object from each group of correlated elements. ## Examples - The following code example demonstrates how to use to perform a grouped join on two sequences. + The following code example demonstrates how to use to perform a grouped join on two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet40"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet40"::: @@ -5902,11 +5902,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that the `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality by using `comparer`. The outcome of the comparisons is used to match each element in `outer` with zero or more elements from `inner`. Then the `resultSelector` function is invoked to project a result object from each group of correlated elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that the `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality by using `comparer`. The outcome of the comparisons is used to match each element in `outer` with zero or more elements from `inner`. Then the `resultSelector` function is invoked to project a result object from each group of correlated elements. ]]> @@ -6045,14 +6045,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` that are also in `source2` are returned. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` that are also in `source2` are returned. ## Examples - The following code example demonstrates how to use to return the elements that appear in each of two sequences. + The following code example demonstrates how to use to return the elements that appear in each of two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet41"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet41"::: @@ -6138,9 +6138,9 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` that are also in `source2` are returned. The `comparer` parameter is used to compare elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` that are also in `source2` are returned. The `comparer` parameter is used to compare elements. ]]> @@ -6401,16 +6401,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that of an inner join. The `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality to match elements from each sequence. A pair of elements is stored for each element in `inner` that matches an element in `outer`. Then the `resultSelector` function is invoked to project a result object from each pair of matching elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that of an inner join. The `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality to match elements from each sequence. A pair of elements is stored for each element in `inner` that matches an element in `outer`. Then the `resultSelector` function is invoked to project a result object from each pair of matching elements. ## Examples - The following code example demonstrates how to use to perform an inner join of two sequences based on a common key. + The following code example demonstrates how to use to perform an inner join of two sequences based on a common key. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet42"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet42"::: @@ -6529,11 +6529,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that of an inner join. The `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality by using `comparer`. The outcome of the comparisons is used to create a matching pair for each element in `inner` that matches an element in `outer`. Then the `resultSelector` function is invoked to project a result object from each pair of matching elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that of an inner join. The `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality by using `comparer`. The outcome of the comparisons is used to create a matching pair for each element in `inner` that matches an element in `outer`. Then the `resultSelector` function is invoked to project a result object from each pair of matching elements. ]]> @@ -6614,14 +6614,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source`. ## Examples - The following code example demonstrates how to use to return the last element of an array. + The following code example demonstrates how to use to return the last element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet43"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet43"::: @@ -6698,16 +6698,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source` that satisfies the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source` that satisfies the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to return the last element of an array that satisfies a condition. + The following code example demonstrates how to use to return the last element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet44"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet44"::: @@ -6798,21 +6798,21 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source`, or a default value if `source` is empty. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source`, or a default value if `source` is empty. - The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use on an empty array. + The following code example demonstrates how to use on an empty array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet45"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet45"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the last element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric days of the month is empty. Because the default value for an integer is 0, which does not correspond to any day of the month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the last element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric days of the month is empty. Because the default value for an integer is 0, which does not correspond to any day of the month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet132"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet132"::: @@ -6890,16 +6890,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source` that satisfies the condition specified by `predicate`. It returns a default value if there is no such element in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source` that satisfies the condition specified by `predicate`. It returns a default value if there is no such element in `source`. ## Examples - The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the sequence that satisfies the condition. + The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the sequence that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet46"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet46"::: @@ -7306,14 +7306,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` and returns an . + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` and returns an . ## Examples - The following code example demonstrates how to use to count the elements in an array. + The following code example demonstrates how to use to count the elements in an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet47"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet47"::: @@ -7390,16 +7390,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` that satisfy the condition specified by `predicate` and returns an . + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` that satisfy the condition specified by `predicate` and returns an . ## Examples - The following code example demonstrates how to use to count the elements in an array that satisfy a condition. + The following code example demonstrates how to use to count the elements in an array that satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet48"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet48"::: @@ -7475,14 +7475,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the maximum value in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the maximum value in `source`. ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence. + The following code example demonstrates how to use to determine the maximum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet52"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet52"::: @@ -7634,16 +7634,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element in `source` and returns the maximum value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element in `source` and returns the maximum value. ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet58"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet58"::: @@ -7941,14 +7941,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the minimum value in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the minimum value in `source`. ## Examples - The following code example demonstrates how to use to determine the minimum value in a sequence. + The following code example demonstrates how to use to determine the minimum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet60"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet60"::: @@ -8101,16 +8101,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element in `source` and returns the minimum value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element in `source` and returns the minimum value. ## Examples - The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. + The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet68"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet68"::: @@ -8407,7 +8407,7 @@ The last chunk will contain the remaining elements and may be of a smaller size. that represents calling `OfType` itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The `OfType` method generates a that represents calling `OfType` itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The query behavior that occurs as a result of executing an expression tree that represents calling `OfType` depends on the implementation of the type of the `source` parameter. The expected behavior is that it filters out any elements in `source` that are not of type `TResult`. @@ -8663,16 +8663,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. ## Examples - The following code example demonstrates how to use to sort the elements of a sequence. + The following code example demonstrates how to use to sort the elements of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet70"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet70"::: @@ -8767,11 +8767,11 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. The `comparer` parameter is used to compare keys. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. The `comparer` parameter is used to compare keys. ]]> @@ -8863,11 +8863,11 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. ]]> @@ -8959,16 +8959,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. The `comparer` parameter is used to compare keys. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. The `comparer` parameter is used to compare keys. ## Examples - The following code example demonstrates how to use to sort the elements of a sequence in descending order by using a custom comparer. + The following code example demonstrates how to use to sort the elements of a sequence in descending order by using a custom comparer. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet71"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet71"::: @@ -9257,14 +9257,14 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it reverses the order of the elements in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it reverses the order of the elements in `source`. ## Examples - The following code example demonstrates how to use to reverse the order of elements in an array. + The following code example demonstrates how to use to reverse the order of elements in an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet74"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet74"::: @@ -9564,16 +9564,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depend on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into a different form. + The query behavior that occurs as a result of executing an expression tree that represents calling depend on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into a different form. ## Examples - The following code example demonstrates how to use to project over a sequence of values and use the index of each element in the projected form. + The following code example demonstrates how to use to project over a sequence of values and use the index of each element in the projected form. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet76"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet76"::: @@ -9658,16 +9658,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into a different form. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into a different form. ## Examples - The following code example demonstrates how to use to project over a sequence of values. + The following code example demonstrates how to use to project over a sequence of values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet75"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet75"::: @@ -9762,16 +9762,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into an enumerable form. It then concatenates the enumerable results into a single, one-dimensional sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into an enumerable form. It then concatenates the enumerable results into a single, one-dimensional sequence. ## Examples - The following code example demonstrates how to use to perform a one-to-many projection over an array. + The following code example demonstrates how to use to perform a one-to-many projection over an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet77"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet77"::: @@ -9856,16 +9856,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into an enumerable form. Each enumerable result incorporates the index of the source element. It then concatenates the enumerable results into a single, one-dimensional sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into an enumerable form. Each enumerable result incorporates the index of the source element. It then concatenates the enumerable results into a single, one-dimensional sequence. ## Examples - The following code example demonstrates how to use to perform a one-to-many projection over an array and use the index of each source element. + The following code example demonstrates how to use to perform a one-to-many projection over an array and use the index of each source element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet78"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet78"::: @@ -9961,16 +9961,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `collectionSelector` on each element of `source` to project it into an enumerable form. Then the function represented by `resultSelector` is invoked on each element in each intermediate sequence. The resulting values are concatenated into a single, one-dimensional sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `collectionSelector` on each element of `source` to project it into an enumerable form. Then the function represented by `resultSelector` is invoked on each element in each intermediate sequence. The resulting values are concatenated into a single, one-dimensional sequence. ## Examples - The following code example demonstrates how to use to perform a one-to-many projection over an array. This example uses a result selector function to keep the source element that corresponds to each intermediate sequence in scope for the final call to `Select`. + The following code example demonstrates how to use to perform a one-to-many projection over an array. This example uses a result selector function to keep the source element that corresponds to each intermediate sequence in scope for the final call to `Select`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet124"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet124"::: @@ -10066,11 +10066,11 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `collectionSelector` on each element of `source` to project it into an enumerable form. Each enumerable result incorporates the source element's index. Then the function represented by `resultSelector` is invoked on each element in each intermediate sequence. The resulting values are concatenated into a single, one-dimensional sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `collectionSelector` on each element of `source` to project it into an enumerable form. Each enumerable result incorporates the source element's index. Then the function represented by `resultSelector` is invoked on each element in each intermediate sequence. The resulting values are concatenated into a single, one-dimensional sequence. ]]> @@ -10154,14 +10154,14 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that it determines if the two source sequences are equal. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that it determines if the two source sequences are equal. ## Examples - The following code example demonstrates how to use to determine whether two sequences are equal. In this example the sequences are equal. + The following code example demonstrates how to use to determine whether two sequences are equal. In this example the sequences are equal. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet32"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet32"::: @@ -10253,9 +10253,9 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that it determines if the two source sequences are equal by using `comparer` to compare elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that it determines if the two source sequences are equal by using `comparer` to compare elements. ]]> @@ -10379,14 +10379,14 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source`. ## Examples - The following code example demonstrates how to use to select the only element of an array. + The following code example demonstrates how to use to select the only element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet79"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet79"::: @@ -10468,16 +10468,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source` that satisfies the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source` that satisfies the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to select the only element of an array that satisfies a condition. + The following code example demonstrates how to use to select the only element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet81"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet81"::: @@ -10571,21 +10571,21 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source`, or a default value if `source` is empty. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source`, or a default value if `source` is empty. - The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use to select the only element of an array. The second query demonstrates that returns a default value when the sequence does not contain exactly one element. + The following code example demonstrates how to use to select the only element of an array. The second query demonstrates that returns a default value when the sequence does not contain exactly one element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet83"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet83"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the element. The following code example uses both techniques to obtain a default value of 1 if a collection of page numbers is empty. Because the default value for an integer is 0, which is not usually a valid page number, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the element. The following code example uses both techniques to obtain a default value of 1 if a collection of page numbers is empty. Because the default value for an integer is 0, which is not usually a valid page number, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet133"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet133"::: @@ -10664,16 +10664,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source` that satisfies the condition specified by `predicate`, or a default value if no such element exists. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source` that satisfies the condition specified by `predicate`, or a default value if no such element exists. ## Examples - The following code example demonstrates how to use to select the only element of an array that satisfies a condition. The second query demonstrates that returns a default value when the sequence does not contain exactly one element that satisfies the condition. + The following code example demonstrates how to use to select the only element of an array that satisfies a condition. The second query demonstrates that returns a default value when the sequence does not contain exactly one element that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet85"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet85"::: @@ -10868,14 +10868,14 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it skips the first `count` elements in `source` and returns the remaining elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it skips the first `count` elements in `source` and returns the remaining elements. ## Examples - The following code example demonstrates how to use to skip a specified number of elements in a sorted array and return the remaining elements. + The following code example demonstrates how to use to skip a specified number of elements in a sorted array and return the remaining elements. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet87"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet87"::: @@ -11030,16 +11030,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns false. That element and all the remaining elements are returned. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns false. That element and all the remaining elements are returned. ## Examples - The following code example demonstrates how to use to skip elements of an array as long as a condition is true. + The following code example demonstrates how to use to skip elements of an array as long as a condition is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet88"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet88"::: @@ -11115,16 +11115,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns false. That element and all the remaining elements are returned. The index of each source element is provided as the second argument to `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns false. That element and all the remaining elements are returned. The index of each source element is provided as the second argument to `predicate`. ## Examples - The following code example demonstrates how to use to skip elements of an array as long as a condition that depends on the element's index is true. + The following code example demonstrates how to use to skip elements of an array as long as a condition that depends on the element's index is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet89"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet89"::: @@ -11191,9 +11191,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11248,9 +11248,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11304,9 +11304,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11361,9 +11361,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11418,9 +11418,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11475,9 +11475,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11531,9 +11531,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11588,9 +11588,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11645,14 +11645,14 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ## Examples - The following code example demonstrates how to use to sum the values of a sequence. + The following code example demonstrates how to use to sum the values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet121"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet121"::: @@ -11709,14 +11709,14 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ## Examples - The following code example demonstrates how to use to sum the values of a sequence. + The following code example demonstrates how to use to sum the values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet120"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet120"::: @@ -11792,16 +11792,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -11880,14 +11880,14 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -11965,16 +11965,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12053,16 +12053,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12141,16 +12141,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12229,16 +12229,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12316,16 +12316,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12404,16 +12404,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12492,16 +12492,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12579,16 +12579,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12666,14 +12666,14 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it takes the first `count` elements from the start of `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it takes the first `count` elements from the start of `source`. ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence. + The following code example demonstrates how to use to return elements from the start of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet99"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet99"::: @@ -12885,16 +12885,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns `false`. It returns all the elements up until that point. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns `false`. It returns all the elements up until that point. ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition is true. + The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet100"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet100"::: @@ -12970,16 +12970,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns `false`. It returns all the elements up until that point. The index of each source element is provided as the second argument to `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns `false`. It returns all the elements up until that point. The index of each source element is provided as the second argument to `predicate`. ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition that uses the index of the element is true. + The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition that uses the index of the element is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet101"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet101"::: @@ -13074,16 +13074,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. ## Examples - The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence. + The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet102"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet102"::: @@ -13178,11 +13178,11 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. The `comparer` parameter is used to compare key values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. The `comparer` parameter is used to compare key values. ]]> @@ -13274,11 +13274,11 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. ]]> @@ -13370,16 +13370,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. The `comparer` parameter is used to compare key values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. The `comparer` parameter is used to compare key values. ## Examples - The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence in descending order by using a custom comparer. + The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence in descending order by using a custom comparer. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet103"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet103"::: @@ -13465,14 +13465,14 @@ If `count` is not a positive number, this method returns an empty queryable sequ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the set union of the elements in `source1` and `source2` is returned. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the set union of the elements in `source1` and `source2` is returned. ## Examples - The following code example demonstrates how to use to obtain the set union of two sequences. + The following code example demonstrates how to use to obtain the set union of two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet109"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet109"::: @@ -13558,9 +13558,9 @@ If `count` is not a positive number, this method returns an empty queryable sequ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the set union of the elements in `source1` and `source2` is returned. The `comparer` parameter is used to compare values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the set union of the elements in `source1` and `source2` is returned. The `comparer` parameter is used to compare values. ]]> @@ -13788,16 +13788,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the elements from `source` that satisfy the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the elements from `source` that satisfy the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to filter a sequence. + The following code example demonstrates how to use to filter a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet110"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet110"::: @@ -13873,16 +13873,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the elements from `source` that satisfy the condition specified by `predicate`. The index of each source element is provided as the second argument to `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the elements from `source` that satisfy the condition specified by `predicate`. The index of each source element is provided as the second argument to `predicate`. ## Examples - The following code example demonstrates how to use to filter a sequence based on a predicate that incorporates the index of each element. + The following code example demonstrates how to use to filter a sequence based on a predicate that incorporates the index of each element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet111"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet111"::: @@ -14054,14 +14054,14 @@ If `count` is not a positive number, this method returns an empty queryable sequ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. The method merges each element of the first sequence with an element that has the same index in the second sequence. If the sequences do not have the same number of elements, the method merges sequences until it reaches the end of one of them. For example, if one sequence has three elements and the other one has four, the resulting sequence will have only three elements. ## Examples - The following code example demonstrates how to use the method to merge two sequences. + The following code example demonstrates how to use the method to merge two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet200"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet200"::: From 73dc0f3d2d619786ae6fbc446ff4fb56a89ff1f4 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Thu, 2 Apr 2026 13:24:23 -0700 Subject: [PATCH 7/8] more unencodings --- xml/System.IdentityModel.Claims/ClaimTypes.xml | 2 +- xml/System.IdentityModel.Claims/DefaultClaimSet.xml | 2 +- xml/System.IdentityModel.Tokens/BootstrapContext.xml | 2 +- xml/System.IdentityModel.Tokens/SamlAttributeStatement.xml | 2 +- .../SamlAudienceRestrictionCondition.xml | 4 ++-- .../SamlAuthenticationStatement.xml | 2 +- .../SamlAuthorizationDecisionStatement.xml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xml/System.IdentityModel.Claims/ClaimTypes.xml b/xml/System.IdentityModel.Claims/ClaimTypes.xml index ead2b98f700..2a822434be3 100644 --- a/xml/System.IdentityModel.Claims/ClaimTypes.xml +++ b/xml/System.IdentityModel.Claims/ClaimTypes.xml @@ -37,7 +37,7 @@ class to search for a particular type of claim in a or to create a claim. To search for a particular type of claim in a , use the method and use the properties of this class to specify the claim type for the `claimType` parameter. When the constructor for the class is used to create a new claim, use the properties of the class to specify the `claimType` parameter. For many of the claim types, the class has static properties that return a claim of a specific type. For instance, the method returns a claim using the claim type. + Use the class to search for a particular type of claim in a or to create a claim. To search for a particular type of claim in a , use the method and use the properties of this class to specify the claim type for the `claimType` parameter. When the constructor for the class is used to create a new claim, use the properties of the class to specify the `claimType` parameter. For many of the claim types, the class has static properties that return a claim of a specific type. For instance, the method returns a claim using the claim type. diff --git a/xml/System.IdentityModel.Claims/DefaultClaimSet.xml b/xml/System.IdentityModel.Claims/DefaultClaimSet.xml index 1d0ca93ee04..6352d3f0b11 100644 --- a/xml/System.IdentityModel.Claims/DefaultClaimSet.xml +++ b/xml/System.IdentityModel.Claims/DefaultClaimSet.xml @@ -443,7 +443,7 @@ method. + The constructors that take at least one parameter call the method. ]]> diff --git a/xml/System.IdentityModel.Tokens/BootstrapContext.xml b/xml/System.IdentityModel.Tokens/BootstrapContext.xml index b61a16a093b..a34dac3e5db 100644 --- a/xml/System.IdentityModel.Tokens/BootstrapContext.xml +++ b/xml/System.IdentityModel.Tokens/BootstrapContext.xml @@ -281,7 +281,7 @@ constructor was used; otherwise it is `null`. + This property is only set if the constructor was used; otherwise it is `null`. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlAttributeStatement.xml b/xml/System.IdentityModel.Tokens/SamlAttributeStatement.xml index 05c0ab87df5..5f565da67c9 100644 --- a/xml/System.IdentityModel.Tokens/SamlAttributeStatement.xml +++ b/xml/System.IdentityModel.Tokens/SamlAttributeStatement.xml @@ -125,7 +125,7 @@ method to convert a set of claims into attributes of a SAML assertion. + Use the method to convert a set of claims into attributes of a SAML assertion. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlAudienceRestrictionCondition.xml b/xml/System.IdentityModel.Tokens/SamlAudienceRestrictionCondition.xml index f48d0b4cb28..df8d7e2346c 100644 --- a/xml/System.IdentityModel.Tokens/SamlAudienceRestrictionCondition.xml +++ b/xml/System.IdentityModel.Tokens/SamlAudienceRestrictionCondition.xml @@ -24,7 +24,7 @@ Use the class to specify a is intended for a specific audience and that the issuing SAML authority does not warrant the SAML assertion for other audiences that receive the security token. The claims for security tokens are expressed as part of a , which can optionally have a set of conditions affect the validity of the assertion. One of those conditions is a , which specifies that the assertion is addressed to one or more specific audiences. The issuing SAML authority cannot prevent an unintended recipient from taking action on the basis of the information provided in the SAML assertion. However, the class allows the SAML authority to state explicitly that no warranty is provided to such a party in a machine- and human-readable form. - To specify the set of intended audiences, use the constructor that accepts a set of audiences. To get the set of intended audiences, access the property. + To specify the set of intended audiences, use the constructor that accepts a set of audiences. To get the set of intended audiences, access the property. ]]> @@ -116,7 +116,7 @@ property, use the constructor that accepts a set of audiences. + To set the property, use the constructor that accepts a set of audiences. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlAuthenticationStatement.xml b/xml/System.IdentityModel.Tokens/SamlAuthenticationStatement.xml index 678a7dfe259..5c0713ca56b 100644 --- a/xml/System.IdentityModel.Tokens/SamlAuthenticationStatement.xml +++ b/xml/System.IdentityModel.Tokens/SamlAuthenticationStatement.xml @@ -135,7 +135,7 @@ method adds a claim to the `claims` parameter based on the , , , , , , and properties. + The method adds a claim to the `claims` parameter based on the , , , , , , and properties. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlAuthorizationDecisionStatement.xml b/xml/System.IdentityModel.Tokens/SamlAuthorizationDecisionStatement.xml index e16bc917f97..0462d80182e 100644 --- a/xml/System.IdentityModel.Tokens/SamlAuthorizationDecisionStatement.xml +++ b/xml/System.IdentityModel.Tokens/SamlAuthorizationDecisionStatement.xml @@ -221,7 +221,7 @@ method adds a claim to the `claims` parameter for each action specified in the property. Each claim that is added to the collection is based on the action, and the , , and properties. The claim resource type is . + The method adds a claim to the `claims` parameter for each action specified in the property. Each claim that is added to the collection is based on the action, and the , , and properties. The claim resource type is . ]]> From d64130a5e3a91ed1a91b4fc5a9f59c4bbb41bb14 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:06:22 -0700 Subject: [PATCH 8/8] respond to ccr feedback --- .../UserNameSecurityTokenAuthenticator.xml | 4 +--- .../X509CertificateValidator.xml | 5 +---- .../SignInRequestMessage.xml | 10 ++++------ xml/System.IdentityModel.Tokens/SamlAction.xml | 3 +-- .../SamlDoNotCacheCondition.xml | 3 +-- 5 files changed, 8 insertions(+), 17 deletions(-) diff --git a/xml/System.IdentityModel.Selectors/UserNameSecurityTokenAuthenticator.xml b/xml/System.IdentityModel.Selectors/UserNameSecurityTokenAuthenticator.xml index 7509e0054b8..964c7f0dea3 100644 --- a/xml/System.IdentityModel.Selectors/UserNameSecurityTokenAuthenticator.xml +++ b/xml/System.IdentityModel.Selectors/UserNameSecurityTokenAuthenticator.xml @@ -29,9 +29,7 @@ ||Allows an application to provide a custom authentication scheme for user names and passwords. The authentication scheme is provided using a class deriving from the class.| ||Authenticates the user name and password as a Windows account.| - Most custom authentication schemes can use the use the class and implement a class that derives from the class. However, if additional flexibility is needed, you can derive a class from the class and override the method. - - + Most custom authentication schemes can use the class and implement a class that derives from the class. However, if additional flexibility is needed, you can derive a class from the class and override the method. ## Examples :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/usernamesecuritytokenauthenticator/cs/mytokenauthenticator.cs" id="Snippet0"::: diff --git a/xml/System.IdentityModel.Selectors/X509CertificateValidator.xml b/xml/System.IdentityModel.Selectors/X509CertificateValidator.xml index 2e703ee3111..88b0ee55fec 100644 --- a/xml/System.IdentityModel.Selectors/X509CertificateValidator.xml +++ b/xml/System.IdentityModel.Selectors/X509CertificateValidator.xml @@ -54,10 +54,7 @@ class to specify how an X.509 certificate is deemed valid. This can be done using by deriving a class from and overriding the method. - - +Use the class to specify how an X.509 certificate is deemed valid. This can be done by deriving a class from and overriding the method. ## Examples :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/c_x509certificatevalidator/cs/source.cs" id="Snippet1"::: diff --git a/xml/System.IdentityModel.Services/SignInRequestMessage.xml b/xml/System.IdentityModel.Services/SignInRequestMessage.xml index 68c79b7b7a1..5928299c4fc 100644 --- a/xml/System.IdentityModel.Services/SignInRequestMessage.xml +++ b/xml/System.IdentityModel.Services/SignInRequestMessage.xml @@ -14,24 +14,22 @@ - Represents a WS-Federation Sign-In Request message. + Represents a WS-Federation sign-in request message. message is created by the static methods of the class, for example the method, when the wa parameter is set to "wsignin1.0", there is no wresult or wresultptr parameter present, and either a wtrealm parameter or a wreply parameter is present. + A message is created by the static methods of the class, for example the method, when the wa parameter is set to "wsignin1.0", there is no `wresult` or `wresultptr` parameter present, and either a `wtrealm` parameter or a `wreply` parameter is present. > [!IMPORTANT] -> For backward compatibility with Active Directory Federation Services (AD FS) version 1.0, Windows Identity Foundation (WIF) allows either the wtrealm parameter or the wreply parameter to be set (or both) for a sign-in message to be valid; however, the WS-Federation protocol requires that the wtrealm parameter be present in a sign-in request. In most scenarios, you should ensure that the wtrealm parameter is specified. +> For backward compatibility with Active Directory Federation Services (AD FS) version 1.0, Windows Identity Foundation (WIF) allows either the wtrealm parameter or the wreply parameter to be set (or both) for a sign-in message to be valid; however, the WS-Federation protocol requires that the wtrealm parameter be present in a sign-in request. In most scenarios, you should ensure that the wtrealm parameter is specified. The class exposes several properties that can be used to set or access individual message parameters. These parameters can also be set or accessed through the dictionary. For example, you can read the wtrealm parameter in the message either through the property or by specifying "wtrealm" as the key to the dictionary. [!INCLUDE[wif_wsfed_ref](~/includes/wif-wsfed-ref-md.md)] - - ## Examples :::code language="csharp" source="~/snippets/csharp/System.IdentityModel.Services/SignInRequestMessage/Overview/default.aspx.cs" id="Snippet2"::: diff --git a/xml/System.IdentityModel.Tokens/SamlAction.xml b/xml/System.IdentityModel.Tokens/SamlAction.xml index 429f9b8ca3a..3c7e58f9262 100644 --- a/xml/System.IdentityModel.Tokens/SamlAction.xml +++ b/xml/System.IdentityModel.Tokens/SamlAction.xml @@ -204,8 +204,7 @@ class read-only, call the method. +To make this instance of the class read-only, call the method. ]]> diff --git a/xml/System.IdentityModel.Tokens/SamlDoNotCacheCondition.xml b/xml/System.IdentityModel.Tokens/SamlDoNotCacheCondition.xml index f1c863fa71c..ee99f28efe5 100644 --- a/xml/System.IdentityModel.Tokens/SamlDoNotCacheCondition.xml +++ b/xml/System.IdentityModel.Tokens/SamlDoNotCacheCondition.xml @@ -148,8 +148,7 @@ method does note set any properties. +The method does not set any properties. ]]>