internal bool Validate(string parameterName, ObjectType objectType, string objectName, ErrorContext errorContext) { bool result = true; if (!NameValidator.IsCLSCompliant(parameterName)) { errorContext.Register(ProcessingErrorCode.rsInvalidParameterNameNotCLSCompliant, Severity.Error, objectType, objectName, "Name", parameterName); result = false; } return(result); }
public static bool ValidateDataElementName(ref string elementName, string defaultName, ObjectType objectType, string objectName, string propertyName, ErrorContext errorContext) { Global.Tracer.Assert(null != defaultName); if (elementName == null) { elementName = defaultName; } else if (!NameValidator.IsCLSCompliant(elementName)) { errorContext.Register(ProcessingErrorCode.rsInvalidDataElementNameNotCLSCompliant, Severity.Error, objectType, objectName, null, propertyName, elementName); return(false); } return(true); }
public bool Validate(string name, string dataField, string dataSetName, ErrorContext errorContext) { bool result = true; if (!NameValidator.IsCLSCompliant(name)) { errorContext.Register(this.m_errorCodeNotCLS, Severity.Error, ObjectType.Field, dataField, "Name", name, dataSetName); result = false; } if (!base.IsUnique(name)) { errorContext.Register(this.m_errorCodeNotUnique, Severity.Error, ObjectType.Field, dataField, "Name", name, dataSetName); result = false; } return(result); }
internal bool Validate(string name, ObjectType objectType, string objectName, ErrorContext errorContext) { bool result = true; if (!NameValidator.IsCLSCompliant(name)) { errorContext.Register(m_errorCodeNotCLS, Severity.Error, objectType, objectName, "Name", name); result = false; } if (!IsUnique(name)) { errorContext.Register(m_errorCodeNotUnique, Severity.Error, objectType, objectName, "Name", name); result = false; } return(result); }
public bool Validate(bool isGrouping, string scopeName, ObjectType objectType, string objectName, ErrorContext errorContext, bool enforceCLSCompliance) { bool result = true; if (!NameValidator.IsCLSCompliant(scopeName) && enforceCLSCompliance) { if (isGrouping) { errorContext.Register(ProcessingErrorCode.rsInvalidGroupingNameNotCLSCompliant, Severity.Error, objectType, objectName, "Name", scopeName); } else { errorContext.Register(ProcessingErrorCode.rsInvalidNameNotCLSCompliant, Severity.Error, objectType, objectName, "Name"); } result = false; } if (!base.IsUnique(scopeName)) { errorContext.Register(ProcessingErrorCode.rsDuplicateScopeName, Severity.Error, objectType, objectName, "Name", scopeName); result = false; } return(result); }