Esempio n. 1
0
        protected override object InternalTryGetValue(PropertyBag.BasicPropertyStore propertyBag)
        {
            object obj = base.InternalTryGetValue(propertyBag);

            if (PropertyError.IsPropertyError(obj))
            {
                return(obj);
            }
            return(FileAsStringProperty.TranslateMarkup((string)obj, "{0} ({1})") ?? new PropertyError(this, PropertyErrorCode.NotFound));
        }
Esempio n. 2
0
        internal void UpdateFullNameAndSubject(PropertyBag propertyBag)
        {
            StoreSession      session            = propertyBag.Context.Session;
            FormattedSentence formattedSentence  = new FormattedSentence((session != null) ? FileAsStringProperty.GetContactFullNameFormat().ToString(session.InternalPreferedCulture) : FileAsStringProperty.GetContactFullNameFormat());
            FormattedSentence formattedSentence2 = new FormattedSentence((session != null) ? FileAsStringProperty.GetContactSubjectFormat().ToString(session.InternalPreferedCulture) : FileAsStringProperty.GetContactSubjectFormat());

            PropertyBag.BasicPropertyStore propertyBag2 = (PropertyBag.BasicPropertyStore)propertyBag;
            if (base.IsAtomOrRulePropertyDirty(propertyBag2))
            {
                if (!propertyBag.IsPropertyDirty(InternalSchema.DisplayName))
                {
                    propertyBag[InternalSchema.DisplayName] = FileAsStringProperty.TranslateMarkup(FileAsStringProperty.GenerateFileAsString(propertyBag2, formattedSentence), "{0} - {1}");
                }
                if (!propertyBag.IsPropertyDirty(InternalSchema.MapiSubject))
                {
                    propertyBag[InternalSchema.Subject] = FileAsStringProperty.TranslateMarkup(FileAsStringProperty.GenerateFileAsString(propertyBag2, formattedSentence2), "{0} - {1}");
                }
            }
        }