PackageManagement.Sdk.Request.Error C# (CSharp) Method

Error() public method

public Error ( ErrorCategory category, string targetObjectValue, string messageText ) : bool
category ErrorCategory
targetObjectValue string
messageText string
return bool
        public bool Error(ErrorCategory category, string targetObjectValue, string messageText, params object[] args) {
            return Error(messageText, category.ToString(), targetObjectValue, FormatMessageString(messageText, args));
        }

Same methods

Request::Error ( string id, string category, string targetObjectValue, string messageText ) : bool

Usage Example

        public void AddPackageSource(string name, string location, bool trusted, Request request)
        {
            if (string.IsNullOrEmpty(location))
            {
                request.Error(ErrorCategory.InvalidArgument, "location", "Location missing");
                return;
            }

            Do(request, x => x.AddPackageSource(new FeedUri(location)));
        }
All Usage Examples Of PackageManagement.Sdk.Request::Error