protected override object GetService(Type service) { DataSourceComponent collectionHost = this; while ((collectionHost != null) && (collectionHost.Site == null)) { if (collectionHost.CollectionParent != null) { collectionHost = collectionHost.CollectionParent.CollectionHost; } else { if ((collectionHost.Parent != null) && (collectionHost.Parent is DataSourceComponent)) { collectionHost = collectionHost.Parent as DataSourceComponent; continue; } collectionHost = null; } } if ((collectionHost != null) && (collectionHost.Site != null)) { return(collectionHost.Site.GetService(service)); } return(null); }
internal static void AddExtendedProperties(DataSourceComponent targetObj, CodeExpression addTarget, IList statementCollection, Hashtable extendedProperties) { if (extendedProperties != null) { if (addTarget == null) { throw new InternalException("ExtendedPropertiesHandler.AddExtendedProperties: addTarget cannot be null"); } if (statementCollection == null) { throw new InternalException("ExtendedPropertiesHandler.AddExtendedProperties: statementCollection cannot be null"); } if (codeGenerator == null) { throw new InternalException("ExtendedPropertiesHandler.AddExtendedProperties: codeGenerator cannot be null"); } if (targetObj == null) { throw new InternalException("ExtendedPropertiesHandler.AddExtendedProperties: targetObject cannot be null"); } targetObject = targetObj; if (codeGenerator.GenerateExtendedProperties) { GenerateProperties(addTarget, statementCollection, extendedProperties); } else { SortedList list = new SortedList(new Comparer(CultureInfo.InvariantCulture)); foreach (string str in targetObject.NamingPropertyNames) { string str2 = extendedProperties[str] as string; if (!StringUtil.Empty(str2)) { list.Add(str, str2); } } GenerateProperties(addTarget, statementCollection, list); } } }
internal DbSourceParameterCollection(DataSourceComponent collectionHost) : base(collectionHost) { }
internal DSGeneratorProblem(string message, ProblemSeverity severity, DataSourceComponent problemSource) { this.message = message; this.severity = severity; this.problemSource = problemSource; }
internal DesignConnectionCollection(DataSourceComponent collectionHost) : base(collectionHost) { }
internal DataSourceCollectionBase(DataSourceComponent collectionHost) { this.collectionHost = collectionHost; }
internal SourceCollection(DataSourceComponent collectionHost) : base(collectionHost) { }
public override void SetCollection(DataSourceCollectionBase collection) { base.SetCollection(collection); if (collection != null) { this.Owner = collection.CollectionHost; } else { this.Owner = null; } }