Example #1
0
		public static BitmapSource GetIcon(FieldNode field)
		{
			if (field.Field.IsPrivate)
				return PrivateField;
			if (field.Field.IsProtected)
				return ProtectedField;
			if (field.Field.IsConst)
				return ConstantField;

			return Field;
		}
Example #2
0
		FieldNode ReadField(IField field)
		{
			FieldNode f;
			TypeNode t = ReadType(field.DeclaringTypeDefinition);
			if (!fieldMappings.ContainsKey(field)) {
				f = new FieldNode(field, t, ReadType(field.ReturnType.GetDefinition()));
				t.fields.Add(f);
				fieldMappings.Add(field, f);
				cecilMappings.Add(loader.GetCecilObject((IUnresolvedField)field.UnresolvedMember), field);
			} else {
				f = fieldMappings[field];
			}
			return f;
		}