Esempio n. 1
0
 internal static void Validate(GetMetadataInput toValidate, IList validated)
 {
     if (validated.Contains(toValidate))
     {
         return;
     }
     validated.Add(toValidate);
     // no validation required
 }
Esempio n. 2
0
        public GetMetadataOutput GetMetadata(GetMetadataInput request)
        {
            string format       = (String.IsNullOrEmpty(request.MetadataFormat)) ? "sd.xml" : request.MetadataFormat;
            var    resourceName = "metadata/hello_world." + 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()));
                }
            }
        }
Esempio n. 3
0
 public static void Validate(GetMetadataInput toValidate)
 {
     Validate(toValidate, new ArrayList());
 }