Ejemplo n.º 1
0
 public override void Export(ContactWriter writer, Contact contact, OutboundVCardConverter.PropertyExporter.Context context)
 {
     writer.WriteProperty(PropertyId.Profile, "VCARD");
     writer.WriteProperty(PropertyId.Version, "3.0");
     writer.WriteProperty(PropertyId.Mailer, "Microsoft Exchange");
     writer.WriteProperty(PropertyId.ProductId, "Microsoft Exchange");
 }
Ejemplo n.º 2
0
            public override void Export(ContactWriter writer, Contact contact, OutboundVCardConverter.PropertyExporter.Context context)
            {
                Sensitivity?sensitivity = contact.TryGetProperty(InternalSchema.Sensitivity) as Sensitivity?;

                if (sensitivity != null)
                {
                    switch (sensitivity.Value)
                    {
                    case Sensitivity.Normal:
                        writer.WriteProperty(PropertyId.Class, "PUBLIC");
                        break;

                    case Sensitivity.Personal:
                    case Sensitivity.Private:
                        writer.WriteProperty(PropertyId.Class, "PRIVATE");
                        return;

                    case Sensitivity.CompanyConfidential:
                        writer.WriteProperty(PropertyId.Class, "CONFIDENTIAL");
                        return;

                    default:
                        return;
                    }
                }
            }
Ejemplo n.º 3
0
            public override void Export(ContactWriter writer, Contact contact, OutboundVCardConverter.PropertyExporter.Context context)
            {
                object obj = contact.TryGetProperty(this.prop);

                if (obj is string)
                {
                    writer.WriteProperty(this.propName, obj as string);
                    return;
                }
                if (PropertyError.IsPropertyValueTooBig(obj))
                {
                    writer.StartProperty(this.propName);
                    using (Stream stream = contact.OpenPropertyStream(this.prop, PropertyOpenMode.ReadOnly))
                    {
                        using (Stream stream2 = new ConverterStream(stream, new TextToText
                        {
                            InputEncoding = Encoding.Unicode,
                            OutputEncoding = context.Encoding
                        }, ConverterStreamAccess.Read))
                        {
                            writer.WritePropertyValue(stream2);
                        }
                    }
                }
            }
Ejemplo n.º 4
0
            public override void Export(ContactWriter writer, Contact contact, OutboundVCardConverter.PropertyExporter.Context context)
            {
                string text = contact.TryGetProperty(ContactSchema.FullName) as string;

                if (text == null)
                {
                    text = (contact.TryGetProperty(ItemSchema.NormalizedSubject) as string);
                    if (text == null)
                    {
                        text = string.Empty;
                    }
                }
                writer.WriteProperty(PropertyId.CommonName, text);
            }