Exemplo n.º 1
0
        public void CloseRequest(
            CloseFlagType closeFlagType,
            FileIdVolatileType volatileType,
            FileIdPersistentType persistentType)
        {
            Flags_Values flags = (closeFlagType == CloseFlagType.PostQueryAttribSet) ? Flags_Values.CLOSE_FLAG_POSTQUERY_ATTRIB : Flags_Values.NONE;

            FILEID file;

            file.Persistent = (persistentType == FileIdPersistentType.EqualToOpenDurableFileID) ? fileID.Persistent : (fileID.Persistent - 1);
            file.Volatile   = (volatileType == FileIdVolatileType.ValidFileIdVolatile) ? fileID.Volatile : 0;

            QueryResponseStatus queryResponse = QueryResponseStatus.QueryResponseNotExist;
            uint status = testClient.Close(
                treeId,
                file,
                (header, response) =>
            {
                if (response.FileAttributes != File_Attributes.NONE)
                {
                    queryResponse = QueryResponseStatus.QueryResponseExist;
                }
            },
                flags);

            CloseResponse((ModelSmb2Status)status, queryResponse);
        }
Exemplo n.º 2
0
 public ModelCloseRequest(
     CloseFlagType closeType,
     FileIdVolatileType volatileType,
     FileIdPersistentType persistentType) : base(0)
 {
     CloseType      = closeType;
     VolatileType   = volatileType;
     PersistentType = persistentType;
 }
Exemplo n.º 3
0
        public static void CloseRequest(
            CloseFlagType closeFlagType,
            FileIdVolatileType volatileType,
            FileIdPersistentType persistentType)
        {
            Condition.IsTrue(State == ModelState.Connected);
            Condition.IsNull(Request);

            Combination.Isolated(volatileType == FileIdVolatileType.InvalidFileIdVolatile);
            Combination.Isolated(persistentType == FileIdPersistentType.NotEqualToOpenDurableFileID);

            Request = new ModelCloseRequest(closeFlagType, volatileType, persistentType);
        }
        public void CloseRequest(
            CloseFlagType closeFlagType,
            FileIdVolatileType volatileType,
            FileIdPersistentType persistentType)
        {
            Flags_Values flags = (closeFlagType == CloseFlagType.PostQueryAttribSet) ? Flags_Values.CLOSE_FLAG_POSTQUERY_ATTRIB : Flags_Values.NONE;

            FILEID file;
            file.Persistent = (persistentType == FileIdPersistentType.EqualToOpenDurableFileID) ? fileID.Persistent : (fileID.Persistent - 1);
            file.Volatile = (volatileType == FileIdVolatileType.ValidFileIdVolatile) ? fileID.Volatile : 0;

            QueryResponseStatus queryResponse = QueryResponseStatus.QueryResponseNotExist;
            uint status = testClient.Close(
                treeId,
                file,
                (header, response) =>
                {
                    if (response.FileAttributes != File_Attributes.NONE)
                        queryResponse = QueryResponseStatus.QueryResponseExist;
                },
                flags);

            CloseResponse((ModelSmb2Status)status, queryResponse);
        }
 public ModelCloseRequest(
     CloseFlagType closeType,
     FileIdVolatileType volatileType,
     FileIdPersistentType persistentType)
     : base(0)
 {
     CloseType = closeType;
     VolatileType = volatileType;
     PersistentType = persistentType;
 }