Ejemplo n.º 1
0
 /// <summary>
 /// Registers a display driver for use with a specific display mode.
 /// This method will override previous registrations for the driver type,
 /// and can be called multiple times safely, to reconfigure an existing driver.
 /// </summary>
 public static ContentPartOptionBuilder ForDisplayMode <TContentPartDisplayDriver>(this ContentPartOptionBuilder builder, Func <string, bool> predicate)
     where TContentPartDisplayDriver : class, IContentPartDisplayDriver
 {
     return(builder.ForDisplayMode(typeof(TContentPartDisplayDriver), predicate));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Registers a display driver for use with a specific display mode.
 /// This method will override previous registrations for the driver type,
 /// and can be called multiple times safely, to reconfigure an existing driver.
 /// </summary>
 public static ContentPartOptionBuilder ForDisplayMode(this ContentPartOptionBuilder builder, Type partDisplayDriverType)
 {
     return(builder.ForDisplayMode(partDisplayDriverType, d => true));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Removes a display driver from all display modes and editors.
 /// </summary>
 public static ContentPartOptionBuilder RemoveDisplayDriver <TContentPartDisplayDriver>(this ContentPartOptionBuilder builder)
     where TContentPartDisplayDriver : class, IContentPartDisplayDriver
 {
     return(builder.RemoveDisplayDriver(typeof(TContentPartDisplayDriver)));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Registers a display driver for use with all display modes.
 /// This method will override previous registrations for the driver type,
 /// and can be called multiple times safely, to reconfigure an existing driver.
 /// </summary>
 public static ContentPartOptionBuilder ForDisplayMode <TContentPartDisplayDriver>(this ContentPartOptionBuilder builder)
     where TContentPartDisplayDriver : class, IContentPartDisplayDriver
 {
     return(builder.ForDisplayMode(typeof(TContentPartDisplayDriver)));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Register a display driver for use with a content part and all display modes and editors.
 /// This method will override previous registrations for the driver type,
 /// and can be called multiple times safely, to reconfigure an existing driver.
 /// </summary>
 public static ContentPartOptionBuilder UseDisplayDriver(this ContentPartOptionBuilder builder, Type partDisplayDriverType)
 {
     return(builder.ForDisplayMode(partDisplayDriverType)
            .ForEditor(partDisplayDriverType));
 }