예제 #1
0
 // Token: 0x06001366 RID: 4966 RVA: 0x0007144C File Offset: 0x0006F64C
 public override void AddPropertyValue(ADRawEntry adRawEntry, PropRow propRow, OABFileRecord oabFileRecord, int index)
 {
     if ((bool)adRawEntry[this.placeholderProperty])
     {
         base.AddPropTagToTruncatedPropertiesProperty(oabFileRecord);
     }
 }
        // Token: 0x060000EC RID: 236 RVA: 0x00005674 File Offset: 0x00003874
        protected override void InternalTaskExecute()
        {
            base.InternalTaskExecute();
            PropRow mapiRow = ConvertHelper.ConvertToMapiPropRow(this.row);

            PropTag[] mapiPropTags = ConvertHelper.ConvertToMapiPropTags(this.propertyTags);
            base.NspiContextCallWrapper("ModProps", () => this.Context.ModProps(this.NspiState, mapiPropTags, mapiRow));
        }
예제 #3
0
            // Token: 0x0600135B RID: 4955 RVA: 0x00070C94 File Offset: 0x0006EE94
            public override void AddPropertyValue(ADRawEntry adRawEntry, PropRow propRow, OABFileRecord oabFileRecord, int index)
            {
                PropValue propValue = propRow.Properties[index];

                if (propValue.IsError() || propValue.Value == null)
                {
                    return;
                }
                this.AddPropTagToTruncatedPropertiesProperty(oabFileRecord);
            }
예제 #4
0
 internal static PropertyValue[] ConvertFromMapiPropRow(PropRow mapiPropRow, int codePage)
 {
     PropertyValue[] result = null;
     if (mapiPropRow != null)
     {
         PropValue[] mapiPropValues = mapiPropRow.Properties.ToArray <PropValue>();
         result = ConvertHelper.ConvertFromMapiPropValues(mapiPropValues, codePage);
     }
     return(result);
 }
예제 #5
0
        // Token: 0x060000E0 RID: 224 RVA: 0x00005424 File Offset: 0x00003624
        protected override void InternalTaskExecute()
        {
            base.InternalTaskExecute();
            PropRow mapiRow = null;

            base.NspiContextCallWrapper("GetTemplateInfo", () => this.Context.GetTemplateInfo(this.flags, (uint)this.type, this.legacyDN, (uint)this.codePage, (uint)this.locale, out mapiRow));
            if (base.Status == NspiStatus.Success)
            {
                this.returnCodePage = this.codePage;
                this.returnRow      = ConvertHelper.ConvertFromMapiPropRow(mapiRow, this.returnCodePage);
            }
        }
예제 #6
0
        // Token: 0x060000DA RID: 218 RVA: 0x00005254 File Offset: 0x00003454
        protected override void InternalTaskExecute()
        {
            base.InternalTaskExecute();
            PropRow mapiRow = null;

            PropTag[] mapiPropTags = ConvertHelper.ConvertToMapiPropTags(this.propertyTags);
            base.NspiContextCallWrapper("GetProps", () => this.Context.GetProps(this.flags, this.NspiState, mapiPropTags, out mapiRow));
            if (base.Status == NspiStatus.Success || base.Status == NspiStatus.ErrorsReturned)
            {
                this.returnCodePage = base.NspiState.CodePage;
                this.returnRow      = ConvertHelper.ConvertFromMapiPropRow(mapiRow, this.returnCodePage);
            }
        }
예제 #7
0
            // Token: 0x06001357 RID: 4951 RVA: 0x00070C30 File Offset: 0x0006EE30
            public override void AddPropertyValue(ADRawEntry adRawEntry, PropRow propRow, OABFileRecord oabFileRecord, int index)
            {
                PropValue propValue = propRow.Properties[index];

                if (propValue.IsError())
                {
                    return;
                }
                oabFileRecord.PropertyValues[index] = new OABPropertyValue
                {
                    PropTag = (PropTag)2355953922U,
                    Value   = propValue.Value
                };
            }
예제 #8
0
        // Token: 0x0600133A RID: 4922 RVA: 0x00070008 File Offset: 0x0006E208
        private OABFileRecord CreateDetailsRecord(ADRawEntry adRawEntry)
        {
            PropRow       props         = this.propertyManager.GetProps(adRawEntry);
            OABFileRecord oabfileRecord = new OABFileRecord
            {
                PropertyValues = new OABPropertyValue[props.Properties.Count]
            };

            for (int i = 0; i < props.Properties.Count; i++)
            {
                this.propertyManager.OABProperties[i].AddPropertyValue(adRawEntry, props, oabfileRecord, i);
            }
            return(oabfileRecord);
        }
예제 #9
0
        internal static PropRowSet ConvertToMapiPropRow(PropertyValue[][] propertyRows)
        {
            PropRowSet propRowSet = null;

            if (propertyRows != null)
            {
                propRowSet = new PropRowSet(propertyRows.Length);
                for (int i = 0; i < propertyRows.Length; i++)
                {
                    PropRow row = ConvertHelper.ConvertToMapiPropRow(propertyRows[i]);
                    propRowSet.Add(row);
                }
            }
            return(propRowSet);
        }
예제 #10
0
        internal static SafeRpcMemoryHandle MarshalRow(PropRow row)
        {
            if (row == null)
            {
                return(null);
            }
            SafeRpcMemoryHandle safeRpcMemoryHandle  = new SafeRpcMemoryHandle();
            SafeRpcMemoryHandle safeRpcMemoryHandle2 = NspiMarshal.MarshalPropValueCollection(row.Properties);

            row.MarshalledPropertiesHandle = safeRpcMemoryHandle2;
            safeRpcMemoryHandle.AddAssociatedHandle(safeRpcMemoryHandle2);
            safeRpcMemoryHandle.Allocate(row.GetBytesToMarshal());
            row.MarshalToNative(safeRpcMemoryHandle);
            return(safeRpcMemoryHandle);
        }
예제 #11
0
        private static PropRow GetRowAndDisposeHandle(SafeRpcMemoryHandle rowHandle)
        {
            PropRow result;

            if (rowHandle != null)
            {
                result = new PropRow(rowHandle, true);
                rowHandle.Dispose();
            }
            else
            {
                result = null;
            }
            return(result);
        }
예제 #12
0
            // Token: 0x0600135E RID: 4958 RVA: 0x00070DE0 File Offset: 0x0006EFE0
            public override void AddPropertyValue(ADRawEntry adRawEntry, PropRow propRow, OABFileRecord oabFileRecord, int index)
            {
                PropValue propValue = propRow.Properties[index];

                if (propValue.IsError())
                {
                    return;
                }
                try
                {
                    if (propValue.PropType == PropType.StringArray)
                    {
                        string[] stringArray = propValue.GetStringArray();
                        if (stringArray != null)
                        {
                            string[] value = (from s in stringArray
                                              select this.ValidString(s, adRawEntry.Id.ToString(), propValue.PropTag.ToString()) into v
                                              orderby v
                                              select v).ToArray <string>();
                            oabFileRecord.PropertyValues[index] = new OABPropertyValue
                            {
                                PropTag = this.propTag,
                                Value   = value
                            };
                            return;
                        }
                    }
                }
                catch (Exception ex)
                {
                    OABLogger.LogRecord(TraceType.DebugTrace, "MultivaluedProperty.AddPropertyValue: Informational only: Unable to validate strings in object {0}, property {1}. Reason: {2}", new object[]
                    {
                        adRawEntry.Id.ToString(),
                        propValue.PropTag.ToString(),
                        ex.Message
                    });
                }
                object obj = this.SortValues(propValue);

                if (obj != null)
                {
                    oabFileRecord.PropertyValues[index] = new OABPropertyValue
                    {
                        PropTag = this.propTag,
                        Value   = obj
                    };
                }
            }
예제 #13
0
        public NspiStatus ModProps(IList <PropTag> propTags, PropRow row)
        {
            int[]      intArrayFromPropTagArray = NspiClient.GetIntArrayFromPropTagArray(propTags);
            NspiStatus result;

            using (SafeRpcMemoryHandle safeRpcMemoryHandle = new SafeRpcMemoryHandle(row.GetBytesToMarshal()))
            {
                SafeRpcMemoryHandle safeRpcMemoryHandle2 = NspiMarshal.MarshalPropValueCollection(row.Properties);
                row.MarshalledPropertiesHandle = safeRpcMemoryHandle2;
                safeRpcMemoryHandle.AddAssociatedHandle(safeRpcMemoryHandle2);
                row.MarshalToNative(safeRpcMemoryHandle);
                this.MarshalStatToNative();
                NspiStatus nspiStatus = this.client.ModProps(this.statHandle.DangerousGetHandle(), intArrayFromPropTagArray, safeRpcMemoryHandle.DangerousGetHandle());
                this.MarshalNativeToStat();
                result = nspiStatus;
            }
            return(result);
        }
