10using System.Reflection;
14 internal class DataPortalMethodInfo
16 public bool RunLocal {
get;
private set; }
17#if !(ANDROID || IOS) && !NETFX_CORE
18 public TransactionalAttribute TransactionalAttribute {
get;
private set; }
23 public DataPortalMethodInfo()
25#if !(ANDROID || IOS) && !NETFX_CORE
33 public DataPortalMethodInfo(System.Reflection.MethodInfo info)
38 RunLocal = IsRunLocal(info);
39#if !(ANDROID || IOS) && !NETFX_CORE
40 TransactionalAttribute = GetTransactionalAttribute(info);
47 private static bool IsRunLocal(System.Reflection.MethodInfo method)
50 return method.CustomAttributes.Count(r => r.AttributeType.Equals(typeof(RunLocalAttribute))) > 0;
52 return Attribute.IsDefined(method, typeof(RunLocalAttribute),
false);
56#if !(ANDROID || IOS) && !NETFX_CORE
57 private static bool IsTransactionalMethod(System.Reflection.MethodInfo method)
59 return Attribute.IsDefined(method, typeof(TransactionalAttribute));
62 private static TransactionalAttribute GetTransactionalAttribute(System.Reflection.MethodInfo method)
64 TransactionalAttribute result;
65 if (IsTransactionalMethod(method))
68 (TransactionalAttribute)Attribute.GetCustomAttribute(
69 method, typeof(TransactionalAttribute));
TransactionalTypes
Provides a list of possible transactional technologies to be used by the server-side DataPortal.