ValidationRuleCollection.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / MS / Internal / Controls / ValidationRuleCollection.cs / 1 / ValidationRuleCollection.cs

                            //---------------------------------------------------------------------------- 
//
// 
//    Copyright (C) 2003 by Microsoft Corporation.  All rights reserved.
//  
//
// 
// Description: 
//     ValidationRulesCollection is a collection of ValidationRule
//     instances on either a Binding or a MultiBinding.  Each of the rules 
//     is checked for validity on update
//
// See specs at http://avalon/connecteddata/Specs/Validation.mht
// 
// History:
//  5/3/2004       mharper: created. 
// 
//---------------------------------------------------------------------------
 

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel; 
using System.Windows.Controls;
 
namespace MS.Internal.Controls 
{
 
    /// 
    ///     ValidationRulesCollection is a collection of ValidationRule
    ///     instances on either a Binding or a MultiBinding.  Each of the rules
    ///     is checked for validity on update 
    /// 
    internal class ValidationRuleCollection : Collection 
    { 

    //----------------------------------------------------- 
    //
    //  Protected Methods
    //
    //----------------------------------------------------- 

    #region Protected Methods 
 
    /// 
    /// called by base class Collection<T> when an item is added to list; 
    /// raises a CollectionChanged event to any listeners
    /// 
    protected override void InsertItem(int index, ValidationRule item)
    { 
        if (item == null)
            throw new ArgumentNullException("item"); 
        base.InsertItem(index, item); 
    }
 
    /// 
    /// called by base class Collection<T> when an item is added to list;
    /// raises a CollectionChanged event to any listeners
    ///  
    protected override void SetItem(int index, ValidationRule item)
    { 
        if (item == null) 
            throw new ArgumentNullException("item");
        base.SetItem(index, item); 
    }

    #endregion Protected Methods
 
    }
} 
 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//---------------------------------------------------------------------------- 
//
// 
//    Copyright (C) 2003 by Microsoft Corporation.  All rights reserved.
//  
//
// 
// Description: 
//     ValidationRulesCollection is a collection of ValidationRule
//     instances on either a Binding or a MultiBinding.  Each of the rules 
//     is checked for validity on update
//
// See specs at http://avalon/connecteddata/Specs/Validation.mht
// 
// History:
//  5/3/2004       mharper: created. 
// 
//---------------------------------------------------------------------------
 

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel; 
using System.Windows.Controls;
 
namespace MS.Internal.Controls 
{
 
    /// 
    ///     ValidationRulesCollection is a collection of ValidationRule
    ///     instances on either a Binding or a MultiBinding.  Each of the rules
    ///     is checked for validity on update 
    /// 
    internal class ValidationRuleCollection : Collection 
    { 

    //----------------------------------------------------- 
    //
    //  Protected Methods
    //
    //----------------------------------------------------- 

    #region Protected Methods 
 
    /// 
    /// called by base class Collection<T> when an item is added to list; 
    /// raises a CollectionChanged event to any listeners
    /// 
    protected override void InsertItem(int index, ValidationRule item)
    { 
        if (item == null)
            throw new ArgumentNullException("item"); 
        base.InsertItem(index, item); 
    }
 
    /// 
    /// called by base class Collection<T> when an item is added to list;
    /// raises a CollectionChanged event to any listeners
    ///  
    protected override void SetItem(int index, ValidationRule item)
    { 
        if (item == null) 
            throw new ArgumentNullException("item");
        base.SetItem(index, item); 
    }

    #endregion Protected Methods
 
    }
} 
 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK