GenericsInstances.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 / Base / MS / Internal / GenericsInstances.cs / 1 / GenericsInstances.cs

                            //---------------------------------------------------------------------------- 
//
// 
//    Copyright (C) 2003 by Microsoft Corporation.  All rights reserved.
//  
//
// 
// Description: defining types with Generics in WindowsBase.dll that are only 
//      instantiated in PresentationCore/-Framework assemblies need a dummy
//      instantiation in this assembly to trigger proper ngen when WB.dll 
//      is installed.
//      This prevents JIT-ing when WB.dll is loaded.
//
//--------------------------------------------------------------------------- 

using System; 
using System.Collections; 
using System.Collections.ObjectModel;
using System.ComponentModel; 

namespace MS.Internal
{
    internal static class GenericsInstances 
    {
        // ObservableCollection / ReadOnlyObservableCollection 
        private static ObservableCollection s_OC_Empty = new ObservableCollection(); 
        private static ReadOnlyObservableCollection s_ROOC_Empty
            = new ReadOnlyObservableCollection(new ObservableCollection()); 

        // ICollectionView.Filter:
        private static bool PredicateMethod(object item) { return false; }
        private static Predicate s_PM_Empty = new Predicate(PredicateMethod); 
    }
 
} 


// 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: defining types with Generics in WindowsBase.dll that are only 
//      instantiated in PresentationCore/-Framework assemblies need a dummy
//      instantiation in this assembly to trigger proper ngen when WB.dll 
//      is installed.
//      This prevents JIT-ing when WB.dll is loaded.
//
//--------------------------------------------------------------------------- 

using System; 
using System.Collections; 
using System.Collections.ObjectModel;
using System.ComponentModel; 

namespace MS.Internal
{
    internal static class GenericsInstances 
    {
        // ObservableCollection / ReadOnlyObservableCollection 
        private static ObservableCollection s_OC_Empty = new ObservableCollection(); 
        private static ReadOnlyObservableCollection s_ROOC_Empty
            = new ReadOnlyObservableCollection(new ObservableCollection()); 

        // ICollectionView.Filter:
        private static bool PredicateMethod(object item) { return false; }
        private static Predicate s_PM_Empty = new Predicate(PredicateMethod); 
    }
 
} 


// 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