InstanceLockQueryResult.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 / System.Runtime.DurableInstancing / System / Runtime / DurableInstancing / InstanceLockQueryResult.cs / 1305376 / InstanceLockQueryResult.cs

                            //---------------------------------------------------------------- 
// Copyright (c) Microsoft Corporation.  All rights reserved.
//---------------------------------------------------------------

namespace System.Runtime.DurableInstancing 
{
    using System.Collections.Generic; 
    using System.Xml.Linq; 

    [Fx.Tag.XamlVisible(false)] 
    public sealed class InstanceLockQueryResult : InstanceStoreQueryResult
    {
        static readonly ReadOnlyDictionary EmptyQueryResult = new ReadOnlyDictionary(new Dictionary(0), false);
 
        // Zero
        public InstanceLockQueryResult() 
        { 
            InstanceOwnerIds = EmptyQueryResult;
        } 

        // One
        public InstanceLockQueryResult(Guid instanceId, Guid instanceOwnerId)
        { 
            Dictionary owners = new Dictionary(1);
            owners.Add(instanceId, instanceOwnerId); 
            InstanceOwnerIds = new ReadOnlyDictionary(owners, false); 
        }
 
        // N
        public InstanceLockQueryResult(IDictionary instanceOwnerIds)
        {
            InstanceOwnerIds = new ReadOnlyDictionary(instanceOwnerIds); 
        }
 
        public IDictionary InstanceOwnerIds { get; private set; } 
    }
} 

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