示例#1
0
        private ExtensibleMessageInfo[] GetMessageInfo(long internalId)
        {
            TextFilter obj = new TextFilter(MessageInfoSchema.Identity, new MessageIdentity(internalId).ToString(), MatchOptions.FullString, MatchFlags.Default);

            byte[]    queryFilterBytes = Serialization.ObjectToBytes(obj);
            byte[]    sortOrder        = Serialization.ObjectToBytes(QueueClient.emptySortOrder);
            int       num  = 0;
            int       num2 = 0;
            Exception ex   = null;

            try
            {
                byte[] queueViewerObjectPage = base.GetQueueViewerObjectPage(QVObjectType.MessageInfo, queryFilterBytes, sortOrder, true, int.MaxValue, null, -1, false, true, true, null, ref num, ref num2);
                return(this.GetExtensibleMessageInfo((MessageInfo[])Serialization.BytesToObject(queueViewerObjectPage)));
            }
            catch (RpcException ex2)
            {
                ex = ex2;
            }
            catch (SerializationException ex3)
            {
                ex = ex3;
            }
            TraceWrapper.SearchLibraryTracer.TraceError <Exception>(this.GetHashCode(), "RPC or Deserialize exception: {0}", ex);
            TrackingTransientException.AddAndRaiseETX(this.directoryContext.Errors, ErrorCode.QueueViewerConnectionFailure, this.serverName, ex.ToString());
            return(null);
        }
示例#2
0
 public static DagNetworkConfiguration GetDagNetworkConfig(string serverName)
 {
     byte[] configAsBytes = null;
     DagNetworkRpc.RunRpcOperation(serverName, delegate(ReplayRpcClient rpcClient)
     {
         ExTraceGlobals.DatabaseAvailabilityGroupTracer.TraceDebug <string>(0L, "GetDagNetworkConfig sending RPC to {0}", serverName);
         return(rpcClient.GetDagNetworkConfig(ref configAsBytes));
     });
     return((DagNetworkConfiguration)Serialization.BytesToObject(configAsBytes));
 }
