File: IInstanceContextProvider.xml

package info (click to toggle)
mono 6.12.0.199%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,296,836 kB
  • sloc: cs: 11,181,803; xml: 2,850,076; ansic: 699,709; cpp: 123,344; perl: 59,361; javascript: 30,841; asm: 21,853; makefile: 20,405; sh: 15,009; python: 4,839; pascal: 925; sql: 859; sed: 16; php: 1
file content (155 lines) | stat: -rw-r--r-- 13,674 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?xml version="1.0" encoding="utf-8"?>
<Type Name="IInstanceContextProvider" FullName="System.ServiceModel.Dispatcher.IInstanceContextProvider">
  <TypeSignature Language="C#" Value="public interface IInstanceContextProvider" />
  <TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IInstanceContextProvider" />
  <AssemblyInfo>
    <AssemblyName>System.ServiceModel</AssemblyName>
    <AssemblyVersion>4.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Interfaces />
  <Docs>
    <remarks>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>Implement the <see cref="T:System.ServiceModel.Dispatcher.IInstanceContextProvider" /> interface to provide the appropriate <see cref="T:System.ServiceModel.InstanceContext" /> object to the system. Typically, this interface is implemented to support shared sessions, enable service instance pooling, control lifetimes of service instances, or to group contexts among clients.</para>
      <para>For example, to implement sharing, insert a custom <see cref="T:System.ServiceModel.Dispatcher.IInstanceContextProvider" /> to decide which session or call from a client is associated with which <see cref="T:System.ServiceModel.InstanceContext" /> object. For an example that demonstrates the sharing of instance contexts, see <format type="text/html"><a href="4a6a46d7-b7d7-4bb5-a0dd-03ffa3cbc230">InstanceContextSharing</a></format>.</para>
      <block subset="none" type="note">
        <para>When an <see cref="T:System.ServiceModel.Dispatcher.IInstanceContextProvider" /> is inserted into indigo1, the normal property that controls the creation of <see cref="T:System.ServiceModel.InstanceContext" /> objects (the <see cref="P:System.ServiceModel.ServiceBehaviorAttribute.InstanceContextMode" /> property) is no longer checked and has no effect.</para>
      </block>
      <para>A more generic mechanism by which you can initialize <see cref="T:System.ServiceModel.InstanceContext" /> objects when created (for example, to attach custom extensions to each <see cref="T:System.ServiceModel.InstanceContext" />) is the <see cref="T:System.ServiceModel.Dispatcher.IInstanceContextInitializer" />.</para>
    </remarks>
    <summary>
      <attribution license="cc4" from="Microsoft" modified="false" />
      <para>Implement to participate in the creation or choosing of a <see cref="T:System.ServiceModel.InstanceContext" /> object, especially to enable shared sessions.</para>
    </summary>
  </Docs>
  <Members>
    <Member MemberName="GetExistingInstanceContext">
      <MemberSignature Language="C#" Value="public System.ServiceModel.InstanceContext GetExistingInstanceContext (System.ServiceModel.Channels.Message message, System.ServiceModel.IContextChannel channel);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.ServiceModel.InstanceContext GetExistingInstanceContext(class System.ServiceModel.Channels.Message message, class System.ServiceModel.IContextChannel channel) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.ServiceModel.InstanceContext</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="message" Type="System.ServiceModel.Channels.Message" />
        <Parameter Name="channel" Type="System.ServiceModel.IContextChannel" />
      </Parameters>
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The <see cref="M:System.ServiceModel.Dispatcher.IInstanceContextProvider.GetExistingInstanceContext(System.ServiceModel.Channels.Message,System.ServiceModel.IContextChannel)" /> method is called when a message is received. Return the <see cref="T:System.ServiceModel.InstanceContext" /> object that you want to process the message, or null. In the case of null, indigo2 creates a new <see cref="T:System.ServiceModel.InstanceContext" /> object for the message and then calls the <see cref="M:System.ServiceModel.Dispatcher.IInstanceContextProvider.InitializeInstanceContext(System.ServiceModel.InstanceContext,System.ServiceModel.Channels.Message,System.ServiceModel.IContextChannel)" /> method.</para>
          <para>If you return null, the new <see cref="T:System.ServiceModel.InstanceContext" /> object goes through the throttling system and increments the count of <see cref="P:System.ServiceModel.Dispatcher.ServiceThrottle.MaxConcurrentInstances" />.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Called when a new message is received.</para>
        </summary>
        <returns>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The <see cref="T:System.ServiceModel.InstanceContext" /> object that is used to process the message; return null to instruct indigo2 to create a new <see cref="T:System.ServiceModel.InstanceContext" /> object.</para>
        </returns>
        <param name="message">
          <attribution license="cc4" from="Microsoft" modified="false" />The incoming message.</param>
        <param name="channel">
          <attribution license="cc4" from="Microsoft" modified="false" />The channel that received the message.</param>
      </Docs>
    </Member>
    <Member MemberName="InitializeInstanceContext">
      <MemberSignature Language="C#" Value="public void InitializeInstanceContext (System.ServiceModel.InstanceContext instanceContext, System.ServiceModel.Channels.Message message, System.ServiceModel.IContextChannel channel);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void InitializeInstanceContext(class System.ServiceModel.InstanceContext instanceContext, class System.ServiceModel.Channels.Message message, class System.ServiceModel.IContextChannel channel) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="instanceContext" Type="System.ServiceModel.InstanceContext" />
        <Parameter Name="message" Type="System.ServiceModel.Channels.Message" />
        <Parameter Name="channel" Type="System.ServiceModel.IContextChannel" />
      </Parameters>
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>
            <see cref="M:System.ServiceModel.Dispatcher.IInstanceContextProvider.InitializeInstanceContext(System.ServiceModel.InstanceContext,System.ServiceModel.Channels.Message,System.ServiceModel.IContextChannel)" /> is called when <see cref="M:System.ServiceModel.Dispatcher.IInstanceContextProvider.GetExistingInstanceContext(System.ServiceModel.Channels.Message,System.ServiceModel.IContextChannel)" /> returns null and a new <see cref="T:System.ServiceModel.InstanceContext" /> object is created. This method is called to notify you that a new <see cref="T:System.ServiceModel.InstanceContext" /> has been created.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Called when null is returned from the <see cref="M:System.ServiceModel.Dispatcher.IInstanceContextProvider.GetExistingInstanceContext(System.ServiceModel.Channels.Message,System.ServiceModel.IContextChannel)" /> method.</para>
        </summary>
        <param name="instanceContext">
          <attribution license="cc4" from="Microsoft" modified="false" />The new <see cref="T:System.ServiceModel.InstanceContext" /> object.</param>
        <param name="message">
          <attribution license="cc4" from="Microsoft" modified="false" />The incoming message.</param>
        <param name="channel">
          <attribution license="cc4" from="Microsoft" modified="false" />The channel that received the message.</param>
      </Docs>
    </Member>
    <Member MemberName="IsIdle">
      <MemberSignature Language="C#" Value="public bool IsIdle (System.ServiceModel.InstanceContext instanceContext);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool IsIdle(class System.ServiceModel.InstanceContext instanceContext) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="instanceContext" Type="System.ServiceModel.InstanceContext" />
      </Parameters>
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>
            <see cref="M:System.ServiceModel.Dispatcher.IInstanceContextProvider.IsIdle(System.ServiceModel.InstanceContext)" /> is called when indigo2 is about to close and recycle an idle <see cref="T:System.ServiceModel.InstanceContext" /> object so that you can inform the runtime whether to continue doing so. </para>
          <para>For an example that demonstrates the sharing of instance contexts, see <format type="text/html"><a href="4a6a46d7-b7d7-4bb5-a0dd-03ffa3cbc230">InstanceContextSharing</a></format>.</para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Called when all <see cref="T:System.ServiceModel.InstanceContext" /> activities have completed to enable implementers to prevent the <see cref="T:System.ServiceModel.InstanceContext" /> from being recycled.</para>
        </summary>
        <returns>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>true if indigo1 is to close and recycle the <see cref="T:System.ServiceModel.InstanceContext" /> object and adjust the value of <see cref="P:System.ServiceModel.Dispatcher.ServiceThrottle.MaxConcurrentInstances" />; otherwise, false.</para>
        </returns>
        <param name="instanceContext">
          <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.ServiceModel.InstanceContext" /> object that is considered idle.</param>
      </Docs>
    </Member>
    <Member MemberName="NotifyIdle">
      <MemberSignature Language="C#" Value="public void NotifyIdle (System.ServiceModel.Dispatcher.InstanceContextIdleCallback callback, System.ServiceModel.InstanceContext instanceContext);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void NotifyIdle(class System.ServiceModel.Dispatcher.InstanceContextIdleCallback callback, class System.ServiceModel.InstanceContext instanceContext) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>4.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="callback" Type="System.ServiceModel.Dispatcher.InstanceContextIdleCallback" />
        <Parameter Name="instanceContext" Type="System.ServiceModel.InstanceContext" />
      </Parameters>
      <Docs>
        <remarks>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>The <see cref="M:System.ServiceModel.Dispatcher.IInstanceContextProvider.NotifyIdle(System.ServiceModel.Dispatcher.InstanceContextIdleCallback,System.ServiceModel.InstanceContext)" /> method is called when the <see cref="M:System.ServiceModel.Dispatcher.IInstanceContextProvider.IsIdle(System.ServiceModel.InstanceContext)" /> method returns false to enable you to provide indigo2 with a <see cref="T:System.ServiceModel.Dispatcher.InstanceContextIdleCallback" /> object that you use to inform the runtime that the <see cref="T:System.ServiceModel.InstanceContext" /> has finished its work. When the <see cref="T:System.ServiceModel.Dispatcher.InstanceContextIdleCallback" /> object notifies the runtime that the <see cref="T:System.ServiceModel.InstanceContext" /> has finished its work, indigo2 calls <see cref="M:System.ServiceModel.Dispatcher.IInstanceContextProvider.IsIdle(System.ServiceModel.InstanceContext)" /> once again. This cycle continues until <see cref="M:System.ServiceModel.Dispatcher.IInstanceContextProvider.IsIdle(System.ServiceModel.InstanceContext)" /> returns true and the context is closed and recycled. </para>
        </remarks>
        <summary>
          <attribution license="cc4" from="Microsoft" modified="false" />
          <para>Called when the <see cref="M:System.ServiceModel.Dispatcher.IInstanceContextProvider.IsIdle(System.ServiceModel.InstanceContext)" /> method returns false to enable implementers to provide a callback to notify indigo2 when the <see cref="T:System.ServiceModel.InstanceContext" /> object is finished.</para>
        </summary>
        <param name="callback">
          <attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.ServiceModel.Dispatcher.InstanceContextIdleCallback" /> object that notifies indigo2 when the <see cref="T:System.ServiceModel.InstanceContext" /> object is to be closed and recycled.</param>
        <param name="instanceContext">
          <attribution license="cc4" from="Microsoft" modified="false" />The current <see cref="T:System.ServiceModel.InstanceContext" />. </param>
      </Docs>
    </Member>
  </Members>
</Type>