コード例 #1
0
		public ServiceProcess Execute(string orgItemUri, string recursive)
		{
			if (string.IsNullOrEmpty(orgItemUri))
			{
				throw new ArgumentNullException("itemUri");
			}

			if (string.IsNullOrEmpty(recursive))
			{
				throw new ArgumentNullException("recursive");
			}

			MarkUnpublishedParameters arguments = new MarkUnpublishedParameters { OrgItemURI = orgItemUri, Recursive = recursive };
			return ExecuteAsync(arguments);
		}
コード例 #2
0
        public ServiceProcess Execute(string orgItemUri, string recursive)
        {
            if (string.IsNullOrEmpty(orgItemUri))
            {
                throw new ArgumentNullException("itemUri");
            }

            if (string.IsNullOrEmpty(recursive))
            {
                throw new ArgumentNullException("recursive");
            }

            MarkUnpublishedParameters arguments = new MarkUnpublishedParameters {
                OrgItemURI = orgItemUri, Recursive = recursive
            };

            return(ExecuteAsync(arguments));
        }
コード例 #3
0
        public override void Process(ServiceProcess process, object arguments)
        {
            MarkUnpublishedParameters parameters = (MarkUnpublishedParameters)arguments;

            if (string.IsNullOrEmpty(parameters.OrgItemURI))
            {
                throw new BaseServiceException(string.Format(CultureInfo.InvariantCulture, "parameters.OrgItemURI is null or empty"));
            }

            var client = PowerTools.Common.CoreService.Client.GetCoreService();

            try
            {
                process.Complete();
            }
            finally
            {
                if (client != null)
                {
                    client.Close();
                }
            }
        }