public static void OplockBreakAcknowledgementRequest(OplockVolatilePortion volatilePortion, OplockPersistentPortion persistentPortion, OplockLevel_Values oplockLevel) { Combination.Isolated(volatilePortion == OplockVolatilePortion.VolatilePortionNotFound); Combination.Isolated(persistentPortion == OplockPersistentPortion.PersistentNotMatchesDurableFileId); // Isolate the values that are not allowed Combination.Isolated(oplockLevel == OplockLevel_Values.OPLOCK_LEVEL_BATCH); Combination.Isolated(oplockLevel == OplockLevel_Values.OPLOCK_LEVEL_EXCLUSIVE); Combination.Isolated(oplockLevel == OplockLevel_Values.OPLOCK_LEVEL_LEASE); Condition.IsTrue(State == ModelState.Connected); Condition.IsNull(Request); bool volatilePortionFound = volatilePortion == OplockVolatilePortion.VolatilePortionFound; bool persistentMatchesDurableFileId = persistentPortion == OplockPersistentPortion.PersistentMatchesDurableFileId; Request = new ModelOplockBreakAcknowledgementRequest(volatilePortionFound, persistentMatchesDurableFileId, oplockLevel); }
public void OplockBreakAcknowledgementRequest(OplockVolatilePortion volatilePortion, OplockPersistentPortion persistentPortion, OplockLevel_Values oplockLevel) { bool volatilePortionFound = volatilePortion == OplockVolatilePortion.VolatilePortionFound; bool persistentMatchesDurableFileId = persistentPortion == OplockPersistentPortion.PersistentMatchesDurableFileId; FILEID fileIdRequest = fileId; if(!volatilePortionFound) { fileIdRequest.Volatile = FILEID.Invalid.Volatile; } if(!persistentMatchesDurableFileId) { fileIdRequest.Persistent = FILEID.Invalid.Persistent; } OPLOCK_BREAK_Response? oplockBreakResponse = null; uint status = testClient.OplockAcknowledgement(treeId, fileIdRequest, (OPLOCK_BREAK_Acknowledgment_OplockLevel_Values)oplockLevel, (header, response) => { oplockBreakResponse = response; }); OplockBreakResponse((ModelSmb2Status)status, oplockBreakResponse.Value.OplockLevel, oplockLevelOnOpen); }
public static void OplockBreakAcknowledgementRequest(OplockVolatilePortion volatilePortion, OplockPersistentPortion persistentPortion, OplockLevel_Values oplockLevel) { Combination.Isolated(volatilePortion == OplockVolatilePortion.VolatilePortionNotFound); Combination.Isolated(persistentPortion == OplockPersistentPortion.PersistentNotMatchesDurableFileId); // Isolate the values that are not allowed Combination.Isolated(oplockLevel == OplockLevel_Values.OPLOCK_LEVEL_BATCH); Combination.Isolated(oplockLevel == OplockLevel_Values.OPLOCK_LEVEL_EXCLUSIVE); Combination.Isolated(oplockLevel == OplockLevel_Values.OPLOCK_LEVEL_LEASE); Condition.IsTrue(State == ModelState.Connected); Condition.IsNull(Request); bool volatilePortionFound = volatilePortion == OplockVolatilePortion.VolatilePortionFound; bool persistentMatchesDurableFileId = persistentPortion == OplockPersistentPortion.PersistentMatchesDurableFileId; Request = new ModelOplockBreakAcknowledgementRequest(volatilePortionFound, persistentMatchesDurableFileId, oplockLevel); }
public void OplockBreakAcknowledgementRequest(OplockVolatilePortion volatilePortion, OplockPersistentPortion persistentPortion, OplockLevel_Values oplockLevel) { bool volatilePortionFound = volatilePortion == OplockVolatilePortion.VolatilePortionFound; bool persistentMatchesDurableFileId = persistentPortion == OplockPersistentPortion.PersistentMatchesDurableFileId; FILEID fileIdRequest = fileId; if (!volatilePortionFound) { fileIdRequest.Volatile = FILEID.Invalid.Volatile; } if (!persistentMatchesDurableFileId) { fileIdRequest.Persistent = FILEID.Invalid.Persistent; } OPLOCK_BREAK_Response?oplockBreakResponse = null; uint status = testClient.OplockAcknowledgement(treeId, fileIdRequest, (OPLOCK_BREAK_Acknowledgment_OplockLevel_Values)oplockLevel, (header, response) => { oplockBreakResponse = response; }); OplockBreakResponse((ModelSmb2Status)status, oplockBreakResponse.Value.OplockLevel, oplockLevelOnOpen); }