/// <summary> /// Adds the submitted delegates to the diagram. /// </summary> private void AddDelegate(DelegateDeclaration dd) { DelegateType delegateType = diagram.AddDelegate(); delegateType.Name = dd.Name; delegateType.AccessModifier = dd.Modifiers.ToEnClass(); delegateType.ReturnType = dd.ReturnType.ToString(); foreach (ParameterDeclaration ichParameter in dd.Parameters) { delegateType.AddParameter(ichParameter.ToString()); // To Check } }
/// <summary> /// Adds the submitted delegates to the diagram. /// </summary> /// <param name="delegates">A list of delegates to add.</param> private void AddDelegates(IEnumerable <NRDelegate> delegates) { foreach (NRDelegate nrDelegate in delegates) { DelegateType delegateType = diagram.AddDelegate(); delegateType.Name = nrDelegate.Name; delegateType.AccessModifier = nrDelegate.AccessModifier.ToNClass(); delegateType.ReturnType = nrDelegate.ReturnType; foreach (NRParameter nrParameter in nrDelegate.Parameters) { delegateType.AddParameter(nrParameter.Declaration()); } types.Add(nrDelegate, delegateType); } }