Beispiel #1
0
 // Token: 0x06004FA4 RID: 20388 RVA: 0x001262E0 File Offset: 0x001244E0
 public byte[][] Serialize()
 {
     byte[][] result;
     using (MemoryStream memoryStream = new MemoryStream())
     {
         using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream))
         {
             byte[][] array = new byte[3][];
             binaryWriter.Write(this.DiscoveryStarted.ToBinary());
             binaryWriter.Write((int)this.TopologyScope);
             binaryWriter.Write(this.LocalServerFqdn);
             SimpleADObject.WriteList(binaryWriter, this.Sites);
             SimpleADObject.WriteList(binaryWriter, this.SiteLinks);
             SimpleADObject.WriteList(binaryWriter, this.Servers);
             array[0] = memoryStream.ToArray();
             memoryStream.SetLength(0L);
             SimpleADObject.WriteList(binaryWriter, this.VirtualDirectories);
             SimpleADObject.WriteList(binaryWriter, this.EmailTransports);
             SimpleADObject.WriteList(binaryWriter, this.SmtpReceiveConnectors);
             array[1] = memoryStream.ToArray();
             memoryStream.SetLength(0L);
             SimpleADObject.WriteList(binaryWriter, this.ADServers);
             array[2] = memoryStream.ToArray();
             result   = array;
         }
     }
     return(result);
 }
Beispiel #2
0
            // Token: 0x06004FA1 RID: 20385 RVA: 0x0012602C File Offset: 0x0012422C
            public static ExchangeTopologyDiscovery CreateFrom(ExchangeTopologyDiscovery.Simple topology)
            {
                ArgumentValidator.ThrowIfNull("topology", topology);
                ExchangeTopologyDiscovery exchangeTopologyDiscovery = new ExchangeTopologyDiscovery(topology.DiscoveryStarted, topology.TopologyScope);

                exchangeTopologyDiscovery.localServerFqdn       = topology.LocalServerFqdn;
                exchangeTopologyDiscovery.sites                 = SimpleADObject.CreateList <ADSite>(topology.Sites, ExchangeTopologyDiscovery.Simple.aDSiteSchema, null);
                exchangeTopologyDiscovery.siteLinks             = SimpleADObject.CreateList <ADSiteLink>(topology.SiteLinks, ExchangeTopologyDiscovery.Simple.aDSiteLinkSchema, null);
                exchangeTopologyDiscovery.servers               = SimpleADObject.CreateList <MiniTopologyServer>(topology.Servers, ExchangeTopologyDiscovery.Simple.serverSchema, null);
                exchangeTopologyDiscovery.virtualDirectories    = SimpleADObject.CreateList <MiniVirtualDirectory>(topology.VirtualDirectories, ExchangeTopologyDiscovery.Simple.virtualDirectorySchema, null);
                exchangeTopologyDiscovery.emailTransports       = SimpleADObject.CreateList <MiniEmailTransport>(topology.EmailTransports, ExchangeTopologyDiscovery.Simple.emailTransportSchema, null);
                exchangeTopologyDiscovery.smtpReceiveConnectors = SimpleADObject.CreateList <MiniReceiveConnector>(topology.SmtpReceiveConnectors, ExchangeTopologyDiscovery.Simple.receiveConnectorSchema, null);
                List <ADServer> list = SimpleADObject.CreateList <ADServer>(topology.ADServers, ExchangeTopologyDiscovery.Simple.aDServerSchema, null);

                exchangeTopologyDiscovery.aDServers = new ReadOnlyCollection <ADServer>(list);
                return(exchangeTopologyDiscovery);
            }
