Beispiel #1
0
		internal static bool AddMemberNameToHashSet(IEdmNamedElement item, HashSetInternal<string> memberNameList, ValidationContext context, EdmErrorCode errorCode, string errorString, bool suppressError)
		{
			string name;
			IEdmSchemaElement edmSchemaElement = item as IEdmSchemaElement;
			if (edmSchemaElement != null)
			{
				name = edmSchemaElement.FullName();
			}
			else
			{
				name = item.Name;
			}
			string str = name;
			if (memberNameList.Add(str))
			{
				return true;
			}
			else
			{
				if (!suppressError)
				{
					context.AddError(item.Location(), errorCode, errorString);
				}
				return false;
			}
		}
Beispiel #2
0
        internal static bool AddMemberNameToHashSet(IEdmNamedElement item, HashSetInternal <string> memberNameList, ValidationContext context, EdmErrorCode errorCode, string errorString, bool suppressError)
        {
            string            name;
            IEdmSchemaElement edmSchemaElement = item as IEdmSchemaElement;

            if (edmSchemaElement != null)
            {
                name = edmSchemaElement.FullName();
            }
            else
            {
                name = item.Name;
            }
            string str = name;

            if (memberNameList.Add(str))
            {
                return(true);
            }
            else
            {
                if (!suppressError)
                {
                    context.AddError(item.Location(), errorCode, errorString);
                }
                return(false);
            }
        }
        internal static bool AddMemberNameToHashSet(IEdmNamedElement item, HashSetInternal<string> memberNameList, ValidationContext context, EdmErrorCode errorCode, string errorString, bool suppressError)
        {
            IEdmSchemaElement schemaElement = item as IEdmSchemaElement;
            string name = (schemaElement != null) ? schemaElement.FullName() : item.Name;
            if (!memberNameList.Add(name))
            {
                if (!suppressError)
                {
                    context.AddError(item.Location(), errorCode, errorString);
                }

                return false;
            }

            return true;
        }
Beispiel #4
0
        internal static bool AddMemberNameToHashSet(IEdmNamedElement item, HashSetInternal <string> memberNameList, ValidationContext context, EdmErrorCode errorCode, string errorString, bool suppressError)
        {
            IEdmSchemaElement schemaElement = item as IEdmSchemaElement;
            string            name          = (schemaElement != null) ? schemaElement.FullName() : item.Name;

            if (!memberNameList.Add(name))
            {
                if (!suppressError)
                {
                    context.AddError(item.Location(), errorCode, errorString);
                }

                return(false);
            }

            return(true);
        }