public static void TreeConnectRequest(ModelSharePath sharePath)
        {
            Condition.IsTrue(State == ModelState.Connected);
            Condition.IsFalse(Session_TreeConnectExist);
            Condition.IsNull(Request);

            // If Security Context is Non Admin, InvalidPath is not used.
            Condition.IfThen(
                Session_SecurityContext == ModelSessionSecurityContext.NonAdmin,
                sharePath != ModelSharePath.InvalidSharePath);

            Request = new ModelTreeMgmtTreeConnectRequest(sharePath);
        }
Пример #2
0
        public void TreeConnectRequest(ModelSharePath sharePath)
        {
            string treeConnectShare = null;

            switch (sharePath)
            {
            case ModelSharePath.InvalidSharePath:
                // generate GUID for the name of share folder
                treeConnectShare = Guid.NewGuid().ToString();
                Site.Log.Add(
                    LogEntryKind.Debug,
                    "Generate Invalid Share Name {0}", treeConnectShare);
                break;

            case ModelSharePath.SpecialSharePath:
                treeConnectShare = testConfig.SpecialShare;
                break;

            case ModelSharePath.ValidSharePath:
                treeConnectShare = testConfig.BasicFileShare;
                break;

            default:
                throw new InvalidOperationException(sharePath + " is not supported.");
            }

            TREE_CONNECT_Response?treeConnectResponse = null;

            uint status = testClient.TreeConnect(
                string.Format("\\\\{0}\\{1}", testConfig.SutComputerName, treeConnectShare),
                out this.treeId,
                checker: (header, response) =>
            {
                treeConnectResponse = response;
            });

            TreeConnectResponse((ModelSmb2Status)status, treeConnectResponse.Value.ShareType, treeMgmtConfig);
        }
        public static void TreeConnectRequest(ModelSharePath sharePath)
        {
            Condition.IsTrue(State == ModelState.Connected);
            Condition.IsFalse(Session_TreeConnectExist);
            Condition.IsNull(Request);

            // If Security Context is Non Admin, InvalidPath is not used.
            Condition.IfThen(
                Session_SecurityContext == ModelSessionSecurityContext.NonAdmin,
                sharePath != ModelSharePath.InvalidSharePath);

            Request = new ModelTreeMgmtTreeConnectRequest(sharePath);
        }
 public ModelTreeMgmtTreeConnectRequest(ModelSharePath sharePath)
     : base(0)
 {
     this.sharePath = sharePath;
 }
Пример #5
0
 public ModelTreeMgmtTreeConnectRequest(ModelSharePath sharePath)
     : base(0)
 {
     this.sharePath = sharePath;
 }
        public void TreeConnectRequest(ModelSharePath sharePath)
        {
            string treeConnectShare = null;
            switch (sharePath)
            {
                case ModelSharePath.InvalidSharePath:
                    // generate GUID for the name of share folder
                    treeConnectShare = Guid.NewGuid().ToString();
                    Site.Log.Add(
                        LogEntryKind.Debug,
                        "Generate Invalid Share Name {0}", treeConnectShare);
                    break;
                case ModelSharePath.SpecialSharePath:
                    treeConnectShare = testConfig.SpecialShare;
                    break;
                case ModelSharePath.ValidSharePath:
                    treeConnectShare = testConfig.BasicFileShare;
                    break;
                default:
                    throw new InvalidOperationException(sharePath + " is not supported.");
            }

            TREE_CONNECT_Response? treeConnectResponse = null;

            uint status = testClient.TreeConnect(
                string.Format("\\\\{0}\\{1}", testConfig.SutComputerName, treeConnectShare),
                out this.treeId,
                checker: (header, response)=>
                {
                    treeConnectResponse = response;
                });

            TreeConnectResponse((ModelSmb2Status)status, treeConnectResponse.Value.ShareType, treeMgmtConfig);
        }