コード例 #1
0
        // Token: 0x060005DF RID: 1503 RVA: 0x00020D48 File Offset: 0x0001EF48
        private bool TryGetMiniServerFromPartitionId(string partitionId, out MiniServer server)
        {
            bool result;

            try
            {
                if (CafeConfiguration.GetSnapshot(MachineSettingsContext.Local, null, null).UseServerNameAsPartitionId.Enabled)
                {
                    bool flag;
                    server = ServersCache.GetServerOrDCByName(partitionId, ref flag);
                }
                else
                {
                    Guid guid;
                    if (!Guid.TryParse(partitionId, out guid))
                    {
                        base.Logger.AppendGenericError("Get server by partitionID exception", "Not a GUID");
                        server = null;
                        return(false);
                    }
                    bool flag;
                    server = ServersCache.GetServerOrDCByObjectGuid(guid, ref flag);
                }
                result = true;
            }
            catch (ObjectNotFoundException ex)
            {
                base.Logger.AppendGenericError("Get server by partitionID exception", ex.ToString());
                server = null;
                result = false;
            }
            return(result);
        }