Ejemplo n.º 1
0
        /// <summary>
        /// Interprets a given access tag value.
        /// </summary>
        public static bool?InterpretAccessValue(this IAttributeCollection tags, string key)
        {
            string accessValue;

            if (tags.TryGetValue(key, out accessValue))
            {
                bool?value;
                if (VehicleExtensions.GetAccessValues().TryGetValue(accessValue, out value))
                {
                    return(value);
                }
            }
            return(null);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Loads a string from an embedded resource stream.
 /// </summary>
 public static string LoadEmbeddedResource(string name)
 {
     return(VehicleExtensions.ItineroAssembly().GetManifestResourceStream(name).ReadToEnd());
 }