/// <summary> /// The <c>GetRoleCollection</c> implementation method deserializes an incoming XML Argument <see cref="string"/> as a new <see cref="RoleCollection"/> object. /// It invokes the <c>Insert</c> method of <see cref="RoleBusiness"/> with the newly deserialized <see cref="RoleCollection"/> object. /// Finally, it returns the collection object as a serialized <see cref="string"/> of XML. /// </summary> /// <param name="aXmlArgument">XML Argument <see cref="string"/>.</param> /// <returns><see cref="RoleCollection"/> as XML <see cref="string"/>.</returns> /// <exception cref="ArgumentNullException">If <c>aXmlArgument</c> is <c>null</c>.</exception> public static string GetRoleCollection(FanKey aFanKey, string aXmlArgument) { if (aXmlArgument == null) { throw new ArgumentNullException("aXmlArgument of GetRoleCollection"); } RoleCollection vRoleCollection = new RoleCollection(); vRoleCollection = XmlUtils.Deserialize <RoleCollection>(aXmlArgument); RoleBusiness.Load(aFanKey, vRoleCollection); return(XmlUtils.Serialize <RoleCollection>(vRoleCollection, true)); }
/// <summary> /// Gets the <see cref="Role"/> by Key. /// </summary> /// <param name="aXmlArgument">XML Argument <see cref="string"/>.</param> /// <returns>Role as XML <see cref="string"/>.</returns> /// <exception cref="ArgumentNullException">If <c>aXmlArgument</c> is <c>null</c>.</exception> public static string GetRole(UserKey aUserKey, string aXmlArgument) { if (aXmlArgument == null) { throw new ArgumentNullException("aXmlArgument of GetRole"); } Role vRole = new Role(); vRole = XmlUtils.Deserialize <Role>(aXmlArgument); RoleBusiness.Load(aUserKey, vRole); return(XmlUtils.Serialize <Role>(vRole, true)); }