Пример #1
0
        public void configure_typed_metadata()
        {
            MyEntity entity = new MyEntity();

            // Configure metadata several times.
            entity.ConfigureMetadata <SampleMetadata>(metadata => metadata.Name        = "Instance1");
            entity.ConfigureMetadata <SampleMetadata>(metadata => metadata.Description = "Instance1 description");

            // Get merged metadata
            entity.GetMetadata <SampleMetadata>().Name.Should().Be("Instance1");
            entity.GetMetadata <SampleMetadata>().Description.Should().Be("Instance1 description");
        }