public AttributeInfo getAttributeInfo() { List <String> list = indexTypes == null ? null : indexTypes; bool collection = type is ContainerType; TypeFamily family = collection ? ((ContainerType)type).GetItemType().GetFamily() : type.GetFamily(); return(new AttributeInfo(GetName(), family, collection, list)); }
public AttributeInfo(AttributeInfo info) { this.name = info.getName(); this.family = info.getFamily(); this.collection = info.isCollection(); this.key = info.isKey(); this.value = info.isValue(); this.words = info.isWords(); }
public AttributeInfo(String name, TypeFamily family, bool collection, bool key, bool value, bool words) { this.name = name; this.family = family; this.collection = collection; this.key = key; this.value = value; this.words = words; }
public AttributeInfo(String name, TypeFamily family, bool collection, ICollection <String> indexTypes) { this.name = name; this.family = family; this.collection = collection; if (indexTypes != null) { key = indexTypes.Contains(KEY); value = indexTypes.Contains(VALUE); words = indexTypes.Contains(WORDS); } }
/// <summary> /// Determines whether a MemberInfo of the given type should be included in the options. /// </summary> protected virtual bool ValidateMemberType(Type type) { bool validFamily = false; bool validType; // Allow type families based on the filter attribute TypeFamily families = filter.TypeFamilies; if (families.HasFlag(TypeFamily.Array)) { validFamily |= type.IsArray; } if (families.HasFlag(TypeFamily.Class)) { validFamily |= type.IsClass; } if (families.HasFlag(TypeFamily.Enum)) { validFamily |= type.IsEnum; } if (families.HasFlag(TypeFamily.Interface)) { validFamily |= type.IsInterface; } if (families.HasFlag(TypeFamily.Primitive)) { validFamily |= type.IsPrimitive; } if (families.HasFlag(TypeFamily.Reference)) { validFamily |= !type.IsValueType; } if (families.HasFlag(TypeFamily.Value)) { validFamily |= (type.IsValueType && type != typeof(void)); } if (families.HasFlag(TypeFamily.Void)) { validFamily |= type == typeof(void); } // Allow types based on the filter attribute // If no filter types are specified, all types are allowed. if (filter.Types.Count > 0) { validType = false; foreach (Type allowedType in filter.Types) { if (allowedType.IsAssignableFrom(type)) { validType = true; break; } } } else { validType = true; } return(validFamily && validType); }
protected ContainerType(TypeFamily family, IType itemType, String typeName) : base(family, itemType, typeName) { }
public NativeType(TypeFamily family) : base(family) { }
protected BaseType(TypeFamily family) { this.family = family; }
protected IterableType(TypeFamily family, IType itemType, String typeName) : base(family) { this.itemType = itemType; this.typeName = typeName; }
protected BinaryType(TypeFamily family) : base(family) { }
public CategoryType(TypeFamily family, String typeName) : base(family) { this.typeName = typeName; }