Esempio n. 1
0
        protected TargetEnumInfo(TargetType type, string name, int index, bool is_static,
					  TargetMemberAccessibility accessibility, int position,
					  int offset, bool has_const_value)
            : base(type, name, index, is_static, accessibility)
        {
            this.HasConstValue = has_const_value;
        }
Esempio n. 2
0
        protected TargetEventInfo(TargetType type, string name, int index,
					   bool is_static, TargetMemberAccessibility accessibility,
					   TargetFunctionType add, TargetFunctionType remove,
					   TargetFunctionType raise)
            : base(type, name, index, is_static, accessibility)
        {
            this.Add = add;
            this.Remove = remove;
            this.Raise = raise;
        }
Esempio n. 3
0
        private MonoEventInfo(IMonoStructType klass, int index, Cecil.EventDefinition einfo,
				       TargetType type, bool is_static,
				       TargetMemberAccessibility accessibility, MonoFunctionType add,
				       MonoFunctionType remove, MonoFunctionType raise)
            : base(type, einfo.Name, index, is_static, accessibility, add, remove, raise)
        {
            this.Klass = klass;
            this.AddType = add;
            this.RemoveType = remove;
            this.RaiseType = raise;
        }
		public static ObjectValueFlags GetAccessibility (TargetMemberAccessibility ma)
		{
			switch (ma) {
				case TargetMemberAccessibility.Internal: return ObjectValueFlags.Internal;
				case TargetMemberAccessibility.Protected: return ObjectValueFlags.Protected;
				case TargetMemberAccessibility.Public: return ObjectValueFlags.Public;
				default: return ObjectValueFlags.Private;
			}
		}
Esempio n. 5
0
        protected void FormatProperties(TargetClassType type,
						 TargetMemberAccessibility accessibility,
						 List<string> members, string prefix, Hashtable hash)
        {
            FormatProperties (type, false, accessibility, members, prefix, hash);
            FormatProperties (type, true, accessibility, members, prefix, hash);
        }
Esempio n. 6
0
        protected void FormatProperties(TargetClassType type, bool is_static,
						 TargetMemberAccessibility accessibility,
						 List<string> members, string prefix, Hashtable hash)
        {
            List<TargetPropertyInfo> list = new List<TargetPropertyInfo> ();
            foreach (TargetPropertyInfo property in type.Properties) {
                if (property.IsStatic != is_static)
                    continue;
                if (property.Accessibility != accessibility)
                    continue;
                list.Add (property);
            }
            if (list.Count == 0)
                return;

            foreach (TargetPropertyInfo property in list)
                members.Add (FormatProperty (prefix, property, is_static, hash));
        }
Esempio n. 7
0
        protected void FormatMethods(TargetClassType type, bool is_ctor, bool is_static,
					      TargetMemberAccessibility accessibility,
					      List<string> members, string prefix, Hashtable hash)
        {
            List<TargetMethodInfo> list = new List<TargetMethodInfo> ();
            TargetMethodInfo[] methods = is_ctor ? type.Constructors : type.Methods;
            foreach (TargetMethodInfo method in methods) {
                if (method.IsStatic != is_static)
                    continue;
                if (method.Accessibility != accessibility)
                    continue;
                list.Add (method);
            }
            if (list.Count == 0)
                return;

            foreach (TargetMethodInfo method in list)
                members.Add (FormatMethod (prefix, method, is_static, is_ctor, hash));
        }
Esempio n. 8
0
        protected void FormatFields(TargetClassType type, bool is_static,
					     TargetMemberAccessibility accessibility,
					     List<string> members, string prefix, Hashtable hash)
        {
            List<TargetFieldInfo> list = new List<TargetFieldInfo> ();
            foreach (TargetFieldInfo field in type.Fields) {
                if (field.IsStatic != is_static)
                    continue;
                if (field.Accessibility != accessibility)
                    continue;
                list.Add (field);
            }
            if (list.Count == 0)
                return;

            foreach (TargetFieldInfo field in list)
                members.Add (FormatMember (prefix, field, is_static, hash) + ";\n");
        }
Esempio n. 9
0
        protected void FormatEvents(TargetClassType type, bool is_static,
					     TargetMemberAccessibility accessibility,
					     List<string> members, string prefix, Hashtable hash)
        {
            List<TargetEventInfo> list = new List<TargetEventInfo> ();
            foreach (TargetEventInfo einfo in type.Events) {
                if (einfo.IsStatic != is_static)
                    continue;
                if (einfo.Accessibility != accessibility)
                    continue;
                list.Add (einfo);
            }
            if (list.Count == 0)
                return;

            foreach (TargetEventInfo einfo in list)
                members.Add (FormatEvent (prefix, einfo, is_static, hash));
        }
Esempio n. 10
0
        protected void FormatAccessibility(StringBuilder sb, string prefix,
						    TargetMemberAccessibility accessibility)
        {
            switch (accessibility) {
            case TargetMemberAccessibility.Public:
                sb.Append (prefix + "public:\n");
                break;
            case TargetMemberAccessibility.Protected:
                sb.Append (prefix + "protected:\n");
                break;
            case TargetMemberAccessibility.Internal:
                sb.Append (prefix + "internal:\n");
                break;
            default:
                sb.Append (prefix + "private:\n");
                break;
            }
        }
Esempio n. 11
0
        private MonoPropertyInfo(TargetType type, IMonoStructType klass, int index,
					  bool is_static, Cecil.PropertyDefinition pinfo,
					  TargetMemberAccessibility accessibility,
					  MonoFunctionType getter, MonoFunctionType setter)
            : base(type, pinfo.Name, index, is_static, accessibility, getter, setter)
        {
            this.Klass = klass;
            this.GetterType = getter;
            this.SetterType = setter;

            bool is_compiler_generated;
            DebuggerTypeProxyAttribute type_proxy;
            MonoSymbolFile.CheckCustomAttributes (pinfo,
                                  out browsable_state,
                                  out debugger_display,
                                  out type_proxy,
                                  out is_compiler_generated);
        }
Esempio n. 12
0
        protected TargetPropertyInfo(TargetType type, string name, int index,
					      bool is_static, TargetMemberAccessibility accessibility,
					      TargetFunctionType getter, TargetFunctionType setter)
            : base(type, name, index, is_static, accessibility)
        {
            this.Getter = getter;
            this.Setter = setter;
        }
Esempio n. 13
0
        protected TargetMethodInfo(TargetFunctionType type, string name, int index,
					    bool is_static, TargetMemberAccessibility accessibility,
					    string full_name)
            : base(type, name, index, is_static, accessibility)
        {
            this.Type = type;
            this.FullName = full_name;
        }
Esempio n. 14
0
        protected TargetMemberInfo(TargetType type, string name, int index, bool is_static,
					    TargetMemberAccessibility accessibility)
        {
            this.Type = type;
            this.Name = name;
            this.Index = index;
            this.IsStatic = is_static;
            this.Accessibility = accessibility;
        }