Jayrock.Json.Conversion.TestJsonDefaultValueAttribute.CreatePropertyExporter C# (CSharp) Method

CreatePropertyExporter() private static method

private static CreatePropertyExporter ( string name, int value, int defaultValue ) : IObjectMemberExporter
name string
value int
defaultValue int
return IObjectMemberExporter
        private static IObjectMemberExporter CreatePropertyExporter(string name, int value, int defaultValue)
        {
            TestPropertyDescriptor property = new TestPropertyDescriptor(name, value);
            JsonDefaultValueAttribute attribute = new JsonDefaultValueAttribute(defaultValue);
            ((IPropertyDescriptorCustomization)attribute).Apply(property);
            IServiceProvider sp = property;
            return (IObjectMemberExporter) sp.GetService(typeof(IObjectMemberExporter));
        }