• Home
  • Raw
  • Download

Lines Matching refs:T1

161         private class ReflectionHelper<T1, T2> : IReflectionHelper
170 var del = (Func<T1, int>) method.CreateDelegate(typeof(Func<T1, int>)); in CreateFuncIMessageInt32()
171 return message => del((T1) message); in CreateFuncIMessageInt32()
178 var del = (Func<T1, T2>) method.CreateDelegate(typeof(Func<T1, T2>)); in CreateFuncIMessageInt32()
179 return message => (int) (object) del((T1) message); in CreateFuncIMessageInt32()
185 var del = (Action<T1>) method.CreateDelegate(typeof(Action<T1>)); in CreateActionIMessage()
186 return message => del((T1) message); in CreateActionIMessage()
191 var del = (Func<T1, T2>) method.CreateDelegate(typeof(Func<T1, T2>)); in CreateFuncIMessageObject()
192 return message => del((T1) message); in CreateFuncIMessageObject()
197 var del = (Action<T1, T2>) method.CreateDelegate(typeof(Action<T1, T2>)); in CreateActionIMessageObject()
198 return (message, arg) => del((T1) message, (T2) arg); in CreateActionIMessageObject()
203 var del = (Func<T1, bool>)method.CreateDelegate(typeof(Func<T1, bool>)); in CreateFuncIMessageBool()
204 return message => del((T1)message); in CreateFuncIMessageBool()
208 private class ExtensionReflectionHelper<T1, T3> : IExtensionReflectionHelper
209 where T1 : IExtendableMessage<T1>
220 if (!(message is T1)) in GetExtension()
225 T1 extensionMessage = (T1)message; in GetExtension()
227 if (extension is Extension<T1, T3>) in GetExtension()
229 return extensionMessage.GetExtension(extension as Extension<T1, T3>); in GetExtension()
231 else if (extension is RepeatedExtension<T1, T3>) in GetExtension()
233 … return extensionMessage.GetOrInitializeExtension(extension as RepeatedExtension<T1, T3>); in GetExtension()
243 if (!(message is T1)) in HasExtension()
248 T1 extensionMessage = (T1)message; in HasExtension()
250 if (extension is Extension<T1, T3>) in HasExtension()
252 return extensionMessage.HasExtension(extension as Extension<T1, T3>); in HasExtension()
254 else if (extension is RepeatedExtension<T1, T3>) in HasExtension()
266 if (!(message is T1)) in SetExtension()
271 T1 extensionMessage = (T1)message; in SetExtension()
273 if (extension is Extension<T1, T3>) in SetExtension()
275 extensionMessage.SetExtension(extension as Extension<T1, T3>, (T3)value); in SetExtension()
277 else if (extension is RepeatedExtension<T1, T3>) in SetExtension()
289 if (!(message is T1)) in ClearExtension()
294 T1 extensionMessage = (T1)message; in ClearExtension()
296 if (extension is Extension<T1, T3>) in ClearExtension()
298 extensionMessage.ClearExtension(extension as Extension<T1, T3>); in ClearExtension()
300 else if (extension is RepeatedExtension<T1, T3>) in ClearExtension()
302 extensionMessage.GetExtension(extension as RepeatedExtension<T1, T3>).Clear(); in ClearExtension()
311 … private class ExtensionSetReflector<T1> : IExtensionSetReflector where T1 : IExtendableMessage<T1>
315 var prop = typeof(T1).GetTypeInfo().GetDeclaredProperty("_Extensions"); in CreateIsInitializedCaller()
317 …var getFunc = (Func<T1, ExtensionSet<T1>>)prop.GetGetMethod(true).CreateDelegate(typeof(Func<T1, E… in CreateIsInitializedCaller()
319 …var getFunc = (Func<T1, ExtensionSet<T1>>)prop.GetMethod.CreateDelegate(typeof(Func<T1, ExtensionS… in CreateIsInitializedCaller()
321 var initializedFunc = (Func<ExtensionSet<T1>, bool>) in CreateIsInitializedCaller()
322 typeof(ExtensionSet<T1>) in CreateIsInitializedCaller()
325 .CreateDelegate(typeof(Func<ExtensionSet<T1>, bool>)); in CreateIsInitializedCaller()
327 var set = getFunc((T1)m); in CreateIsInitializedCaller()