public FragmentAssemblyInfo GetFragmentAssemblyInfo(FragmentModelType fragmentModelType) { FragmentAssemblyInfo result = null; if (!this._fragmentInfos.TryGetValue(fragmentModelType, out result)) { result = new FragmentAssemblyInfo(); this._fragmentInfos.Add(fragmentModelType, result); } return(result); }
/// <summary> /// This constructor should be used by sub-types. /// </summary> /// <param name="fragmentModelType">The <see cref="FragmentModelType"/>.</param> /// <param name="fragments">The types of the fragments.</param> protected DefaultFragmentsAttribute(FragmentModelType fragmentModelType, Type[] fragments) { this._fragmentModel = fragmentModelType; this._fragments = fragments; }
protected FragmentAssemblyInfo[] GetFragmentAssemblies(FragmentModelType fragmentModelType) { return(this._affectedTypes.Where(type => this._composites.ContainsKey(type)).SelectMany(type => this._composites[type]).Select(info => info.GetFragmentAssemblyInfo(fragmentModelType)).ToArray()); }