예제 #1
0
        public virtual IDictionary <string, string> GetAllProperties()
        {
            SortedDictionary <string, string> properties = new SortedDictionary <string, string>();

            AddPairIfNotNull(properties, Constants.SIZE, Size.ToString("X2"));  //hexidecimal with 2 numerical places (aka a byte)
            AddPairIfNotNull(properties, Constants.EXTENSION_VERSION, ExtensionVersion.ToString());
            AddPairIfNotNull(properties, Constants.SIGNATURE, Signature.ToString("X4"));
            return(properties);
        }
예제 #2
0
        public void ToString_GivenExtensionVersion_ShouldReturnExtensionAndExtensionVersionIds()
        {
            var extensionVersion = new ExtensionVersion
            {
                ExtensionId        = Guid.NewGuid().ToString(),
                ExtensionVersionId = Guid.NewGuid().ToString()
            };

            var toString = extensionVersion.ToString();

            toString.Should().Be($"{extensionVersion.ExtensionId}_{extensionVersion.ExtensionVersionId}");
        }