public IEnumerable<IContextVariable> GetVariables(IFilterInput input) { yield return new ContextVariable(input.HandlerPropertyName, "EntityId") { Node = this, VariableType = new SystemTypeInfo(typeof(int)), Repository = this.Repository, }; yield return new ContextVariable(input.HandlerPropertyName, "Entity") { Node = this, VariableType = new SystemTypeInfo(uFrameECS.EntityComponentType), Repository = this.Repository, //TypeInfo = typeof(MonoBehaviour) }; }
private void CreateFilterProperty(IFilterInput input, IMappingsConnectable inputFilter) { Ctx.CurrentDeclaration._public_(inputFilter.ContextTypeName, input.HandlerPropertyName); }
public IEnumerable<IContextVariable> GetVariables(IFilterInput input) { yield return new ContextVariable(input.HandlerPropertyName) { Node = this, Source = null, VariableType = this, Repository = this.Repository, //TypeInfo = typeof(MonoBehaviour) }; yield return new ContextVariable(input.HandlerPropertyName, "EntityId") { Node = this, VariableType = new SystemTypeInfo(typeof(int)), Repository = this.Repository, }; yield return new ContextVariable(input.HandlerPropertyName, "Entity") { Node = this, VariableType = new SystemTypeInfo(uFrameECS.EntityComponentType), Repository = this.Repository, //TypeInfo = typeof(MonoBehaviour) }; foreach (var item in GetMembers()) { yield return new ContextVariable(input.HandlerPropertyName,item.MemberName) { Node = this, Source = item as IMemberInfo, VariableType = item.MemberType, Repository = this.Repository, }; } }
public IEnumerable<IContextVariable> GetVariables(IFilterInput input) { yield return new ContextVariable(input.HandlerPropertyName, "EntityId") { Node = this, VariableType = new SystemTypeInfo(typeof(int)), Repository = this.Repository, }; yield return new ContextVariable(input.HandlerPropertyName, "Entity") { Node = this, VariableType = new SystemTypeInfo(uFrameECS.EntityComponentType), Repository = this.Repository, //TypeInfo = typeof(MonoBehaviour) }; foreach (var select in GetMembers()) { yield return new ContextVariable(input.HandlerPropertyName, select.MemberName) { Node = this, VariableType = select.MemberType, Repository = this.Repository, }; if (!select.MemberType.IsEnum) { foreach (var item in select.MemberType.GetMembers()) { yield return new ContextVariable(input.HandlerPropertyName, select.MemberName, item.MemberName) { Node = this, Source = item , VariableType = item.MemberType, Repository = this.Repository, }; } } ////yield return new ContextVariable(input.HandlerPropertyName, select.Name, "EntityId") { Repository = this.Repository, Node = this, VariableType = "int" }; ////yield return new ContextVariable(input.HandlerPropertyName, select.Name, "Entity") { Repository = this.Repository, Node = this, VariableType = "uFrame.ECS.Entity" }; ////foreach (var item in select.PersistedItems.OfType<ITypedItem>()) ////{ //// yield return new ContextVariable(input.HandlerPropertyName, select.Name, item.Name) //// { //// Repository = this.Repository, //// Source = item, //// VariableType = item.RelatedTypeName, //// Node = this //// }; ////} } }