コード例 #1
0
 internal IISWebServer()
 {
     iID            = -1;
     sServerName    = "";
     sRootPath      = "";
     vdcDirectories = new IISWebVirtualDirectoryCollection();
     wdcDirectories = new IISWebDirectoryCollection();
 }
コード例 #2
0
ファイル: IISWebDirectory.cs プロジェクト: skitsanos/WDK9
 internal IISWebDirectory()
 {
     _sName         = "";
     _sPath         = "";
     _isApplication = false;
     _iWebServerID  = -1;
     wdc            = new IISWebDirectoryCollection();
 }
コード例 #3
0
ファイル: IISWebServer.cs プロジェクト: skitsanos/WDK9
 internal IISWebServer()
 {
     iID = -1;
     sServerName = "";
     sRootPath = "";
     vdcDirectories = new IISWebVirtualDirectoryCollection();
     wdcDirectories = new IISWebDirectoryCollection();
 }
コード例 #4
0
ファイル: IISWebDirectory.cs プロジェクト: skitsanos/WDK9
 internal IISWebDirectory()
 {
     _sName = "";
     _sPath = "";
     _isApplication = false;
     _iWebServerID = -1;
     wdc = new IISWebDirectoryCollection();
 }
コード例 #5
0
ファイル: IISManager.cs プロジェクト: skitsanos/WDK9
        private static void AddWebDirectories(DirectoryEntry o, string sParentPath, IISWebDirectoryCollection wdcParent,
                                              int iServerID, string sPhisicalPath)
        {
            IEnumerator iEnumerator = o.Children.GetEnumerator();

            try
            {
                while (iEnumerator.MoveNext())
                {
                    var directoryEntry = (DirectoryEntry)iEnumerator.Current;
                    if (directoryEntry.SchemaClassName.ToUpper() == "IIsWebDirectory".ToUpper() &&
                        Directory.Exists(String.Concat(sPhisicalPath, "\\", directoryEntry.Name)))
                    {
                        var iISWebDirectory = new IISWebDirectory
                        {
                            _sPath = String.Concat(sParentPath, "/", directoryEntry.Name),
                            _sName = directoryEntry.Name
                        };
                        if (directoryEntry.Properties["AppRoot"][0].ToString().ToUpper() ==
                            String.Concat("/LM/W3SVC/", iServerID, "/ROOT") ||
                            directoryEntry.Properties["AppRoot"][0].ToString().ToUpper() ==
                            String.Concat(new object[] { "/LM/W3SVC/", iServerID, "/ROOT", sParentPath.ToUpper() }))
                        {
                            iISWebDirectory._isApplication = false;
                        }
                        else
                        {
                            iISWebDirectory._isApplication = true;
                        }
                        iISWebDirectory._iWebServerID = iServerID;
                        AddWebDirectories(new DirectoryEntry(String.Concat(o.Path, "/", directoryEntry.Name)),
                                          iISWebDirectory._sPath, iISWebDirectory.NestedWebDirectories, iServerID,
                                          String.Concat(sPhisicalPath, "\\", directoryEntry.Name));
                        wdcParent.Add(iISWebDirectory);
                    }
                }
            }
            finally
            {
                var iDisposable = iEnumerator as IDisposable;
                if (iDisposable != null)
                {
                    iDisposable.Dispose();
                }
            }
        }
コード例 #6
0
ファイル: IISManager.cs プロジェクト: skitsanos/WDK9
 private static void AddWebDirectories(DirectoryEntry o, string sParentPath, IISWebDirectoryCollection wdcParent,
                                int iServerID, string sPhisicalPath)
 {
     IEnumerator iEnumerator = o.Children.GetEnumerator();
     try
     {
         while (iEnumerator.MoveNext())
         {
             var directoryEntry = (DirectoryEntry) iEnumerator.Current;
             if (directoryEntry.SchemaClassName.ToUpper() == "IIsWebDirectory".ToUpper() &&
                 Directory.Exists(String.Concat(sPhisicalPath, "\\", directoryEntry.Name)))
             {
                 var iISWebDirectory = new IISWebDirectory
                                           {
                                               _sPath = String.Concat(sParentPath, "/", directoryEntry.Name),
                                               _sName = directoryEntry.Name
                                           };
                 if (directoryEntry.Properties["AppRoot"][0].ToString().ToUpper() ==
                     String.Concat("/LM/W3SVC/", iServerID, "/ROOT") ||
                     directoryEntry.Properties["AppRoot"][0].ToString().ToUpper() ==
                     String.Concat(new object[] {"/LM/W3SVC/", iServerID, "/ROOT", sParentPath.ToUpper()}))
                 {
                     iISWebDirectory._isApplication = false;
                 }
                 else
                 {
                     iISWebDirectory._isApplication = true;
                 }
                 iISWebDirectory._iWebServerID = iServerID;
                 AddWebDirectories(new DirectoryEntry(String.Concat(o.Path, "/", directoryEntry.Name)),
                                   iISWebDirectory._sPath, iISWebDirectory.NestedWebDirectories, iServerID,
                                   String.Concat(sPhisicalPath, "\\", directoryEntry.Name));
                 wdcParent.Add(iISWebDirectory);
             }
         }
     }
     finally
     {
         var iDisposable = iEnumerator as IDisposable;
         if (iDisposable != null)
         {
             iDisposable.Dispose();
         }
     }
 }