public override void ExportSchemaType(XsdDataContractExporter exporter)
 {
     exporter.ExportStandardComplexType(RuntimeType.GetCustomAttribute <DataContractAttribute> (false), this, Members);
 }
Ejemplo n.º 2
0
            /// <summary>
            /// Returns attribute associated with the type <typeparamref name="T"/>.
            /// </summary>
            /// <param name="inherit">True to find inherited attribute.</param>
            /// <param name="condition">Optional predicate to check attribute properties.</param>
            /// <returns>Attribute associated with type <typeparamref name="T"/>; or null, if attribute doesn't exist.</returns>
            public static A?Get(bool inherit = false, Predicate <A>?condition = null)
            {
                var attr = RuntimeType.GetCustomAttribute <A>(inherit);

                return(attr is null || condition is null || condition(attr) ? attr : null);
            }
 public override void ExportSchemaType(XsdDataContractExporter exporter)
 {
     exporter.ExportEnumContractType(RuntimeType.GetCustomAttribute <DataContractAttribute> (false), this);
 }