System.ServiceModel.ProxyGeneratorBase.CreateProxyTypeOperations C# (CSharp) Method

CreateProxyTypeOperations() protected static method

protected static CreateProxyTypeOperations ( Type crtype, Mono.CodeGeneration.CodeClass c, ContractDescription cd ) : Type
crtype System.Type
c Mono.CodeGeneration.CodeClass
cd System.ServiceModel.Description.ContractDescription
return System.Type
		protected static Type CreateProxyTypeOperations (Type crtype, CodeClass c, ContractDescription cd)
		{
			// member implementation
			BindingFlags bf = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance;
			foreach (OperationDescription od in cd.Operations) {
				// FIXME: handle properties and events.
#if !NET_2_1
				if (od.SyncMethod != null)
					GenerateMethodImpl (c, crtype.GetMethod ("Process", bf), od.Name, od.SyncMethod);
#endif
				if (od.BeginMethod != null)
					GenerateBeginMethodImpl (c, crtype.GetMethod ("BeginProcess", bf), od.Name, od.BeginMethod);
				if (od.EndMethod != null)
					GenerateEndMethodImpl (c, crtype.GetMethod ("EndProcess", bf), od.Name, od.EndMethod);
			}

			Type ret = c.CreateType ();
			return ret;
		}