Beispiel #1
0
        public IEnumerable <string> GetAll(int id)
        {
            //id, name, schemalocation
            ImplementationGuideType igType = tdb.ImplementationGuideTypes.Single(y => y.Id == id);

            var schema = schemaFactory.Create(helper.GetIGSimplifiedSchemaLocation2(igType));

            var types = from t in schema.ComplexTypes
                        orderby t.Name
                        select t.Name;

            return(types);
        }
Beispiel #2
0
        //this has been refactored to an instance method, because it's untestable (unmockable) with unit tests. the static method is
        //still here to provide backwards compatibility. This is a prime example as to why static is generally a poor design.
        public static string GetIGSimplifiedSchemaLocation(ImplementationGuideType igType)
        {
            var instance = new Helper();

            return(instance.GetIGSimplifiedSchemaLocation2(igType));
        }