当前位置: 首页>>代码示例>>C#>>正文


C# AccessMode类代码示例

本文整理汇总了C#中AccessMode的典型用法代码示例。如果您正苦于以下问题:C# AccessMode类的具体用法?C# AccessMode怎么用?C# AccessMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AccessMode类属于命名空间,在下文中一共展示了AccessMode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ZpAccessException

 /// <summary>
 /// Initializes a new instance of the <see cref="ZpAccessException"/> class.
 /// </summary>
 /// <param name="aMessage">The AccessException message.</param>
 /// <param name="aUserID">The UserID of the access controlled user.</param>
 /// <param name="aAccessMode">The AccessMode.</param>
 /// <param name="aObject">The access controlled object.</param>
 public ZpAccessException(string aMessage, string aUserID, AccessMode aAccessMode, string aObject)
     : base(aMessage)
 {
     _userID = aUserID;
     _accessMode = aAccessMode;
     _object = aObject;
 }
开发者ID:heinschulie,项目名称:z2z,代码行数:14,代码来源:ZpAccessException.cs

示例2: GXDLT645Property

 /// <summary>
 /// Constructor.
 /// </summary>
 public GXDLT645Property(ulong dataID, string name, DataType type, AccessMode access) : 
     base(name)
 {
     this.DataID = dataID;
     Type = type;
     this.AccessMode = access;
 }
开发者ID:giapdangle,项目名称:Gurux.DLT645.AddIn,代码行数:10,代码来源:GXDLT645Property.cs

示例3: ImageMapSegment

		public ImageMapSegment(string name, uint size, AccessMode access) : base(size) 
		{
			if (name == null)
				throw new ArgumentNullException("name", "Segments must have names.");
			this.Name = name;
			this.Access = access;
		}
开发者ID:melbcat,项目名称:reko,代码行数:7,代码来源:ImageMapSegment.cs

示例4: AddSegment

 public ImageSegment AddSegment(MemoryArea mem, string segmentName, AccessMode mode)
 {
     var segment = new ImageSegment(
             segmentName,
             mem,
             mode);
     AddSegment(segment);
     return segment;
 }
开发者ID:relaxar,项目名称:reko,代码行数:9,代码来源:SegmentMap.cs

示例5: OpenStreamAsync

		public Task<Stream> OpenStreamAsync(string boardName, AccessMode accessMode)
		{
			// Note that we do not need any preconditions here. They are inherited from
			// the base interface.

			return Task.FromResult(new FileStream(
				Path.Combine(this.boardsDirectory.Value, boardName),
				accessMode == AccessMode.Read ? FileMode.Open : FileMode.OpenOrCreate) as Stream);
		}
开发者ID:mkandroid15,项目名称:Samples,代码行数:9,代码来源:FileStreamManager.cs

示例6: ImageSegment

 public ImageSegment(string name, Address addr, long size, AccessMode access)
 {
     if (name == null)
         throw new ArgumentNullException("name", "Segments must have names.");
     this.Name = name;
     this.Size = (uint) size;
     this.Address = addr;
     this.Access = access;
 }
开发者ID:relaxar,项目名称:reko,代码行数:9,代码来源:ImageSegment.cs

示例7: Access

		/// <summary>
		/// Checks if the caller has access to the inode 
		/// </summary>
		/// <param name="path">The resource to check permissions for.</param>
		/// <returns>True if the requested access mode combination is available to the immediate caller. If any one requested access mode is not available, the result is false.</returns>
		public static bool Access(string path, AccessMode mode)
		{
			DirectoryEntry entry = PathResolver.Resolve(rootNode, ref path, PathResolutionFlags.DoNotThrowNotFoundException);
			if (null != entry) {
				return AccessCheck.Perform(entry, mode, AccessCheckFlags.NoThrow);
			}

			return false;
		}
开发者ID:sharpos,项目名称:SharpOS,代码行数:14,代码来源:VirtualFileSystem.cs

示例8: Lock

        public LockingObject Lock(AccessMode accessMode, bool enableSynchronize)
        {
            if (!enableSynchronize)
            {
                return null;
            }

            return this.Lock(accessMode);
        }
开发者ID:maanshancss,项目名称:ClassLibrary,代码行数:9,代码来源:SmartRWLocker.cs

