Beispiel #1
0
        public ReferenceSourceLibrary FromYaml(string yaml)
        {
            IDeserializer deserializer = new DeserializerBuilder().Build();
            SerializedReferenceSourceLibrary library = deserializer.Deserialize <SerializedReferenceSourceLibrary>(yaml);

            return(this.FromSerializedReferenceSourceLibrary(library));
        }
Beispiel #2
0
 internal ReferenceSourceLibrary FromSerializedReferenceSourceLibrary(SerializedReferenceSourceLibrary library)
 {
     this.Name        = library.Name;
     this.Description = library.Description;
     this.Location    = library.Location;
     this.Language    = library.Language;
     this.CompatibleDotNetVersions = library.CompatibleDotNetVersions;
     library.ReferenceAssemblies.ForEach(A => this.Add(new ReferenceAssembly().FromSerializedReferenceAssembly(A)));
     library.EmbeddedResources.ForEach(R => this.Add(new EmbeddedResource().FromSerializedEmbeddedResource(R)));
     return(this);
 }
Beispiel #3
0
        public ReferenceSourceLibrary FromJson(string json)
        {
            SerializedReferenceSourceLibrary library = JsonConvert.DeserializeObject <SerializedReferenceSourceLibrary>(json);

            return(this.FromSerializedReferenceSourceLibrary(library));
        }