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


C# RelationType类代码示例

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


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

示例1: ProvidedAssociationAttribute

 public ProvidedAssociationAttribute(string associationName,string providedPropertyName, RelationType relationType,
                                     string attributesFactory) {
     _associationName = associationName;
     _relationType = relationType;
     _attributesFactoryProperty = attributesFactory;
     _providedPropertyName = providedPropertyName;
 }
开发者ID:gvilas,项目名称:eXpand,代码行数:7,代码来源:ProvidedAssociationAttribute.cs

示例2: Person

	//Constructor
	public Person(RelationType theirRelation, MoodType theirMood,
	              string aName, int theirAffection, int theirTrust)
	{
		acquaintances = new List<int>();

		relation = theirRelation;			curMood = theirMood;		name = aName;
		playerAffection = theirAffection;	playerTrust = theirTrust;
	}
开发者ID:BernardoOM,项目名称:Making-Time,代码行数:9,代码来源:Person.cs

示例3: RelationAttribute

        /// <summary>
        /// Constructor de clase
        /// </summary>
        /// <param name="relationType"><see cref="RelationType"/></param>
        /// <param name="targetEntity">Entidad destino de la relación</param>
        public RelationAttribute( RelationType relationType, Type targetEntity )
        {
            Verify.ArgumentNotNull(relationType, "relationType");
            Verify.ArgumentNotNull(targetEntity, "relationType");

            Type = relationType;
            TargetEntity = targetEntity;
        }
开发者ID:jdmartinez,项目名称:Northwind,代码行数:13,代码来源:RelationAttribute.cs

示例4: DefineRelationshipTo

		public Relationship DefineRelationshipTo(Faction otherFaction, RelationType currentRelation)
		{
			var newRelationship = new Relationship(this, otherFaction, currentRelation);

			relationships.Add(otherFaction, newRelationship);

			return newRelationship;
		}
开发者ID:mswf,项目名称:game-a-week,代码行数:8,代码来源:Faction.cs

示例5: Player

	public Player(RelationType theirRelation, MoodType theirMood,
	              string aName, int theirAffection, int theirTrust)
		   : base(theirRelation, theirMood, aName, theirAffection, theirTrust)
	{
		energy = 0;
		happiness = 0;

		GameManager.People.OnChangeStatus += People_OnChangeStatus;
	}
开发者ID:BernardoOM,项目名称:Making-Time,代码行数:9,代码来源:Player.cs

示例6: Relationship

		public Relationship(Faction fromFaction, Faction toFaction, RelationType currentRelation)
		{
			this.fromFaction = fromFaction;
			this.toFaction = toFaction;

			fromFactionName = fromFaction.name;
			toFactionName = toFaction.name;

			this.currentRelation = currentRelation;
		}
开发者ID:mswf,项目名称:game-a-week,代码行数:10,代码来源:Relationship.cs

示例7: Relation

        public Relation(Type left_model, Type right_model, 
			RelationType relation_type, string left_identifier,
										string right_identifier)
        {
            this.left_model = left_model;
            this.right_model = right_model;
            this.relation_type = relation_type;
            this.left_identifier = left_identifier;
            this.right_identifier = right_identifier;
        }
开发者ID:kurvenschubser,项目名称:goil-orm,代码行数:10,代码来源:Relations.cs

示例8: FromBin

                public bool is_online; //是否在线

                public void FromBin(NetSocket.ByteArray bin)
                {
                    bin.Get_(out char_idx);
                    char_name = bin.GetStringData((int)twp.app.unit.EUnitLimit.LIMIT_NAME_STR_LENGTH+1);
                    byte v;
                    bin.Get_(out v);
                    relation_type = (RelationType)v;
                    bin.Get_(out battle_integral);
                    sbyte isonline;
                    bin.Get_(out isonline);
                    is_online = (isonline == 0)? false : true;
                }
开发者ID:602147629,项目名称:UnitySocket,代码行数:14,代码来源:relation_def.cs

