コード例 #1
0
 public ModelLeaseBreakAckRequest(
     ModelLeaseKeyType modelLeaseKeyType,
     uint leaseState)
     : base(0)
 {
     this.modelLeaseKeyType = modelLeaseKeyType;
     this.LeaseState        = leaseState;
 }
コード例 #2
0
        public static void LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType modelLeaseKeyType, uint leaseState)
        {
            Condition.IsTrue(state == ModelState.Connected);
            Condition.IsNull(request);

            Condition.In <uint>(leaseState, 0, 1, 3, 5, 7);
            request = new ModelLeaseBreakAckRequest(modelLeaseKeyType, leaseState);
        }
コード例 #3
0
 public ModelLeaseBreakAckRequest(
     ModelLeaseKeyType modelLeaseKeyType,
     uint leaseState)
     : base(0)
 {
     this.modelLeaseKeyType = modelLeaseKeyType;
     this.LeaseState = leaseState;
 }
コード例 #4
0
        public void LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType modelLeaseKeyType, uint leaseState)
        {
            Guid leaseKey = ((modelLeaseKeyType == ModelLeaseKeyType.ValidLeaseKey) ? LeaseKey : Guid.NewGuid());

            uint status = 0;
            Packet_Header header;
            LEASE_BREAK_Response leaseBreakResp;

            status = originalClient.Client.LeaseBreakAcknowledgment(1, 1, originalClient.Flags, originalClient.MessageId++, originalClient.SessionId,
                originalClient.TreeId, leaseKey, (LeaseStateValues)leaseState, out header, out leaseBreakResp);

            Site.Assert.AreEqual<Smb2Command>(Smb2Command.OPLOCK_BREAK, header.Command, "Expect that the Command is OPLOCK_BREAK.");

            if (status == Smb2Status.STATUS_SUCCESS)
            {
                Site.CaptureRequirementIfAreEqual<ushort>(36, leaseBreakResp.StructureSize,
                    RequirementCategory.MUST_BE_SPECIFIED_VALUE.Id,
                    RequirementCategory.MUST_BE_SPECIFIED_VALUE.Description);
                Site.CaptureRequirementIfAreEqual<ulong>(0, leaseBreakResp.Reserved,
                    RequirementCategory.MUST_BE_ZERO.Id,
                    RequirementCategory.MUST_BE_ZERO.Description);
                Site.CaptureRequirementIfAreEqual<ulong>(0, leaseBreakResp.Flags,
                    RequirementCategory.MUST_BE_ZERO.Id,
                    RequirementCategory.MUST_BE_ZERO.Description);
                Site.Assert.AreEqual<Guid>(leaseKey, leaseBreakResp.LeaseKey, "Expect that the field LeaseKey equals {0}.", leaseKey.ToString());
                Site.CaptureRequirementIfAreEqual<ulong>(0, leaseBreakResp.LeaseDuration,
                    RequirementCategory.MUST_BE_ZERO.Id,
                    RequirementCategory.MUST_BE_ZERO.Description);
            }

            originalClient.LeaseState = leaseBreakResp.LeaseState;
            this.LeaseBreakResponse((ModelSmb2Status)status, (uint)leaseBreakResp.LeaseState);
        }
コード例 #5
0
        public static void LeaseBreakAcknowledgmentRequest(ModelLeaseKeyType modelLeaseKeyType, uint leaseState)
        {
            Condition.IsTrue(state == ModelState.Connected);
            Condition.IsNull(request);

            Condition.In<uint>(leaseState, 0, 1, 3, 5, 7);
            request = new ModelLeaseBreakAckRequest(modelLeaseKeyType, leaseState);
        }