/// <summary>
 /// Initializes a new instance of the <see cref="EdmEnumMemberReferenceExpression"/> class.
 /// </summary>
 /// <param name="referencedEnumMember">Referenced enum member.</param>
 public EdmEnumMemberReferenceExpression(IEdmEnumMember referencedEnumMember)
 {
     EdmUtil.CheckArgumentNull(referencedEnumMember, "referencedEnumMember");
     this.referencedEnumMember = referencedEnumMember;
 }
Example #2
0
		public void AddMember(IEdmEnumMember member)
		{
			this.members.Add(member);
		}
Example #3
0
 /// <summary>
 /// Adds a enum member
 /// </summary>
 /// <param name="member">the specified enum member</param>
 public void Add(IEdmEnumMember member)
 {
     this.members.Add(member);
     ((StubEdmEnumMember)member).DeclaringType = this;
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EdmEnumValue"/> class. 
 /// </summary>
 /// <param name="type">A reference to the enumeration type that describes this value.</param>
 /// <param name="member">The enumeration type value.</param>
 public EdmEnumValue(IEdmEnumTypeReference type, IEdmEnumMember member)
     : this(type, member.Value)
 {
 }
        private IEdmEnumMember ConvertToStockMember(IEdmEnumMember edmMember, IEdmModel edmModel, EdmModel stockModel)
        {
            var stockMemberDeclaringType = stockModel.FindType(GetFullName(edmMember.DeclaringType)) as IEdmEnumType;

            var stockMember = new EdmEnumMember(
                                        stockMemberDeclaringType,
                                        edmMember.Name,
                                        edmMember.Value
                                    );
            ((EdmEnumType)stockMemberDeclaringType).AddMember(stockMember);

            // TODO: Documentation
            this.SetImmediateAnnotations(edmMember, stockMember, edmModel, stockModel);

            return stockMember;
        }