src/Misc/EFTools/XmlCore/UI/Selection.cs
/// <summary>
///     Clears the selection contained in the editing context.
/// </summary>
/// <param name="context">The editing context to apply this selection change to.</param>
/// <exception cref="ArgumentNullException">If context is null.</exception>
Clears the selection contained in the editing context.
Clears the selection contained in the editing context .
internal static void Clear<T>(EditingContext context) where T : Selection
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            Selection existing = context.Items.GetValue<T>();
            if (existing.PrimarySelection != null)
            {
                context.Items.SetValue(Activator.CreateInstance<T>());
            }
        }
internal static void Clear < T > ( EditingContext context ) where T : Selection { if ( context == null ) { throw new ArgumentNullException ( " " ) ; } Selection existing = context . Items . GetValue < T > ( ) ; if ( existing . PrimarySelection != null ) { context . Items . SetValue ( Activator . CreateInstance < T > ( ) ) ; } }
Clears the selection contained in the editing context.
Clears the selection contained in the editing context .
If context is null.
If context is null .
context
EditingContext
The editing context to apply this selection change to.
The editing context to apply this selection change to .