示例#3
0
 // Token: 0x06001895 RID: 6293 RVA: 0x000651F0 File Offset: 0x000633F0
 public static TestNetworkParms FromBytes(byte[] bytes)
 {
     return((TestNetworkParms)Serialization.BytesToObject(bytes));
 }
 // Token: 0x060017D9 RID: 6105 RVA: 0x000628F0 File Offset: 0x00060AF0
 private int ReadData(byte[] buf, int off, int len)
 {
     if (this.m_bytesRemainingToReadInCurrentBlock > 0)
     {
         int num = Math.Min(len, this.m_bytesRemainingToReadInCurrentBlock);
         if (this.m_curBlockType == NetworkPackagingLayer.PackageEncoding.Raw)
         {
             int num2 = this.m_tcpChannel.TryReadChunk(buf, off, num);
             this.m_bytesRemainingToReadInCurrentBlock -= num2;
             return(num2);
         }
         int sourceIndex = this.m_decompressBufContentLen - this.m_bytesRemainingToReadInCurrentBlock;
         Array.Copy(this.m_decompressBuf, sourceIndex, buf, off, num);
         this.m_bytesRemainingToReadInCurrentBlock -= num;
         return(num);
     }
     else
     {
         if (this.m_asyncReadByteCount > 0)
         {
             this.m_asyncReadByteCount = 0;
         }
         else
         {
             this.ReadChunk(this.m_readPacketHeaderBuf, 0, 1);
         }
         this.m_curBlockType = (NetworkPackagingLayer.PackageEncoding) this.m_readPacketHeaderBuf[0];
         if (this.m_curBlockType == NetworkPackagingLayer.PackageEncoding.SerializedException)
         {
             NetworkPackagingLayer.Tracer.TraceDebug((long)this.GetHashCode(), "NetPkg.ReadData found incoming exception");
             this.ReadChunk(this.m_readPacketHeaderBuf, 0, 4);
             int num3 = BitConverter.ToInt32(this.m_readPacketHeaderBuf, 0);
             this.CheckBlockLen(num3);
             byte[] array = new byte[num3];
             this.ReadChunk(array, 0, num3);
             Exception ex;
             try
             {
                 ex = (Exception)Serialization.BytesToObject(array);
             }
             catch (SerializationException ex2)
             {
                 this.m_netChannel.TraceError("Exception deserialization failed:{0}", new object[]
                 {
                     ex2
                 });
                 ex = new NetworkRemoteExceptionUnknown(this.m_netChannel.PartnerNodeName, ex2.Message, ex2);
             }
             catch (TargetInvocationException ex3)
             {
                 this.m_netChannel.TraceError("Exception deserialization failed:{0}", new object[]
                 {
                     ex3
                 });
                 if (ex3.InnerException == null || !(ex3.InnerException is SerializationException))
                 {
                     throw;
                 }
                 ex = new NetworkRemoteExceptionUnknown(this.m_netChannel.PartnerNodeName, ex3.Message, ex3);
             }
             throw new NetworkRemoteException(this.m_netChannel.PartnerNodeName, ex.Message, ex);
         }
         if (this.m_curBlockType == NetworkPackagingLayer.PackageEncoding.Raw)
         {
             this.ReadChunk(this.m_readPacketHeaderBuf, 0, 4);
             this.m_bytesRemainingToReadInCurrentBlock = BitConverter.ToInt32(this.m_readPacketHeaderBuf, 0);
             int num  = Math.Min(len, this.m_bytesRemainingToReadInCurrentBlock);
             int num2 = this.m_tcpChannel.TryReadChunk(buf, off, num);
             this.m_bytesRemainingToReadInCurrentBlock -= num2;
             this.TotalDecompressedBytesReceived       += (long)num2;
             this.TotalCompressedBytesReceived         += (long)num2;
             return(num2);
         }
         if (this.m_curBlockType == NetworkPackagingLayer.PackageEncoding.Xpress)
         {
             return(this.ReadXpressBlock(buf, off, len));
         }
         if (this.m_curBlockType == NetworkPackagingLayer.PackageEncoding.Coconet)
         {
             return(this.ReadCoconetBlock(buf, off, len));
         }
         this.m_netChannel.TraceError("Unknown packet encoding: {0}", new object[]
         {
             this.m_curBlockType
         });
         throw new NetworkCorruptDataException(this.PartnerNodeName);
     }
 }
        internal static void GetEntryFromStatus(RpcDatabaseCopyStatus2 copyStatus, DatabaseCopyStatusEntry entry)
        {
            CopyStatusEnum copyStatus2 = copyStatus.CopyStatus;
            CopyStatus     copyStatus3 = GetMailboxDatabaseCopyStatus.TranslateRpcStatusToTaskStatus(copyStatus2);

            entry.Status = copyStatus3;
            entry.m_statusRetrievedTime      = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.StatusRetrievedTime);
            entry.m_lastStatusTransitionTime = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LastStatusTransitionTime);
            entry.InstanceStartTime          = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.InstanceStartTime);
            entry.m_errorMessage             = copyStatus.ErrorMessage;
            entry.m_errorEventId             = ((copyStatus.ErrorEventId != 0U) ? new uint?(copyStatus.ErrorEventId) : null);
            entry.m_extendedErrorInfo        = copyStatus.ExtendedErrorInfo;
            if (copyStatus3 == CopyStatus.Suspended || copyStatus3 == CopyStatus.FailedAndSuspended || copyStatus3 == CopyStatus.Seeding)
            {
                entry.m_suspendMessage = copyStatus.SuspendComment;
            }
            entry.m_singlePageRestore  = copyStatus.SinglePageRestoreNumber;
            entry.m_mailboxServer      = copyStatus.MailboxServer;
            entry.m_activeDatabaseCopy = copyStatus.ActiveDatabaseCopy;
            entry.m_actionInitiator    = copyStatus.ActionInitiator;
            entry.ActiveCopy           = copyStatus.IsActiveCopy();
            if (copyStatus.ActivationPreference > 0)
            {
                entry.ActivationPreference = new int?(copyStatus.ActivationPreference);
            }
            entry.IsLastCopyAvailabilityChecksPassed   = new bool?(copyStatus.IsLastCopyAvailabilityChecksPassed);
            entry.IsLastCopyRedundancyChecksPassed     = new bool?(copyStatus.IsLastCopyRedundancyChecksPassed);
            entry.LastCopyAvailabilityChecksPassedTime = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LastCopyAvailabilityChecksPassedTime);
            entry.LastCopyRedundancyChecksPassedTime   = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LastCopyRedundancyChecksPassedTime);
            entry.DiskFreeSpacePercent                 = copyStatus.DiskFreeSpacePercent;
            entry.DiskFreeSpace                        = ByteQuantifiedSize.FromBytes(copyStatus.DiskFreeSpaceBytes);
            entry.DiskTotalSpace                       = ByteQuantifiedSize.FromBytes(copyStatus.DiskTotalSpaceBytes);
            entry.ExchangeVolumeMountPoint             = copyStatus.ExchangeVolumeMountPoint;
            entry.DatabaseVolumeMountPoint             = copyStatus.DatabaseVolumeMountPoint;
            entry.DatabaseVolumeName                   = copyStatus.DatabaseVolumeName;
            entry.DatabasePathIsOnMountedFolder        = new bool?(copyStatus.DatabasePathIsOnMountedFolder);
            entry.LogVolumeMountPoint                  = copyStatus.LogVolumeMountPoint;
            entry.LogVolumeName                        = copyStatus.LogVolumeName;
            entry.LogPathIsOnMountedFolder             = new bool?(copyStatus.LogPathIsOnMountedFolder);
            entry.LastDatabaseVolumeName               = copyStatus.LastDatabaseVolumeName;
            entry.LastDatabaseVolumeNameTransitionTime = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LastDatabaseVolumeNameTransitionTime);
            entry.VolumeInfoError                      = copyStatus.VolumeInfoLastError;
            entry.m_activationSuspended                = copyStatus.ActivationSuspended;
            if (copyStatus.ActivationSuspended)
            {
                entry.m_suspendMessage = copyStatus.SuspendComment;
            }
            entry.m_latestAvailableLogTime           = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LatestAvailableLogTime);
            entry.m_latestCopyNotificationTime       = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LastCopyNotifiedLogTime);
            entry.m_latestCopyTime                   = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LastCopiedLogTime);
            entry.m_latestInspectorTime              = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LastInspectedLogTime);
            entry.m_latestReplayTime                 = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LastReplayedLogTime);
            entry.m_latestLogGenerationNumber        = copyStatus.LastLogGenerated;
            entry.m_copyNotificationGenerationNumber = copyStatus.LastLogCopyNotified;
            entry.m_copyGenerationNumber             = copyStatus.LastLogCopied;
            entry.m_inspectorGenerationNumber        = copyStatus.LastLogInspected;
            entry.m_replayGenerationNumber           = copyStatus.LastLogReplayed;
            entry.m_contentIndexState                = copyStatus.ContentIndexStatus;
            entry.m_contentIndexErrorMessage         = copyStatus.ContentIndexErrorMessage;
            entry.m_contentIndexErrorCode            = copyStatus.ContentIndexErrorCode;
            entry.m_contentIndexVersion              = copyStatus.ContentIndexVersion;
            entry.m_contentIndexBacklog              = copyStatus.ContentIndexBacklog;
            entry.m_contentIndexRetryQueueSize       = copyStatus.ContentIndexRetryQueueSize;
            entry.m_contentIndexMailboxesToCrawl     = copyStatus.ContentIndexMailboxesToCrawl;
            entry.m_contentIndexSeedingPercent       = copyStatus.ContentIndexSeedingPercent;
            entry.m_contentIndexSeedingSource        = copyStatus.ContentIndexSeedingSource;
            entry.m_logCopyQueueIncreasing           = new bool?(copyStatus.CopyQueueNotKeepingUp);
            entry.m_logReplayQueueIncreasing         = new bool?(copyStatus.ReplayQueueNotKeepingUp);
            entry.m_replaySuspended                  = new bool?(copyStatus.ReplaySuspended);
            entry.ResumeBlocked = new bool?(copyStatus.ResumeBlocked);
            entry.ReseedBlocked = new bool?(copyStatus.ReseedBlocked);
            if (copyStatus.WorkerProcessId != 0)
            {
                entry.m_workerProcessId = new int?(copyStatus.WorkerProcessId);
            }
            entry.LastLogInfoIsStale               = copyStatus.LastLogInfoIsStale;
            entry.LastLogInfoFromCopierTime        = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LastLogInfoFromCopierTime);
            entry.LastLogInfoFromClusterTime       = DumpsterStatisticsEntry.ToNullableLocalDateTime(copyStatus.LastLogInfoFromClusterTime);
            entry.LastLogInfoFromClusterGen        = copyStatus.LastLogInfoFromClusterGen;
            entry.LowestLogPresent                 = copyStatus.LowestLogPresent;
            entry.m_logsReplayedSinceInstanceStart = new long?(copyStatus.LogsReplayedSinceInstanceStart);
            entry.m_logsCopiedSinceInstanceStart   = new long?(copyStatus.LogsCopiedSinceInstanceStart);
            entry.ReplicationIsInBlockMode         = copyStatus.ReplicationIsInBlockMode;
            entry.ActivationDisabledAndMoveNow     = copyStatus.ActivationDisabledAndMoveNow;
            entry.AutoActivationPolicy             = (DatabaseCopyAutoActivationPolicyType)copyStatus.AutoActivationPolicy;
            int num = copyStatus.MinimumSupportedDatabaseSchemaVersion;

            if (num > 0)
            {
                entry.MinimumSupportedDatabaseSchemaVersion = string.Format("{0}.{1}", num >> 16, num & 65535);
            }
            num = copyStatus.MaximumSupportedDatabaseSchemaVersion;
            if (num > 0)
            {
                entry.MaximumSupportedDatabaseSchemaVersion = string.Format("{0}.{1}", num >> 16, num & 65535);
            }
            num = copyStatus.RequestedDatabaseSchemaVersion;
            if (num > 0)
            {
                entry.RequestedDatabaseSchemaVersion = string.Format("{0}.{1}", num >> 16, num & 65535);
            }
            GetMailboxDatabaseCopyStatus.UpdateReplayLagStatus(entry, copyStatus);
            GetMailboxDatabaseCopyStatus.UpdateDatabaseSeedStatus(entry, copyStatus);
            GetMailboxDatabaseCopyStatus.UpdateBackupInfo(entry, copyStatus);
            GetMailboxDatabaseCopyStatus.UpdateDumpsterRequests(entry, copyStatus);
            if (copyStatus.OutgoingConnections != null)
            {
                entry.m_outgoingConnections = (ConnectionStatus[])Serialization.BytesToObject(copyStatus.OutgoingConnections);
            }
            if (copyStatus.IncomingLogCopyingNetwork != null)
            {
                entry.m_incomingLogCopyingNetwork = (ConnectionStatus)Serialization.BytesToObject(copyStatus.IncomingLogCopyingNetwork);
            }
            if (copyStatus.SeedingNetwork != null)
            {
                entry.m_seedingNetwork = (ConnectionStatus)Serialization.BytesToObject(copyStatus.SeedingNetwork);
            }
            entry.MaxLogToReplay = copyStatus.MaxLogToReplay;
        }
示例#6
0
 public ActiveCalls[] GetUmActiveCallList(bool isDialPlan, string dialPlan, bool isIpGateway, string ipGateway)
 {
     ExTraceGlobals.DiagnosticTracer.TraceDebug((long)this.GetHashCode(), "In UMClientRpc.GetUmActiveCallList");
     byte[] umActiveCalls = base.GetUmActiveCalls(isDialPlan, dialPlan, isIpGateway, ipGateway);
     return((ActiveCalls[])Serialization.BytesToObject(umActiveCalls));
 }