Exemple #1
0
 /// <summary>Construct an instance.</summary>
 /// <param name="patch">The patch to represent.</param>
 public PatchInfo(IPatch patch)
 {
     this.ShortName         = this.GetShortName(patch.ContentPack, patch.LogName);
     this.Type              = patch.Type.ToString();
     this.RawTargetAsset    = patch.RawTargetAsset.Raw;
     this.ParsedTargetAsset = patch.RawTargetAsset;
     this.ParsedConditions  = patch.Conditions;
     this.ContentPack       = patch.ContentPack;
     this.IsLoaded          = true;
     this.MatchesContext    = patch.IsReady;
     this.IsApplied         = patch.IsApplied;
     this.State             = patch.GetDiagnosticState();
     this.Patch             = patch;
 }
Exemple #2
0
        /// <summary>Construct an instance.</summary>
        /// <param name="patch">The patch to represent.</param>
        public PatchInfo(IPatch patch)
            : this(patch.Path, patch.Type.ToString(), patch.Type)
        {
            this.ParsedType      = patch.Type;
            this.RawFromAsset    = patch.RawFromAsset?.Raw;
            this.ParsedFromAsset = patch.RawTargetAsset;

            this.RawTargetAsset    = patch.RawTargetAsset?.Raw;
            this.ParsedTargetAsset = patch.RawTargetAsset;
            this.ParsedConditions  = patch.Conditions;
            this.ContentPack       = patch.ContentPack;
            this.IsLoaded          = true;
            this.MatchesContext    = patch.IsReady;
            this.IsApplied         = patch.IsApplied;
            this.State             = patch.GetDiagnosticState();
            this.Patch             = patch;
        }
        /// <summary>Construct an instance.</summary>
        /// <param name="patch">The patch to represent.</param>
        public PatchInfo(IPatch patch)
            : this(
                path : patch.Path,
                rawType : patch.Type.ToString(),
                parsedType : patch.Type,
                conditions : patch.Conditions,
                matchesContext : patch.IsReady,
                state : patch.GetDiagnosticState(),
                contentPack : patch.ContentPack
                )
        {
            this.ParsedType      = patch.Type;
            this.RawFromAsset    = patch.RawFromAsset?.Raw;
            this.ParsedFromAsset = patch.RawTargetAsset;

            this.RawTargetAsset    = patch.RawTargetAsset?.Raw;
            this.ParsedTargetAsset = patch.RawTargetAsset;
            this.IsLoaded          = true;
            this.IsApplied         = patch.IsApplied;
            this.Patch             = patch;
        }