-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObjectError.cs
58 lines (52 loc) · 1.69 KB
/
ObjectError.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//-----------------------------------------------------------------------
// <copyright file="ObjectError.cs" company="Studio A&T s.r.l.">
// Copyright (c) Studio A&T s.r.l. All rights reserved.
// </copyright>
// <author>nicogis</author>
namespace Studioat.ArcGis.Soe.Rest.FactoryUtilities
{
using System.Diagnostics.CodeAnalysis;
using ESRI.ArcGIS.SOESupport;
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "-")]
/// <summary>
/// class for create a json
/// </summary>
internal sealed class ObjectError : ObjectJson
{
/// <summary>
/// Initializes a new instance of the ObjectError class.
/// </summary>
/// <param name="message">text of the message</param>
internal ObjectError(string message)
{
this.Message = message;
}
/// <summary>
/// Prevents a default instance of the ObjectError class from being created.
/// </summary>
private ObjectError()
{
}
/// <summary>
/// Gets or sets of the property Message
/// </summary>
public string Message
{
get;
set;
}
#region IJsonObject Members
/// <summary>
/// return a object JsonObject
/// </summary>
/// <returns>object Json Object</returns>
public override JsonObject ToJsonObject()
{
JsonObject result = base.ToJsonObject();
result.AddString("errorDescription", this.Message);
result.AddBoolean("hasError", true);
return result;
}
#endregion
}
}