示例9: RelationDescription

        public RelationDescription(String fromPropertyName, RelationType relationType, String toEntityName,
                                   String mappedByPropertyName, IIdMapper idMapper,
                                   IPropertyMapper fakeBidirectionalRelationMapper,
                                   IPropertyMapper fakeBidirectionalRelationIndexMapper, bool insertable) {
            this.FromPropertyName = fromPropertyName;
            this.RelationType = relationType;
            this.ToEntityName = toEntityName;
            this.MappedByPropertyName = mappedByPropertyName;
            this.IdMapper = idMapper;
            this.FakeBidirectionalRelationMapper = fakeBidirectionalRelationMapper;
            this.FakeBidirectionalRelationIndexMapper = fakeBidirectionalRelationIndexMapper;
            this.Insertable = insertable;

            this.Bidirectional = false;
        }
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:15,代码来源:RelationDescription.cs

示例10: Add

 public void Add(GObject target, RelationType relationType, bool usePercent)
 {
     foreach (RelationItem item in _items)
     {
         if (item.target == target)
         {
             item.Add(relationType, usePercent);
             return;
         }
     }
     RelationItem newItem = new RelationItem(_owner);
     newItem.target = target;
     newItem.Add(relationType, usePercent);
     _items.Add(newItem);
 }
开发者ID:niuniuzhu,项目名称:FairyGUI-unity,代码行数:15,代码来源:Relations.cs

