public static OpsFormatHelper FindByFormat(Format format)
        {
            foreach (OpsFormatHelper helper in FormatMap)
            {
                if(helper.Format == format)
                    return helper;
            }

            throw new OpsException("Unsupported file format: " + format.ToString() );
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="FormatAsAttribute"/> class.
 /// </summary>
 /// <param name="format">The format.</param>
 public FormatAsAttribute(Format format)
 {
     FormatName = format.ToString();
 }
 internal static ArgumentOutOfRangeException NotSupportedUserDefinedTypeSerializationFormat(Format value, string method)
 {
     return NotSupportedEnumerationValue(typeof(Format), value.ToString(), method);
 }
Example #4
0
 static void CheckFormatValid( Format format)
 {
     switch(format)
     {
         case Format.Dxt1: 
         case Format.Dxt2: 
         case Format.Dxt3: 
         case Format.Dxt4: 
         case Format.Dxt5:
             throw new OpsException(String.Format("Shade cannot run on the format:{0}.  Try reformat to a non-DXT format.", format.ToString()));
     };
 }