示例9: OpenStreamAsync

		public async Task<Stream> OpenStreamAsync(string boardName, AccessMode accessMode)
		{
			// Note that we do not need any preconditions here. They are inherited from
			// the base interface.

			// Get reference to requested blob and open stream
			var blob = this.container.GetBlockBlobReference(boardName);
			return accessMode == AccessMode.Read
				? await blob.OpenReadAsync().ConfigureAwait(false)
				: await blob.OpenWriteAsync().ConfigureAwait(false);
		}
开发者ID:mkandroid15,项目名称:Samples,代码行数:11,代码来源:CloudBlobStreamManager.cs

示例10: getAccessString

	    public static String getAccessString(AccessMode access_mode) {
		    switch (access_mode) {
		    case AccessMode.ACCESS_READWRITE:
			    return "Read/Write";
            //case AccessMode.ACCESS_WRITEONLY:
			//    return "Write only";
            case AccessMode.ACCESS_READONLY:
			    return "Read only";
		    default:
			    return "unknowm Access Mode";
		    }
	    }
开发者ID:nguyenhunga5,项目名称:UavObject-.Net-Parser,代码行数:12,代码来源:UAVObjectMetaData.cs

示例11: ChangeAccessMode

 async Task ChangeAccessMode(AccessMode changeAccessMode, int portNo) {
     var s3f24 = await EAP.SendAsync(new SecsMessage(3, 23, "ChangeAccessMode",
         Item.L(
             Item.A("ChangeAccess"),
             Item.A(portNo.ToString()),
             Item.L(
                 Item.L(
                     Item.A("AccessMode"),
                     Item.B((byte)changeAccessMode))))));
     byte returnCode = (byte)s3f24.SecsItem.Items[0];
     if (returnCode != 0 && returnCode != 4)
         throw new ScenarioException("Change Loadport[" + portNo + "] access mode fial: " + s3f24.SecsItem.Items[1].Items[0].Items[1].GetValue<string>());
 }
开发者ID:mkjeff,项目名称:secs4net,代码行数:13,代码来源:TCS.AccessModeChange.cs

示例12: DocumentStoreWrapper

        internal DocumentStoreWrapper(
            string name, 
            AccessMode accessMode,
            Action<DocumentStoreWrapper> updateInnerStore)
        {
            name.Ensure("name").IsNotNullOrWhiteSpace();
            updateInnerStore.Ensure("updateInnerStore").IsNotNull();

            this.Name = name;
            this.AccessMode = accessMode;
            this.IsInitialized = false;
            this.UpdateInnerStore = updateInnerStore;
        }
开发者ID:tzarger,项目名称:brnkly,代码行数:13,代码来源:DocumentStoreWrapper.cs

示例13: Lock

        public LockingObject Lock(AccessMode accessMode)
        {
            if (accessMode == AccessMode.Read)
            {
                this.lastRequireReadTime = DateTime.Now;
            }
            else
            {
                this.lastRequireWriteTime = DateTime.Now;
            }

            return new LockingObject(this.readerWriterLock, accessMode);
        } 
开发者ID:summer-breeze,项目名称:ChengGouHui,代码行数:13,代码来源:SmartRWLocker.cs

示例14: OpenStreamAsync

		public Task<Stream> OpenStreamAsync(string boardName, AccessMode accessMode)
		{
			// Note that we cannot make this precondition a legacy-requires in our sample.
			Contract.Requires(boardName != null);

			// The following postcondition checks the resulting task.
			Contract.Ensures(Contract.Result<Task<Stream>>() != null);

			// The following postcondition checks the result once the Task has been completed.
			Contract.Ensures(Contract.Result<Task<Stream>>().Result != null);

			return default(Task<Stream>);
		}
开发者ID:mkandroid15,项目名称:Samples,代码行数:13,代码来源:StreamManagerContract.cs

示例15: LockingObject

        public LockingObject(ReaderWriterLock _lock, AccessMode _lockMode)
        {
            readerWriterLock = _lock;
            accessMode = _lockMode;

            if (accessMode == AccessMode.Read)
            {
                readerWriterLock.AcquireReaderLock(-1);
            }
            else
            {
                readerWriterLock.AcquireWriterLock(-1);
            }
        }
开发者ID:wxgb9801,项目名称:Measurer,代码行数:14,代码来源:LockingObject.cs


注:本文中的AccessMode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。