当前位置: 首页>>代码示例>>C#>>正文


C# IEntityFactory类代码示例

本文整理汇总了C#中IEntityFactory的典型用法代码示例。如果您正苦于以下问题:C# IEntityFactory类的具体用法?C# IEntityFactory怎么用?C# IEntityFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IEntityFactory类属于命名空间,在下文中一共展示了IEntityFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegisterEntityFactory

	/// <summary>
	/// Registers the entity factory.
	/// </summary>
	/// <returns><c>true</c>, if entity factory was registered, <c>false</c> otherwise.</returns>
	/// <param name="szTypeName">Size type name.</param>
	/// <param name="factory">Factory.</param>
	public virtual void		RegisterEntityFactory(string szFactoryName, IEntityFactory factory)
	{
		if (!m_dFactory.ContainsKey(szFactoryName))
		{
			m_dFactory.Add(szFactoryName, factory);
		}
	}
开发者ID:oathx,项目名称:Six,代码行数:13,代码来源:IEntityManager.cs

示例2: GetFactory

        public static IEntityFactory GetFactory()
        {
            if (_FACTORY == null)
                _FACTORY = new EntityFactory();

            return _FACTORY;
        }
开发者ID:thebuchanan3,项目名称:ContinentsCs,代码行数:7,代码来源:EntityFactory.cs

示例3: Player

        public Player(IMovement movement, IEntityFactory networkPlayer, ICurrentNode currentNode, string name)
        {
            currentNode.SetName(name);
            networkPlayer.CreateNetworkingPlayer();

            _name = name;
        }
开发者ID:hach-que,项目名称:Protoinject,代码行数:7,代码来源:Player.cs

示例4: SeatingPrioritySetupModel

 public SeatingPrioritySetupModel(IAreaRepository areaRepository,
     IEmployeeRepository employeeRepository, IEntityFactory entityFactory)
 {
     _areaRepository = areaRepository;
     _entityFactory = entityFactory;
     _employeeRepository = employeeRepository;
 }
开发者ID:Mrding,项目名称:Ribbon,代码行数:7,代码来源:SeatingPrioritySetupModel.cs

示例5: MyGameWorld

        public MyGameWorld(
            I2DRenderUtilities renderUtilities,
            IAssetManagerProvider assetManagerProvider,
            IEntityFactory entityFactory)
        {
            this.Entities = new List<IEntity>();

            _renderUtilities = renderUtilities;
            _assetManager = assetManagerProvider.GetAssetManager();
            _defaultFont = this._assetManager.Get<FontAsset>("font.Default");

            // You can also save the entity factory in a field and use it, e.g. in the Update
            // loop or anywhere else in your game.
            var entityA = entityFactory.CreateExampleEntity("EntityA");
            entityA.X = 100;
            entityA.Y = 50;
            var entityB = entityFactory.CreateExampleEntity("EntityB");
            entityB.X = 120;
            entityB.Y = 100;

            // Don't forget to add your entities to the world!
            this.Entities.Add(entityA);
            this.Entities.Add(entityB);

            // This pulls in the texture asset via the asset manager.  Note that
            // the folder seperator from "texture/Player" has been translated
            // into a single dot.
            _playerTexture = _assetManager.Get<TextureAsset>("texture.Player");
        }
开发者ID:hach-que,项目名称:Protogame.Docs,代码行数:29,代码来源:referencing_an_asset_full_code.cs

示例6: Initialize

        public void Initialize(EntityWorld entityWorld, IEntityFactory entityFactory)
        {
            _entityWorld = entityWorld;
            EntityFactory = entityFactory;

            _entityWorld.EntityManager.AddedEntityEvent += OnEntityAdded;
            _entityWorld.EntityManager.RemovedEntityEvent += OnEntityRemoved;
        }
开发者ID:jtuttle,项目名称:umbra-client,代码行数:8,代码来源:CrawEntityManager.cs

示例7: AttendanceManagerModel

 public AttendanceManagerModel(IEntityFactory entityFactory, IEmployeeRepository employeeRepository, IRepository<Schedule> scheduleRepository, 
     IAttendanceRepository attendanceRepository)
 {
     _entityFactory = entityFactory;
     _employeeRepository = employeeRepository;
     _scheduleRepository = scheduleRepository;
     _attendanceRepository = attendanceRepository;
 }
开发者ID:Mrding,项目名称:Ribbon,代码行数:8,代码来源:AttendanceManagerModel.cs

示例8: StaffingChartPresenter

 public StaffingChartPresenter(IStaffingCalculatorModel staffingCalculatorModel,
     IEntityFactory entityFactory, Schedule schedule, IStaffingCalculatorService service)
 {
     _schedule = schedule;
     _staffingService = service;
     _staffingCalculatorModel = staffingCalculatorModel;
     _entityFactory = entityFactory;
 }
开发者ID:Mrding,项目名称:Ribbon,代码行数:8,代码来源:StaffingChartPresenter.cs

示例9: EntityController

        internal EntityController(IEntityRepository repository, IEntityFactory factory)
        {
            _entityRepository = repository;
            _entityFactory = factory;

            // TODO: somehow make this automatic (base constructor of controllers didn't work out)
            Initialize();
        }
开发者ID:bjadamson,项目名称:Smashteroids,代码行数:8,代码来源:EntityController.cs

