Exemplo n.º 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);
        }
Exemplo n.º 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}");
        }