Example #1
0
        /// <summary>
        /// Marks the case as complete.
        /// </summary>
        /// <param name="instance">The instance.</param>
        /// <param name="completedCase">The @case.</param>
        public static async System.Threading.Tasks.Task MarkCaseAsCompleteAsync(this IAsyncFunctionManager instance, Case completedCase)
        {
            if (completedCase == null)
            {
                throw new ArgumentNullException("completedCase");
            }

            await MarkCaseAsCompleteAsync(instance, completedCase.Id);
        }
Example #2
0
        /// <summary>
        /// Create an ad-hoc Access Group for the <paramref name="target"/>.
        /// </summary>
        /// <param name="instance">The instance.</param>
        /// <param name="target">The sak.</param>
        /// <param name="userIds">The person ids.</param>
        /// <returns></returns>
        public static async System.Threading.Tasks.Task <int> CreateAccessGroupAsync(this IAsyncFunctionManager instance, Case target, params int[] userIds)
        {
            if (instance == null)
            {
                throw new ArgumentNullException("instance");
            }

            if (target == null)
            {
                throw new ArgumentNullException("target");
            }

            if (userIds == null || userIds.Length == 0)
            {
                throw new ArgumentException(
                          Resources
                          .FunctionManagerExtensions_CreateAccessGroup_The_must_be_at_least_one_member_in_the_Access_Group,
                          "userIds");
            }

            return
                ((int)
                 await instance.ExecuteAsync("OpprettTilgangsgruppeHandler", target.Id, 0,
                                             string.Join(",",
                                                         userIds.Select(x => x.ToString(CultureInfo.InvariantCulture)).ToArray())));
        }