Exemplo n.º 1
0
        public static DeriveAssetTest <T> DeriveAsset(T baseAsset)
        {
            var derivedAsset = (T)baseAsset.CreateDerivedAsset("MyAsset");
            var result       = new DeriveAssetTest <T>(baseAsset, derivedAsset);

            result.BuildGraph();
            return(result);
        }
Exemplo n.º 2
0
        public static DeriveAssetTest <T> LoadFromYaml(string baseYaml, string derivedYaml)
        {
            var baseAsset    = AssetFileSerializer.Load <T>(ToStream(baseYaml), $"MyAsset{Types.FileExtension}");
            var derivedAsset = AssetFileSerializer.Load <T>(ToStream(derivedYaml), $"MyDerivedAsset{Types.FileExtension}");
            var result       = new DeriveAssetTest <T>(baseAsset.Asset, derivedAsset.Asset)
            {
                BaseAssetItem    = { Overrides = baseAsset.Overrides },
                DerivedAssetItem = { Overrides = derivedAsset.Overrides }
            };

            result.BuildGraph();
            return(result);
        }