public ModelLeaseBreakAckRequest( ModelLeaseKeyType modelLeaseKeyType, uint leaseState) : base(0) { this.modelLeaseKeyType = modelLeaseKeyType; this.LeaseState = leaseState; }
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); }
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); }
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); }