コード例 #1
0
        public override MethodInfo[] GetAccessors(bool nonPublic)
        {
            MonoPropertyInfo info;
            int nget = 0;
            int nset = 0;

            MonoPropertyInfo.get_property_info(this, out info, PInfo.GetMethod | PInfo.SetMethod);
            if (info.set_method != null && (nonPublic || info.set_method.IsPublic))
            {
                nset = 1;
            }
            if (info.get_method != null && (nonPublic || info.get_method.IsPublic))
            {
                nget = 1;
            }

            MethodInfo[] res = new MethodInfo [nget + nset];
            int          n   = 0;

            if (nset != 0)
            {
                res [n++] = info.set_method;
            }
            if (nget != 0)
            {
                res [n++] = info.get_method;
            }
            return(res);
        }
コード例 #2
0
#pragma warning restore 649

        void CachePropertyInfo(PInfo flags)
        {
            if ((cached & flags) != flags)
            {
                MonoPropertyInfo.get_property_info(this, ref info, flags);
                cached |= flags;
            }
        }
コード例 #3
0
 private void CachePropertyInfo(PInfo flags)
 {
     if ((this.cached & flags) != flags)
     {
         MonoPropertyInfo.get_property_info(this, ref this.info, flags);
         this.cached |= flags;
     }
 }
コード例 #4
0
 public override Type[] GetRequiredCustomModifiers()
 {
     Type[] types = MonoPropertyInfo.GetTypeModifiers(this, false);
     if (types == null)
     {
         return(Type.EmptyTypes);
     }
     return(types);
 }
コード例 #5
0
 public override Type[] GetOptionalCustomModifiers()
 {
     Type[] types = MonoPropertyInfo.GetTypeModifiers(this, true);
     if (types == null)
     {
         return(Type.EmptyTypes);
     }
     return(types);
 }
コード例 #6
0
        public override ParameterInfo[] GetIndexParameters()
        {
            MonoPropertyInfo info;

            MonoPropertyInfo.get_property_info(this, out info, PInfo.GetMethod);
            if (info.get_method != null)
            {
                return(info.get_method.GetParameters());
            }
            return(new ParameterInfo [0]);
        }
コード例 #7
0
 public override MethodInfo GetSetMethod(bool nonPublic)
 {
     if ((cached & PInfo.SetMethod) == 0)
     {
         MonoPropertyInfo.get_property_info(this, out info, PInfo.SetMethod);
         cached |= PInfo.SetMethod;
     }
     if (info.set_method != null && (nonPublic || info.set_method.IsPublic))
     {
         return(info.set_method);
     }
     else
     {
         return(null);
     }
 }
コード例 #8
0
 internal static extern void get_property_info(RuntimePropertyInfo prop, ref MonoPropertyInfo info,
                                               PInfo req_info);
コード例 #9
0
 public override object GetRawConstantValue()
 {
     return(MonoPropertyInfo.get_default_value(this));
 }
コード例 #10
0
 private Type[] GetCustomModifiers(bool optional) => MonoPropertyInfo.GetTypeModifiers(this, optional) ?? Type.EmptyTypes;
コード例 #11
0
 internal static void get_property_info(MonoProperty prop, ref MonoPropertyInfo info,
                                        PInfo req_info)
 {
     throw new System.NotImplementedException();
 }
コード例 #12
0
 internal static extern void get_property_info(MonoProperty prop, out MonoPropertyInfo info,
                                               PInfo req_info);
コード例 #13
0
		internal static void get_property_info (MonoProperty prop, ref MonoPropertyInfo info,
		PInfo req_info)
		{
			throw new System.NotImplementedException();
		}
コード例 #14
0
		internal static extern void get_property_info (MonoProperty prop, ref MonoPropertyInfo info,
		PInfo req_info);