Ejemplo n.º 1
0
        private static string MakeMessage(ShardElement element, string attributeName)
        {
            switch (element)
            {
            case ShardElement.ShardId:
                return($"The shard attribute specified a ShardId argument attribute named “{attributeName}”, but the attribute was not found. Remove this argument if you do not have a Shard Id parameter or column, or ensure that the specified name exactly matches the attribute name.");

            case ShardElement.RecordId:
                return($"The shard attribute specified a RecordId argument attribute named “{attributeName}”, but the attribute was not found. Ensure that the specified name exactly matches the attribute name.");

            case ShardElement.ChildId:
                return($"The ShardChild attribute specified a child id attribute named “{attributeName}”, but the attribute was not found. Ensure that the name specified in the ShardChild exactly matches the attribute name.");

            default:
                return($"The shard attribute specified a child id attribute named “{attributeName}”, but the attribute was not found. Ensure that the name specified exactly matches the attribute name.");
            }
        }
Ejemplo n.º 2
0
 public MapAttributeMissingException(ShardElement element, string attributeName)
     : base(MakeMessage(element, attributeName))
 {
     this.Element       = element;
     this.AttributeName = attributeName;
 }