Beispiel #3
0
 // Token: 0x06004FA0 RID: 20384 RVA: 0x00125F70 File Offset: 0x00124170
 public static ExchangeTopologyDiscovery.Simple CreateFrom(ExchangeTopologyDiscovery topologyDiscovery)
 {
     ArgumentValidator.ThrowIfNull("topologyDiscovery", topologyDiscovery);
     return(new ExchangeTopologyDiscovery.Simple
     {
         DiscoveryStarted = topologyDiscovery.discoveryStarted,
         TopologyScope = topologyDiscovery.topologyScope,
         LocalServerFqdn = topologyDiscovery.localServerFqdn,
         Sites = SimpleADObject.CreateList <ADSite>(topologyDiscovery.sites),
         SiteLinks = SimpleADObject.CreateList <ADSiteLink>(topologyDiscovery.siteLinks),
         Servers = SimpleADObject.CreateList <MiniTopologyServer>(topologyDiscovery.servers),
         VirtualDirectories = SimpleADObject.CreateList <MiniVirtualDirectory>(topologyDiscovery.virtualDirectories),
         EmailTransports = SimpleADObject.CreateList <MiniEmailTransport>(topologyDiscovery.emailTransports),
         SmtpReceiveConnectors = SimpleADObject.CreateList <MiniReceiveConnector>(topologyDiscovery.smtpReceiveConnectors),
         ADServers = SimpleADObject.CreateList <ADServer>(topologyDiscovery.aDServers)
     });
 }
Beispiel #4
0
 // Token: 0x06004FA2 RID: 20386 RVA: 0x0012610C File Offset: 0x0012430C
 public static ExchangeTopologyDiscovery.Simple Deserialize(byte[][] data)
 {
     ArgumentValidator.ThrowIfNull("data", data);
     if (data.Length != 3 || data[0] == null || data[1] == null || data[2] == null)
     {
         throw new ArgumentException("data");
     }
     ExchangeTopologyDiscovery.Simple simple = new ExchangeTopologyDiscovery.Simple();
     using (MemoryStream memoryStream = new MemoryStream(data[0]))
     {
         using (BinaryReader binaryReader = new BinaryReader(memoryStream))
         {
             simple.DiscoveryStarted = DateTime.FromBinary(binaryReader.ReadInt64());
             simple.TopologyScope    = (ExchangeTopologyScope)binaryReader.ReadInt32();
             simple.LocalServerFqdn  = binaryReader.ReadString();
             simple.Sites            = SimpleADObject.ReadList(binaryReader);
             simple.SiteLinks        = SimpleADObject.ReadList(binaryReader);
             simple.Servers          = SimpleADObject.ReadList(binaryReader);
         }
     }
     using (MemoryStream memoryStream2 = new MemoryStream(data[1]))
     {
         using (BinaryReader binaryReader2 = new BinaryReader(memoryStream2))
         {
             simple.VirtualDirectories    = SimpleADObject.ReadList(binaryReader2);
             simple.EmailTransports       = SimpleADObject.ReadList(binaryReader2);
             simple.SmtpReceiveConnectors = SimpleADObject.ReadList(binaryReader2);
         }
     }
     using (MemoryStream memoryStream3 = new MemoryStream(data[2]))
     {
         using (BinaryReader binaryReader3 = new BinaryReader(memoryStream3))
         {
             simple.ADServers = SimpleADObject.ReadList(binaryReader3);
         }
     }
     return(simple);
 }
Beispiel #5
0
 // Token: 0x06004FA5 RID: 20389 RVA: 0x001263E4 File Offset: 0x001245E4
 public bool Equals(ExchangeTopologyDiscovery.Simple right)
 {
     return(right != null && (this.TopologyScope == right.TopologyScope && this.LocalServerFqdn == right.LocalServerFqdn && SimpleADObject.ListEquals(this.Sites, right.Sites) && SimpleADObject.ListEquals(this.SiteLinks, right.SiteLinks) && SimpleADObject.ListEquals(this.Servers, right.Servers) && SimpleADObject.ListEquals(this.VirtualDirectories, right.VirtualDirectories) && SimpleADObject.ListEquals(this.EmailTransports, right.EmailTransports) && SimpleADObject.ListEquals(this.SmtpReceiveConnectors, right.SmtpReceiveConnectors)) && SimpleADObject.ListEquals(this.ADServers, right.ADServers));
 }