Ejemplo n.º 1
0
 internal static void Validate(GetMetadataInput toValidate, IList validated)
 {
     if (validated.Contains(toValidate))
     {
         return;
     }
     validated.Add(toValidate);
     // no validation required
 }
Ejemplo n.º 2
0
        public GetMetadataOutput GetMetadata(GetMetadataInput request)
        {
            string format       = (String.IsNullOrEmpty(request.MetadataFormat)) ? "sd.xml" : request.MetadataFormat;
            var    resourceName = "metadata/pedidos." + format;

            using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
            {
                if (stream == null)
                {
                    throw new FileNotFoundException(resourceName);
                }
                using (StreamReader reader = new StreamReader(stream))
                {
                    return(new GetMetadataOutput(reader.ReadToEnd()));
                }
            }
        }
Ejemplo n.º 3
0
 public static void Validate(GetMetadataInput toValidate)
 {
     Validate(toValidate, new ArrayList());
 }