Burrow.Internal.TypeNameSerializer.Serialize C# (CSharp) Method

Serialize() public method

public Serialize ( Type type ) : string
type System.Type
return string
        public string Serialize(Type type)
        {
            if (type?.FullName == null)
            {
                throw new ArgumentNullException(nameof(type));
            }
            return type.FullName.Replace('.', '_') + ":" + type.Assembly.GetName().Name.Replace('.', '_');
        }
    }

Usage Example

示例#1
0
        public void Should_throw_exception_if_type_is_null()
        {
            // Arrange
            var serializer = new TypeNameSerializer();

            // Action
            serializer.Serialize(null);
        }
All Usage Examples Of Burrow.Internal.TypeNameSerializer::Serialize
TypeNameSerializer