public void Validate(ValidationContext context, ModelElement ownerElement) { if (!Enabled) { return; } if (MappingName.IsCustom()) { string mappingName = MappingName.Value; if (!string.IsNullOrEmpty(mappingName)) { if (!regexTableMappingName.IsMatch(mappingName)) { context.LogError( string.Format(ERROR_INVALID_CHARACTERS_IN_TABLE_MAPPING_NAME, mappingName, regexTableMappingNamePattern), CODE_INVALID_CHARACTERS_IN_TABLE_MAPPING_NAME, new [] { ownerElement }); } } else { context.LogError(ERROR_EMPTY_NAME_IN_TABLE_MAPPING_NAME, CODE_EMPTY_NAME_IN_TABLE_MAPPING_NAME, new [] { ownerElement }); } } }
public override int GetHashCode() { int prime = 31; int res = MappingName.GetHashCode(); foreach (var trigger in Triggers) { res = res * prime + trigger.GetHashCode(); } res += Callback.GetHashCode(); return(res); }
protected override void SerializeValueToXml(XmlProxy parent) { XmlProxy elementValue = parent.AddChild("value"); elementValue.SetAttr("inheritanceSchema", this.InheritanceSchema.ToString()); XmlProxy elementIncludeTypeId = elementValue.AddChild("includeTypeId"); IncludeTypeId.SerializeToXml(elementIncludeTypeId); XmlProxy xmlMappingName = elementValue.AddChild("mappingName"); MappingName.SerializeToXml(xmlMappingName); }
public override int GetHashCode() { return(MappingName.GetHashCode() ^ MappingKind.GetHashCode() ^ MappingAsJson.GetHashCode()); }