예제 #1
0
        /// <summary>
        /// Creates instance.
        /// </summary>
        /// <param name="source"></param>
        public AcrManifest(AcrManifestAttributesBase source)
        {
            this.Digest          = source.Digest;
            this.Tags            = new ReadOnlyCollection <string>(source.Tags);
            this.OperatingSystem = source.Os;
            this.Architecture    = source.Architecture;
            var createdTime    = DateTimeOffset.Parse(source.CreatedTime);
            var lastUpdateTime = DateTimeOffset.Parse(source.LastUpdateTime);

            this.CreatedTime    = TimeZoneInfo.ConvertTime(createdTime, TimeZoneInfo.Local);
            this.LastUpdateTime = TimeZoneInfo.ConvertTime(lastUpdateTime, TimeZoneInfo.Local);
        }
예제 #2
0
 private void VerifyAcrManifestAttributesBase(AcrManifestAttributesBase expectedManifestBase, AcrManifestAttributesBase actualManifestBase)
 {
     Assert.Equal(expectedManifestBase.Architecture, actualManifestBase.Architecture);
     Assert.Equal(expectedManifestBase.CreatedTime, actualManifestBase.CreatedTime);
     Assert.Equal(expectedManifestBase.Digest, actualManifestBase.Digest);
     Assert.Equal(expectedManifestBase.LastUpdateTime, actualManifestBase.LastUpdateTime);
     Assert.Equal(expectedManifestBase.MediaType, actualManifestBase.MediaType);
     Assert.Equal(expectedManifestBase.Os, actualManifestBase.Os);
     Assert.Equal(expectedManifestBase.Tags.Count, actualManifestBase.Tags.Count);
     Assert.Equal(expectedManifestBase.Tags[0], actualManifestBase.Tags[0]);
     Assert.Equal(expectedManifestBase.ChangeableAttributes.DeleteEnabled, actualManifestBase.ChangeableAttributes.DeleteEnabled);
     Assert.Equal(expectedManifestBase.ChangeableAttributes.ListEnabled, actualManifestBase.ChangeableAttributes.ListEnabled);
     Assert.Equal(expectedManifestBase.ChangeableAttributes.ReadEnabled, actualManifestBase.ChangeableAttributes.ReadEnabled);
     Assert.Equal(expectedManifestBase.ChangeableAttributes.WriteEnabled, actualManifestBase.ChangeableAttributes.WriteEnabled);
 }