internal ContentRestrictionData(StoreSession storeSession, ContentFilter contentFilter) { this.Flags = (int)base.GetContentFlags(contentFilter.MatchFlags, contentFilter.MatchOptions); this.PropTag = base.GetPropTagFromDefinition(storeSession, contentFilter.Property); this.MultiValued = ((PropTag)this.PropTag).IsMultiValued(); if (contentFilter is TextFilter) { TextFilter textFilter = (TextFilter)contentFilter; this.Value = new PropValueData(((PropTag)this.PropTag).ChangePropType(PropType.String), textFilter.Text); return; } if (contentFilter is BinaryFilter) { BinaryFilter binaryFilter = (BinaryFilter)contentFilter; this.Value = new PropValueData(((PropTag)this.PropTag).ChangePropType(PropType.Binary), binaryFilter.BinaryData); return; } MrsTracer.Common.Error("Unknown content filter type '{0}' in content restriction data constructor", new object[] { contentFilter.GetType() }); throw new CorruptRestrictionDataException(); }