PartialToken.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / AddIn / AddIn / System / Addin / Hosting / PartialToken.cs / 1305376 / PartialToken.cs

                            // ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 
/*============================================================
** 
** Class:  PartialToken 
**
** Purpose: Represents a valid combination of pipeline components 
**          associated classes, like host adaptors, etc.
**
===========================================================*/
using System; 
using System.Collections.Generic;
using System.Collections.ObjectModel; 
using System.Diagnostics; 
using System.Globalization;
using System.IO; 
using System.Text;
using System.AddIn.MiniReflection;
using System.Diagnostics.Contracts;
 
namespace System.AddIn.Hosting
{ 
    [Serializable] 
    internal sealed class PartialToken
    { 
        internal HostAdapter _hostAdapter;
        internal ContractComponent _contract;
        internal AddInAdapter _addinAdapter;
        internal AddInBase _addinBase; 

        internal PartialToken(HostAdapter hostAdapter, ContractComponent contract, 
            AddInAdapter addinAdapter, AddInBase addinBase) 
        {
            System.Diagnostics.Contracts.Contract.Requires(hostAdapter != null); 
            System.Diagnostics.Contracts.Contract.Requires(contract != null);
            System.Diagnostics.Contracts.Contract.Requires(addinAdapter != null);
            System.Diagnostics.Contracts.Contract.Requires(addinBase != null);
 
            _hostAdapter = hostAdapter;
            _contract = contract; 
            _addinAdapter = addinAdapter; 
            _addinBase = addinBase;
        } 

        internal HostAdapter HostAdapter {
            get { return _hostAdapter; }
        } 

        internal String PipelineRootDirectory { 
 
            set {
                System.Diagnostics.Contracts.Contract.Requires(value != null); 
                // Update the paths for each part of the pipeline (except the add-in, of course).
                _hostAdapter.SetRootDirectory(value);
                _contract.SetRootDirectory(value);
                _addinAdapter.SetRootDirectory(value); 
                _addinBase.SetRootDirectory(value);
            } 
        } 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++== 
//
//   Copyright (c) Microsoft Corporation.  All rights reserved.
//
// ==--== 
/*============================================================
** 
** Class:  PartialToken 
**
** Purpose: Represents a valid combination of pipeline components 
**          associated classes, like host adaptors, etc.
**
===========================================================*/
using System; 
using System.Collections.Generic;
using System.Collections.ObjectModel; 
using System.Diagnostics; 
using System.Globalization;
using System.IO; 
using System.Text;
using System.AddIn.MiniReflection;
using System.Diagnostics.Contracts;
 
namespace System.AddIn.Hosting
{ 
    [Serializable] 
    internal sealed class PartialToken
    { 
        internal HostAdapter _hostAdapter;
        internal ContractComponent _contract;
        internal AddInAdapter _addinAdapter;
        internal AddInBase _addinBase; 

        internal PartialToken(HostAdapter hostAdapter, ContractComponent contract, 
            AddInAdapter addinAdapter, AddInBase addinBase) 
        {
            System.Diagnostics.Contracts.Contract.Requires(hostAdapter != null); 
            System.Diagnostics.Contracts.Contract.Requires(contract != null);
            System.Diagnostics.Contracts.Contract.Requires(addinAdapter != null);
            System.Diagnostics.Contracts.Contract.Requires(addinBase != null);
 
            _hostAdapter = hostAdapter;
            _contract = contract; 
            _addinAdapter = addinAdapter; 
            _addinBase = addinBase;
        } 

        internal HostAdapter HostAdapter {
            get { return _hostAdapter; }
        } 

        internal String PipelineRootDirectory { 
 
            set {
                System.Diagnostics.Contracts.Contract.Requires(value != null); 
                // Update the paths for each part of the pipeline (except the add-in, of course).
                _hostAdapter.SetRootDirectory(value);
                _contract.SetRootDirectory(value);
                _addinAdapter.SetRootDirectory(value); 
                _addinBase.SetRootDirectory(value);
            } 
        } 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

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