コード例 #1
0
        EntityIndexData createEntityIndexData(Type type, List <PublicMemberInfo> infos)
        {
            var data = new EntityIndexData();

            var info      = infos.Single(i => i.attributes.Count(attr => attr.attribute is AbstractEntityIndexAttribute) == 1);
            var attribute = (AbstractEntityIndexAttribute)info.attributes.Single(attr => attr.attribute is AbstractEntityIndexAttribute).attribute;

            data.SetEntityIndexType(getEntityIndexType(attribute));
            data.IsCustom(false);
            data.SetEntityIndexName(type.ToCompilableString().ToComponentName(ignoreNamespaces));
            data.SetKeyType(info.type.ToCompilableString());
            data.SetComponentType(type.ToCompilableString());
            data.SetMemberName(info.name);
            data.SetContextNames(ContextsComponentDataProvider.GetContextNamesOrDefault(type));

            return(data);
        }
コード例 #2
0
 bool hasContexts(Type type)
 {
     return(ContextsComponentDataProvider.GetContextNames(type).Length != 0);
 }