/// <summary> /// Adds the contents of another <see cref="ApplicationInfoCollection">ApplicationInfoCollection</see> to the end of the collection. /// </summary> /// <param name="value">A <see cref="ApplicationInfoCollection">ApplicationInfoCollection</see> containing the Components to add to the collection. </param> public void AddRange(ApplicationInfoCollection value) { for (int i = 0; (i < value.Count); i = (i + 1)) { this.Add((ApplicationInfo)value.List[i]); } }
/// <summary> /// Initializes a new instance of the <see cref="ApplicationInfoCollection">ApplicationInfoCollection</see> class containing the elements of the specified source collection. /// </summary> /// <param name="value">A <see cref="ApplicationInfoCollection">ApplicationInfoCollection</see> with which to initialize the collection.</param> public ApplicationInfoCollection(ApplicationInfoCollection value) { this.AddRange(value); }
/// <summary> /// Initializes a new instance of the <see cref="ApplicationInfoCollectionEnumerator">ApplicationInfoCollectionEnumerator</see> class referencing the specified <see cref="ApplicationInfoCollection">ApplicationInfoCollection</see> object. /// </summary> /// <param name="mappings">The <see cref="ApplicationInfoCollection">ApplicationInfoCollection</see> to enumerate.</param> public ApplicationInfoCollectionEnumerator(ApplicationInfoCollection mappings) { _temp = ((IEnumerable)(mappings)); _enumerator = _temp.GetEnumerator(); }
/// <summary> /// 获取需要数据同步的应用程序列表 /// </summary> /// <param name="actionName"></param> /// <returns></returns> private static ApplicationInfoCollection GetAsyncTarget(string action) { ApplicationInfoCollection appCollection = new ApplicationInfoCollection(); APIConfigInfo apiInfo = APIConfigs.GetConfig(); if (!apiInfo.Enable) return appCollection; foreach (ApplicationInfo appInfo in apiInfo.AppCollection) { if (appInfo.SyncMode == 1 || (appInfo.SyncMode == 2 && Utils.InArray(action, appInfo.SyncList))) { if (appInfo.SyncUrl.Trim() == string.Empty) continue; appCollection.Add(appInfo); } } return appCollection; }