예제 #1
0
        public static MSBuildSchema Load(TextReader reader)
        {
            var schema = new MSBuildSchema();

            schema.LoadInternal(reader);
            return(schema);
        }
예제 #2
0
        public virtual MSBuildSchema GetSchema(string path, string sdk)
        {
            string filename = path + ".buildschema.json";

            if (File.Exists(filename))
            {
                using (var reader = File.OpenText(filename)) {
                    return(MSBuildSchema.Load(reader));
                }
            }

            var resourceId = GetResourceForBuiltin(path, sdk);

            if (resourceId != null)
            {
                return(MSBuildSchema.LoadResource($"MonoDevelop.MSBuildEditor.Schemas.{resourceId}.buildschema.json"));
            }

            return(null);
        }