예제 #14
0
            // Token: 0x0600136A RID: 4970 RVA: 0x00071524 File Offset: 0x0006F724
            public override void AddPropertyValue(ADRawEntry adRawEntry, PropRow propRow, OABFileRecord oabFileRecord, int index)
            {
                if (!(bool)adRawEntry[this.isOrganizationalProperty])
                {
                    if ((bool)adRawEntry[this.placeholderProperty])
                    {
                        base.AddPropTagToTruncatedPropertiesProperty(oabFileRecord);
                    }
                    return;
                }
                PropValue propValue = propRow.Properties[index];

                if (propValue.IsError())
                {
                    return;
                }
                oabFileRecord.PropertyValues[index] = new OABPropertyValue
                {
                    PropTag = this.propTag,
                    Value   = propValue.Value
                };
            }
예제 #15
0
            // Token: 0x06001362 RID: 4962 RVA: 0x000711B8 File Offset: 0x0006F3B8
            public override void AddPropertyValue(ADRawEntry adRawEntry, PropRow propRow, OABFileRecord oabFileRecord, int index)
            {
                PropValue propValue = propRow.Properties[index];

                if (propValue.IsError())
                {
                    return;
                }
                object obj = base.SortValues(propValue);

                if (obj == null || !(obj is byte[][]))
                {
                    return;
                }
                byte[][] array = this.FilterX509Certificates((byte[][])obj);
                if (array != null)
                {
                    oabFileRecord.PropertyValues[index] = new OABPropertyValue
                    {
                        PropTag = this.propTag,
                        Value   = array
                    };
                }
            }
예제 #16
0
        // Token: 0x06001351 RID: 4945 RVA: 0x00070AF0 File Offset: 0x0006ECF0
        public virtual void AddPropertyValue(ADRawEntry adRawEntry, PropRow propRow, OABFileRecord oabFileRecord, int index)
        {
            PropValue propValue = propRow.Properties[index];

            if (propValue.IsError())
            {
                return;
            }
            if (propValue.PropType == PropType.String)
            {
                string value = this.ValidString((string)propValue.Value, adRawEntry.Id.ToString(), propValue.PropTag.ToString());
                oabFileRecord.PropertyValues[index] = new OABPropertyValue
                {
                    PropTag = this.propTag,
                    Value   = value
                };
                return;
            }
            oabFileRecord.PropertyValues[index] = new OABPropertyValue
            {
                PropTag = this.propTag,
                Value   = propValue.Value
            };
        }
예제 #17
0
        public NspiStatus GetProps(NspiGetPropsFlags flags, IList <PropTag> propTags, out PropRow row)
        {
            int[] intArrayFromPropTagArray = NspiClient.GetIntArrayFromPropTagArray(propTags);
            this.MarshalStatToNative();
            SafeRpcMemoryHandle rowHandle;
            NspiStatus          props = this.client.GetProps(flags, this.statHandle.DangerousGetHandle(), intArrayFromPropTagArray, out rowHandle);

            this.MarshalNativeToStat();
            row = NspiClient.GetRowAndDisposeHandle(rowHandle);
            return(props);
        }
예제 #18
0
        public NspiStatus GetTemplateInfo(NspiGetTemplateInfoFlags flags, int type, string dn, int codePage, int localeId, out PropRow row)
        {
            SafeRpcMemoryHandle rowHandle;
            NspiStatus          templateInfo = this.client.GetTemplateInfo(flags, type, dn, codePage, localeId, out rowHandle);

            row = NspiClient.GetRowAndDisposeHandle(rowHandle);
            return(templateInfo);
        }
예제 #19
0
 // Token: 0x06001359 RID: 4953 RVA: 0x00070C87 File Offset: 0x0006EE87
 public override void AddPropertyValue(ADRawEntry adRawEntry, PropRow propRow, OABFileRecord oabFileRecord, int index)
 {
 }