public JsonConstraintDescription(JsonConstraint source, string format)
        {
            this.source = source;
            this.format = format;

            type = source.GetType();
        }
        public static IDescription Describe(this JsonConstraint self)
        {
            JsonConstraintDescriptionAttribute att = self.GetType()
                                                     .GetCustomAttribute <JsonConstraintDescriptionAttribute>(false);

            return(new JsonConstraintDescription(self, att?.Format));
        }
Ejemplo n.º 3
0
 public void Visit(JsonConstraint visitee)
 {
     throw new NotImplementedException($"No approriate visitor methods was found for type: {visitee.GetType()}.");
 }