BindValidationContext.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / Compiler / Validation / BindValidationContext.cs / 1305376 / BindValidationContext.cs

                            namespace System.Workflow.ComponentModel.Compiler 
{
    using System;

    #region BindValidationContext 

    [Flags] 
    public enum AccessTypes 
    {
        Read = 0x01, 
        Write = 0x02,
        ReadWrite = Read | Write
    }
 
    public sealed class BindValidationContext
    { 
        private Type targetType = null; 
        private AccessTypes access = AccessTypes.Read;
 
        public BindValidationContext(Type targetType)
            : this(targetType, AccessTypes.Read)
        {
        } 

        public BindValidationContext(Type targetType, AccessTypes access) 
        { 
            if (targetType == null)
                throw new ArgumentNullException("targetType"); 
            this.targetType = targetType;
            this.access = access;
        }
 
        public Type TargetType
        { 
            get 
            {
                return this.targetType; 
            }
        }

        public AccessTypes Access 
        {
            get 
            { 
                return this.access;
            } 
        }
    }

    #endregion 
}

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