Пример #1
0
        public static RequestJobNamedPropertySet Get(MapiStore systemMailbox)
        {
            byte[] signatureBytes = MapiUtils.GetSignatureBytes(systemMailbox);
            RequestJobNamedPropertySet result;

            lock (RequestJobNamedPropertySet.locker)
            {
                RequestJobNamedPropertySet requestJobNamedPropertySet;
                if (signatureBytes != null && RequestJobNamedPropertySet.mappings.TryGetValue(signatureBytes, out requestJobNamedPropertySet))
                {
                    result = requestJobNamedPropertySet;
                }
                else
                {
                    requestJobNamedPropertySet = new RequestJobNamedPropertySet(systemMailbox);
                    if (signatureBytes != null)
                    {
                        RequestJobNamedPropertySet.mappings.Add(signatureBytes, requestJobNamedPropertySet);
                    }
                    result = requestJobNamedPropertySet;
                }
            }
            return(result);
        }