示例10: GetMultiUsingRolesWithAuditAction

 /// <summary>Retrieves in the calling AuditActionCollection object all AuditActionEntity objects which are related via a relation of type 'm:n' with the passed in RoleEntity.</summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="roleInstance">RoleEntity object to be used as a filter in the m:n relation</param>
 /// <param name="prefetchPathToUse">the PrefetchPath which defines the graph of objects to fetch.</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 /// <returns>true if succeeded, false otherwise</returns>
 public bool GetMultiUsingRolesWithAuditAction(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IEntity roleInstance, IPrefetchPath prefetchPathToUse, int pageNumber, int pageSize)
 {
     RelationCollection relations = new RelationCollection();
     relations.Add(AuditActionEntity.Relations.RoleAuditActionEntityUsingAuditActionID, "RoleAuditAction_");
     relations.Add(RoleAuditActionEntity.Relations.RoleEntityUsingRoleID, "RoleAuditAction_", string.Empty, JoinHint.None);
     IPredicateExpression selectFilter = new PredicateExpression();
     selectFilter.Add(new FieldCompareValuePredicate(roleInstance.Fields[(int)RoleFieldIndex.RoleID], ComparisonOperator.Equal));
     return this.GetMulti(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, entityFactoryToUse, selectFilter, relations, prefetchPathToUse, pageNumber, pageSize);
 }
开发者ID:priaonehaha,项目名称:HnD,代码行数:20,代码来源:AuditActionDAO.cs

示例11: GetMulti

 /// <summary>Retrieves in the calling MembershipCollection object all MembershipEntity objects which have data in common with the specified related Entities. If one is omitted, that entity is not used as a filter. </summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <param name="roleInstance">RoleEntity instance to use as a filter for the MembershipEntity objects to return</param>
 /// <param name="storeInformationInstance">StoreInformationEntity instance to use as a filter for the MembershipEntity objects to return</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 public bool GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicateExpression filter, IEntity roleInstance, IEntity storeInformationInstance, int pageNumber, int pageSize)
 {
     this.EntityFactoryToUse = entityFactoryToUse;
     IEntityFields fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(ProductSearchEngine.EntityType.MembershipEntity);
     IPredicateExpression selectFilter = CreateFilterUsingForeignKeys(roleInstance, storeInformationInstance, fieldsToReturn);
     if(filter!=null)
     {
         selectFilter.AddWithAnd(filter);
     }
     return this.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize);
 }
开发者ID:fahrigoktuna,项目名称:ProductSearchEngine,代码行数:22,代码来源:MembershipDAO.cs

示例12: DefaultWorld

        public DefaultWorld(
            IProfiler profiler,
            INetworkingSession networkSession,
            IEntityFactory playerFactory,
            ICurrentNode currentNode)
        {
            currentNode.SetName("AmazingWorld");

            playerFactory.CreatePlayer("Player1");
            playerFactory.CreatePlayer("Player2");
        }
开发者ID:hach-que,项目名称:Protoinject,代码行数:11,代码来源:DefaultWorld.cs

示例13: GetMulti

 /// <summary>Retrieves in the calling ForumCollection object all ForumEntity objects which have data in common with the specified related Entities. If one is omitted, that entity is not used as a filter. </summary>
 /// <param name="containingTransaction">A containing transaction, if caller is added to a transaction, or null if not.</param>
 /// <param name="collectionToFill">Collection to fill with the entity objects retrieved</param>
 /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query. When set to 0, no limitations are specified.</param>
 /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
 /// <param name="entityFactoryToUse">The EntityFactory to use when creating entity objects during a GetMulti() call.</param>
 /// <param name="filter">Extra filter to limit the resultset. Predicate expression can be null, in which case it will be ignored.</param>
 /// <param name="sectionInstance">SectionEntity instance to use as a filter for the ForumEntity objects to return</param>
 /// <param name="defaultSupportQueueInstance">SupportQueueEntity instance to use as a filter for the ForumEntity objects to return</param>
 /// <param name="pageNumber">The page number to retrieve.</param>
 /// <param name="pageSize">The page size of the page to retrieve.</param>
 public bool GetMulti(ITransaction containingTransaction, IEntityCollection collectionToFill, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IEntityFactory entityFactoryToUse, IPredicateExpression filter, IEntity sectionInstance, IEntity defaultSupportQueueInstance, int pageNumber, int pageSize)
 {
     this.EntityFactoryToUse = entityFactoryToUse;
     IEntityFields fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(SD.HnD.DAL.EntityType.ForumEntity);
     IPredicateExpression selectFilter = CreateFilterUsingForeignKeys(sectionInstance, defaultSupportQueueInstance, fieldsToReturn);
     if(filter!=null)
     {
         selectFilter.AddWithAnd(filter);
     }
     return this.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize);
 }
开发者ID:priaonehaha,项目名称:HnD,代码行数:22,代码来源:ForumDAO.cs

示例14: ScheduleManagerModel

 public ScheduleManagerModel(ICampaignScheduleRepository repository, ICampaignRepository campaignRepository,
                             IServiceQueueRepository serviceQueueRepository, IAttendanceRepository attendanceRepository,
     IOrganizationRepository organizationRepository,
                             IEntityFactory entityFactory)
 {
     _repository = repository;
     _campaignRepository = campaignRepository;
     _serviceQueueRepository = serviceQueueRepository;
     _entityFactory = entityFactory;
     _attendanceRepository = attendanceRepository;
     _organizationRepository = organizationRepository;
 }
开发者ID:Mrding,项目名称:Ribbon,代码行数:12,代码来源:ScheduleManagerModel.cs

示例15: Game1

        public Game1()
        {
            _graphics = new GraphicsDeviceManager(this);
            _collisionManager = new CollisionManager();
            _entityFactory = new EntityFactory(this);
            Content.RootDirectory = "Content";

            Services.AddService(typeof(IEntityFactory), _entityFactory);
            Services.AddService(typeof(CollisionManager), _collisionManager);
            Services.AddService(typeof(ContentManager), Content);

        }
开发者ID:swallentin,项目名称:XNA.Pong,代码行数:12,代码来源:Game1.cs


注:本文中的IEntityFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。