public bool TryGetMethodData(MethodBase method, out ServiceChannelProxy.MethodData methodData) { lock (this.ThisLock) { ServiceChannelProxy.MethodData[] methodDatas = this.methodDatas; int index = FindMethod(methodDatas, method); if (index >= 0) { methodData = methodDatas[index]; return(true); } methodData = new ServiceChannelProxy.MethodData(); return(false); } }
public void SetMethodData(ServiceChannelProxy.MethodData methodData) { lock (this.ThisLock) { if (FindMethod(this.methodDatas, methodData.MethodBase) < 0) { for (int i = 0; i < this.methodDatas.Length; i++) { if (this.methodDatas[i].MethodBase == null) { this.methodDatas[i] = methodData; goto Label_00B5; } } ServiceChannelProxy.MethodData[] destinationArray = new ServiceChannelProxy.MethodData[this.methodDatas.Length * 2]; Array.Copy(this.methodDatas, destinationArray, this.methodDatas.Length); destinationArray[this.methodDatas.Length] = methodData; this.methodDatas = destinationArray; } Label_00B5 :; } }
public bool TryGetMethodData(MethodBase method, out ServiceChannelProxy.MethodData methodData) { lock (this.ThisLock) { ServiceChannelProxy.MethodData[] methodDatas = this.methodDatas; int index = FindMethod(methodDatas, method); if (index >= 0) { methodData = methodDatas[index]; return true; } methodData = new ServiceChannelProxy.MethodData(); return false; } }
public void SetMethodData(ServiceChannelProxy.MethodData methodData) { lock (this.ThisLock) { if (FindMethod(this.methodDatas, methodData.MethodBase) < 0) { for (int i = 0; i < this.methodDatas.Length; i++) { if (this.methodDatas[i].MethodBase == null) { this.methodDatas[i] = methodData; goto Label_00B5; } } ServiceChannelProxy.MethodData[] destinationArray = new ServiceChannelProxy.MethodData[this.methodDatas.Length * 2]; Array.Copy(this.methodDatas, destinationArray, this.methodDatas.Length); destinationArray[this.methodDatas.Length] = methodData; this.methodDatas = destinationArray; } Label_00B5:; } }