} // ctor internal void SetParentRelation(PpsDataTableRelationDefinition parentRelation) { if (this.parentRelation != null) { throw new InvalidOperationException("Only one parent relation per column is allowed."); } this.parentRelation = parentRelation; } // proc SetParentRelation
} // ctor /// <summary>Create a new column.</summary> /// <param name="table">Table of the column</param> /// <param name="columnName">Name of the column</param> /// <param name="isPrimaryKey">Is this a primary key column.</param> /// <param name="isIdentity">Is this a identity</param> public PpsDataColumnDefinition(PpsDataTableDefinition table, string columnName, bool isPrimaryKey, bool isIdentity) { if (String.IsNullOrEmpty(columnName)) { throw new ArgumentNullException(); } this.table = table; this.columnName = columnName; this.parentRelation = null; this.isIdentity = isIdentity; this.isExtendedValue = new Lazy <bool>(() => DataType.GetTypeInfo().ImplementedInterfaces.Contains(typeof(IPpsDataRowExtendedValue))); this.isReadOnly = new Lazy <bool>(() => IsExtended && !DataType.GetTypeInfo().ImplementedInterfaces.Contains(typeof(IPpsDataRowSetGenericValue))); if (isPrimaryKey) { table.SetPrimaryKey(this); } } // ctor
/// <summary>Create PpsDataRelatedFilterDesktop for the ICollectionViewFactory.</summary> /// <param name="row"></param> /// <param name="relation"></param> /// <returns></returns> public override PpsDataFilter CreateRelationFilter(PpsDataRow row, PpsDataTableRelationDefinition relation) => new PpsDataRelatedFilterDesktop(row, relation);
/// <summary></summary> /// <param name="parentRow"></param> /// <param name="relation"></param> public PpsDataRelatedFilterDesktop(PpsDataRow parentRow, PpsDataTableRelationDefinition relation) : base(parentRow, relation) { } // ctor