private static bool DoHasNonStaticField(FieldDefinitionCollection fields)
		{
			foreach (FieldDefinition field in fields)
			{
				if ((field.Attributes & FieldAttributes.Static) == 0)
					return true;
			}
			
			return false;
		}
 public override void VisitFieldDefinitionCollection(FieldDefinitionCollection fields)
 {
     foreach (FieldDefinition fieldDefinition in fields)
     {
         VisitFieldDefinition(fieldDefinition);
     }
 }
Exemple #3
0
 public virtual void VisitFieldDefinitionCollection(FieldDefinitionCollection fields)
 {
 }
		static void ProcessFields (FieldDefinitionCollection fields)
		{
			foreach (FieldDefinition field in fields)
				ProcessField (field);
		}
		public override void VisitFieldDefinitionCollection (FieldDefinitionCollection fields)
		{
			VisitCollection (fields);
		}
        public virtual void VisitFieldDefinitionCollection(FieldDefinitionCollection fields)
        {

        }
 public virtual void VisitFieldDefinitionCollection(FieldDefinitionCollection fields)
 {
     foreach (FieldDefinition field in fields)
     {
         VisitFieldDefinition(field);
     }
 }
 private void AddUsedTypesFromFields(FieldDefinitionCollection fields, List<UsedClass> usedT)
 {
     foreach (FieldDefinition ifd in fields)
     {
         AddTypeToList(ifd.FieldType, ClassUse.Contains, usedT);
     }
 }
 public void VisitFieldDefinitionCollection(FieldDefinitionCollection fields)
 {
     foreach (FieldDefinition field in fields)
     {
         AppendNode(field.DeclaringType, field, false);
     }
 }
        /// <summary>
        /// Reads fields and add them to field list for type
        /// </summary>
        /// <param name="type"></param>
        /// <param name="fields"></param>
        private void ReadFields(Type type, FieldDefinitionCollection fields)
        {
            foreach (FieldDefinition fieldDefinition in fields)
            {
                var field = new Field()
                                {
                                    Name = fieldDefinition.Name
                                };

                type.Fields.Add(field);

                var declaringType =
                        (from n in type.Namespace.Module.Namespaces
                         from t in n.Types
                         where t.Name == field.Name
                         select t).SingleOrDefault();

                field.Type = declaringType;
            }
        }
Exemple #11
0
 private void Visit(FieldDefinitionCollection fieldDefinitionCollection)
 {
   foreach (FieldDefinition field in fieldDefinitionCollection)
   {
     Visit(field);
   }
 }