Пример #1
0
 internal static void Validate(GetMetadataInput toValidate, IList validated)
 {
     if (validated.Contains(toValidate))
     {
         return;
     }
     validated.Add(toValidate);
     // no validation required
 }
Пример #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()));
                }
            }
        }
Пример #3
0
 public static void Validate(GetMetadataInput toValidate)
 {
     Validate(toValidate, new ArrayList());
 }