示例11: Relation

		public Relation(int Id)
		{
			using (SqlDataReader dr = Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(GlobalSettings.DbDSN, CommandType.Text, "select * from umbracoRelation where id = @id", new SqlParameter("@id", Id)))
			{
				if(dr.Read())
				{
					this._id = int.Parse(dr["id"].ToString());
					this._parentNode = new CMSNode(int.Parse(dr["parentId"].ToString()));
					this._childNode = new CMSNode(int.Parse(dr["childId"].ToString()));
					this._relType = RelationType.GetById(int.Parse(dr["relType"].ToString()));
					this._comment = dr["comment"].ToString();
					this._datetime = DateTime.Parse(dr["datetime"].ToString());
				}
			}
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:15,代码来源:Relation.cs

示例12: Relation

        /// <summary>
        /// creates a new relation between two nodes
        /// </summary>
        /// <param name="start">classifier where the relation starts</param>
        /// <param name="end">classifier where the relation ends</param>
        /// <param name="startName">optional name of the start node of the relation</param>
        /// <param name="endName">optional name of the end node of the relation</param>
        /// <param name="relation">type of the relation</param>
        public Relation(
            Classifier start,
            Classifier end,
            RelationType relation = RelationType.Association,
            string startName = "",
            string endName = "")
        {
            Requires(start != null);
            Requires(end != null);

            Start = new StartNode(start,startName);
            End = new EndNode(end, endName);
            Type = relation;
            IsVisible = true;
        }
开发者ID:pgenfer,项目名称:YumlFrontEnd,代码行数:23,代码来源:Relation.cs

示例13: RelatedEntityInfo

        public RelatedEntityInfo(RelationType relationType, string relationName, CodeProperty relationProperty, CodeType relatedEntityType, string relatedEntityPrimaryKeyName, CodeProperty lazyLoadingProperty)
        {
            if (string.IsNullOrEmpty(relationName)) throw new ArgumentException("'relationName' cannot be null or empty.");
            if (relationProperty == null) throw new ArgumentNullException("relationProperty");
            if (relatedEntityType == null) throw new ArgumentNullException("relatedEntityType");
            if ((relationType == RelationType.Parent) && string.IsNullOrEmpty(relatedEntityPrimaryKeyName)) throw new ArgumentException("'relatedEntityPrimaryKeyName' cannot be null or empty for parent entities.");

            RelationType = relationType;
            RelationName = relationName;
            RelationNamePlural = Pluralize(relationName);
            RelationProperty = relationProperty;
            RelatedEntityType = relatedEntityType;
            RelatedEntityTypeNamePlural = Pluralize(relatedEntityType.Name);
            RelatedEntityPrimaryKeyName = relatedEntityPrimaryKeyName;
            LazyLoadingProperty = lazyLoadingProperty;
        }
开发者ID:processedbeets,项目名称:ASP.NET-MVC-Scaffolding,代码行数:16,代码来源:RelatedEntityInfo.cs

示例14: ProfileData

        public ProfileData(
            string id, string name = null, string iconImageUrl = null, AccountStatus? status = null,
            string firstName = null, string lastName = null, string introduction = null, string braggingRights = null,
            string occupation = null, string greetingText = null, string nickName = null, RelationType? relationship = null,
            GenderType? genderType = null, LookingFor lookingFor = null, EmploymentInfo[] employments = null,
            EducationInfo[] educations = null, ContactInfo[] contactsInHome = null, ContactInfo[] contactsInWork = null,
            UrlInfo[] otherProfileUrls = null, UrlInfo[] contributeUrls = null, UrlInfo[] recommendedUrls = null,
            string[] placesLived = null, string[] otherNames = null,
            ProfileUpdateApiFlag loadedApiTypes = ProfileUpdateApiFlag.Unloaded,
            DateTime? lastUpdateLookupProfile = null, DateTime? lastUpdateProfileGet = null)
        {
            if (id == null)
                throw new ArgumentNullException("ProfileDataの引数idをnullにする事はできません。");
            //idが数字になるならばProfileIdとして正しい。違うならばG+を始めていないアカウントのEMailAddressと見なす
            //また、スタブモード時は先頭に"Id"の2文字が入るため、テストコード用に先頭2文字を省いてParse()する。
            double tmp;
            if (status == AccountStatus.Active && double.TryParse(id.Substring(2), out tmp) == false)
                throw new ArgumentException("ProfileDataの引数idがメアド状態で引数statusをActiveにする事はできません。");

            LoadedApiTypes = loadedApiTypes;
            Status = status;
            Id = id;
            Name = name;
            FirstName = firstName;
            LastName = lastName;
            Introduction = introduction;
            BraggingRights = braggingRights;
            Occupation = occupation;
            GreetingText = greetingText;
            NickName = nickName;
            IconImageUrl = iconImageUrl;
            Relationship = relationship;
            Gender = genderType;
            LookingFor = lookingFor;
            Employments = employments;
            Educations = educations;
            ContactsInHome = contactsInHome;
            ContactsInWork = contactsInWork;
            OtherProfileUrls = otherProfileUrls;
            ContributeUrls = contributeUrls;
            RecommendedUrls = recommendedUrls;
            PlacesLived = placesLived;
            OtherNames = otherNames;

            LastUpdateLookupProfile = lastUpdateLookupProfile ?? DateTime.MinValue;
            LastUpdateProfileGet = lastUpdateProfileGet ?? DateTime.MinValue;
        }
开发者ID:namoshika,项目名称:SnkLib.Web.GooglePlus,代码行数:47,代码来源:ProfileData.cs

示例15: Add

 /// <summary>
 /// 
 /// </summary>
 /// <param name="target"></param>
 /// <param name="relationType"></param>
 /// <param name="usePercent"></param>
 public void Add(GObject target, RelationType relationType, bool usePercent)
 {
     int cnt = _items.Count;
     for (int i = 0; i < cnt; i++)
     {
         RelationItem item = _items[i];
         if (item.target == target)
         {
             item.Add(relationType, usePercent);
             return;
         }
     }
     RelationItem newItem = new RelationItem(_owner);
     newItem.target = target;
     newItem.Add(relationType, usePercent);
     _items.Add(newItem);
 }
开发者ID:fairygui,项目名称:FairyGUI-unity,代码行数:23,代码来源:Relations.cs


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