Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
207 lines (189 sloc) 13.2 KB
<Type Name="DispatcherProcessingDisabled" FullName="System.Windows.Threading.DispatcherProcessingDisabled">
<TypeSignature Language="C#" Value="public struct DispatcherProcessingDisabled : IDisposable" />
<TypeSignature Language="ILAsm" Value=".class public sequential ansi sealed beforefieldinit DispatcherProcessingDisabled extends System.ValueType implements class System.IDisposable" />
<TypeSignature Language="DocId" Value="T:System.Windows.Threading.DispatcherProcessingDisabled" />
<TypeSignature Language="VB.NET" Value="Public Structure DispatcherProcessingDisabled&#xA;Implements IDisposable" />
<TypeSignature Language="C++ CLI" Value="public value class DispatcherProcessingDisabled : IDisposable" />
<TypeSignature Language="F#" Value="type DispatcherProcessingDisabled = struct&#xA; interface IDisposable" />
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Docs>
<summary>Represents the Dispatcher when it is in a disable state and provides a means to re-enable dispatcher processing.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Windows.Threading.Dispatcher.DisableProcessing%2A> returns a <xref:System.Windows.Threading.DispatcherProcessingDisabled> object when it is called.
Disabling dispatcher processing is an advanced method that is intended to eliminate the chance of unrelated reentrancy.
The effects of disabling processing are as follows:
- CLR locks will not pump messages internally.
- <xref:System.Windows.Threading.DispatcherFrame> objects are not allowed to be pushed.
- Message processing is not permitted.
Calling <xref:System.Windows.Threading.DispatcherProcessingDisabled.Dispose%2A> on the <xref:System.Windows.Threading.DispatcherProcessingDisabled> object will re-enable dispatcher processing.
## Examples
The following example shows how to disable dispatcher processing and re-enable dispatcher processing. <xref:System.Windows.Threading.Dispatcher.DisableProcessing%2A> is called in a **using** statement. <xref:System.Windows.Threading.Dispatcher.DisableProcessing%2A> returns a <xref:System.Windows.Threading.DispatcherProcessingDisabled> structure which is used as the object to be disposed when the **using** block finishes. Calling <xref:System.Windows.Threading.DispatcherProcessingDisabled.Dispose%2A> on the <xref:System.Windows.Threading.DispatcherProcessingDisabled> structure re-enables dispatcher processing.
[!code-csharp[DispatcherSnippets#DispatcherDisableProcessing](~/samples/snippets/csharp/VS_Snippets_Wpf/DispatcherSnippets/CSharp/Window1.xaml.cs#dispatcherdisableprocessing)]
[!code-vb[DispatcherSnippets#DispatcherDisableProcessing](~/samples/snippets/visualbasic/VS_Snippets_Wpf/DispatcherSnippets/visualbasic/window1.xaml.vb#dispatcherdisableprocessing)]
]]></format>
</remarks>
<altmember cref="M:System.Windows.Threading.Dispatcher.DisableProcessing" />
</Docs>
<Members>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Threading.DispatcherProcessingDisabled.Dispose" />
<MemberSignature Language="VB.NET" Value="Public Sub Dispose ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Dispose();" />
<MemberSignature Language="F#" Value="abstract member Dispose : unit -&gt; unit&#xA;override this.Dispose : unit -&gt; unit" Usage="dispatcherProcessingDisabled.Dispose " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Re-enables dispatcher processing.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Disabling dispatcher processing is an advanced method that is intended to eliminate the chance of unrelated reentrancy.
The effects of disabling processing are as follows:
- CLR locks will not pump messages internally.
- <xref:System.Windows.Threading.DispatcherFrame> objects are not allowed to be pushed.
- Message processing is not permitted.
]]></format>
</remarks>
<altmember cref="M:System.Windows.Threading.Dispatcher.DisableProcessing" />
</Docs>
</Member>
<Member MemberName="Equals">
<MemberSignature Language="C#" Value="public override bool Equals (object obj);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object obj) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Threading.DispatcherProcessingDisabled.Equals(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function Equals (obj As Object) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override bool Equals(System::Object ^ obj);" />
<MemberSignature Language="F#" Value="override this.Equals : obj -&gt; bool" Usage="dispatcherProcessingDisabled.Equals obj" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="obj" Type="System.Object" />
</Parameters>
<Docs>
<param name="obj">The object to evaluate for equality.</param>
<summary>Determines whether the specified <see cref="T:System.Windows.Threading.DispatcherProcessingDisabled" /> object is equal to this <see cref="T:System.Windows.Threading.DispatcherProcessingDisabled" /> object.</summary>
<returns>
<see langword="true" /> if the specified object is equal to this <see cref="T:System.Windows.Threading.DispatcherProcessingDisabled" /> object; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetHashCode">
<MemberSignature Language="C#" Value="public override int GetHashCode ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Threading.DispatcherProcessingDisabled.GetHashCode" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetHashCode () As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetHashCode();" />
<MemberSignature Language="F#" Value="override this.GetHashCode : unit -&gt; int" Usage="dispatcherProcessingDisabled.GetHashCode " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets a hash code for this instance.</summary>
<returns>A signed 32-bit integer hash code.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="op_Equality">
<MemberSignature Language="C#" Value="public static bool operator == (System.Windows.Threading.DispatcherProcessingDisabled left, System.Windows.Threading.DispatcherProcessingDisabled right);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname bool op_Equality(valuetype System.Windows.Threading.DispatcherProcessingDisabled left, valuetype System.Windows.Threading.DispatcherProcessingDisabled right) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Threading.DispatcherProcessingDisabled.op_Equality(System.Windows.Threading.DispatcherProcessingDisabled,System.Windows.Threading.DispatcherProcessingDisabled)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator == (left As DispatcherProcessingDisabled, right As DispatcherProcessingDisabled) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool operator ==(System::Windows::Threading::DispatcherProcessingDisabled left, System::Windows::Threading::DispatcherProcessingDisabled right);" />
<MemberSignature Language="F#" Value="static member ( = ) : System.Windows.Threading.DispatcherProcessingDisabled * System.Windows.Threading.DispatcherProcessingDisabled -&gt; bool" Usage="left = right" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="left" Type="System.Windows.Threading.DispatcherProcessingDisabled" />
<Parameter Name="right" Type="System.Windows.Threading.DispatcherProcessingDisabled" />
</Parameters>
<Docs>
<param name="left">The first object to compare.</param>
<param name="right">The second object to compare.</param>
<summary>Determines whether two <see cref="T:System.Windows.Threading.DispatcherProcessingDisabled" /> objects are equal.</summary>
<returns>
<see langword="true" /> if the <see cref="T:System.Windows.Threading.DispatcherProcessingDisabled" /> objects are equal; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Threading.DispatcherProcessingDisabled.Equals(System.Object)" />
</Docs>
</Member>
<Member MemberName="op_Inequality">
<MemberSignature Language="C#" Value="public static bool operator != (System.Windows.Threading.DispatcherProcessingDisabled left, System.Windows.Threading.DispatcherProcessingDisabled right);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname bool op_Inequality(valuetype System.Windows.Threading.DispatcherProcessingDisabled left, valuetype System.Windows.Threading.DispatcherProcessingDisabled right) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Threading.DispatcherProcessingDisabled.op_Inequality(System.Windows.Threading.DispatcherProcessingDisabled,System.Windows.Threading.DispatcherProcessingDisabled)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator != (left As DispatcherProcessingDisabled, right As DispatcherProcessingDisabled) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool operator !=(System::Windows::Threading::DispatcherProcessingDisabled left, System::Windows::Threading::DispatcherProcessingDisabled right);" />
<MemberSignature Language="F#" Value="static member op_Inequality : System.Windows.Threading.DispatcherProcessingDisabled * System.Windows.Threading.DispatcherProcessingDisabled -&gt; bool" Usage="System.Windows.Threading.DispatcherProcessingDisabled.op_Inequality (left, right)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>WindowsBase</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="left" Type="System.Windows.Threading.DispatcherProcessingDisabled" />
<Parameter Name="right" Type="System.Windows.Threading.DispatcherProcessingDisabled" />
</Parameters>
<Docs>
<param name="left">The first object to compare.</param>
<param name="right">The second object to compare.</param>
<summary>Determines whether two <see cref="T:System.Windows.Threading.DispatcherProcessingDisabled" /> objects are not equal.</summary>
<returns>
<see langword="true" /> if the <see cref="T:System.Windows.Threading.DispatcherProcessingDisabled" /> objects are not equal; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<altmember cref="M:System.Windows.Threading.DispatcherProcessingDisabled.op_Equality(System.Windows.Threading.DispatcherProcessingDisabled,System.Windows.Threading.DispatcherProcessingDisabled)" />
<altmember cref="M:System.Windows.Threading.DispatcherProcessingDisabled.Equals(System.Object)" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.