• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IEntityFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Spawn

        public Spawn(
            IHierarchy hierarchy,
            IEntityFactory entityFactory,
            string name,
            int id,
            int x, 
            int y, 
            Dictionary<string, string> attributes)
        {
            _hierarchy = hierarchy;
            this.m_EntityFactory = entityFactory;

            this.Transform.LocalPosition = new Vector3(x, y, 0);
        }
开发者ID:RedpointGames,项目名称:Protogame.Template.Platformer,代码行数:14,代码来源:Spawn.cs


示例17: PROJECT_SAFE_NAMEWorld

        public PROJECT_SAFE_NAMEWorld(
            INode worldNode,
            IHierarchy hierarchy,
            I2DRenderUtilities twoDRenderUtilities,
            IAssetManagerProvider assetManagerProvider,
            IEntityFactory entityFactory)
        {
            this.Entities = new List<IEntity>();

            _renderUtilities = twoDRenderUtilities;
            _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.Transform.LocalPosition = new Vector3(100, 50, 0);
            var entityB = entityFactory.CreateExampleEntity("EntityB");
            entityB.Transform.LocalPosition = new Vector3(120, 100, 0);

            // Don't forget to add your entities to the world!
            hierarchy.MoveNode(worldNode, hierarchy.Lookup(entityA));
            hierarchy.MoveNode(worldNode, hierarchy.Lookup(entityB));
        }
开发者ID:RedpointGames,项目名称:Protogame.Template.Blank,代码行数:24,代码来源:PROJECT_SAFE_NAMEWorld.cs


示例18: GetMulti

 /// <summary>
 /// Retrieves in the calling MUserCollection object all MUserEntity 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. 
 /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. 
 /// 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="mhakAksesInstance">MHakAksesEntity instance to use as a filter for the MUserEntity 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 mhakAksesInstance, int pageNumber, int pageSize)
 {
     base.EntityFactoryToUse = entityFactoryToUse;
     IEntityFields fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(Kalibrasi.Data.EntityType.MUserEntity);
     IPredicateExpression selectFilter = CreateFilterUsingForeignKeys(mhakAksesInstance, fieldsToReturn);
     if(filter!=null)
     {
         selectFilter.AddWithAnd(filter);
     }
     return base.PerformGetMultiAction(containingTransaction, collectionToFill, maxNumberOfItemsToReturn, sortClauses, selectFilter, null, null, null, pageNumber, pageSize);
 }
开发者ID:trogalko,项目名称:kalibrasi,代码行数:26,代码来源:MUserDAO.cs


示例19: MUserDAO

 /// <summary>CTor</summary>
 /// <param name="inheritanceInfoProviderToUse">Inheritance info provider to use.</param>
 /// <param name="dqeToUse">Dqe to use.</param>
 /// <param name="typeOfInheritance">Type of inheritance.</param>
 /// <param name="entityName">Name of the entity.</param>
 /// <param name="entityFactory">Entity factory.</param>
 internal MUserDAO(IInheritanceInfoProvider inheritanceInfoProviderToUse, DynamicQueryEngineBase dqeToUse, InheritanceHierarchyType typeOfInheritance, string entityName, IEntityFactory entityFactory)
     : base(inheritanceInfoProviderToUse, dqeToUse, typeOfInheritance, entityName, entityFactory)
 {
 }
开发者ID:trogalko,项目名称:kalibrasi,代码行数:10,代码来源:MUserDAO.cs


示例20: GetMultiForums

 /// <summary> Retrieves all related entities of type 'ForumEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual SD.HnD.DAL.CollectionClasses.ForumCollection GetMultiForums(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if( ( !_alreadyFetchedForums || forceFetch || _alwaysFetchForums) && !this.IsSerializing && !this.IsDeserializing && !this.InDesignMode)
     {
         AddToTransactionIfNecessary(_forums);
         _forums.SuppressClearInGetMulti=!forceFetch;
         _forums.EntityFactoryToUse = entityFactoryToUse;
         _forums.GetMultiManyToOne(this, null, filter);
         _forums.SuppressClearInGetMulti=false;
         _alreadyFetchedForums = true;
     }
     return _forums;
 }
开发者ID:priaonehaha,项目名称:HnD,代码行数:18,代码来源:SectionEntityBase.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IEntityFields2类代码示例发布时间:2022-05-24
下一篇:
C# IEntityCollection类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap