Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from apidaze/UpdateTimeoutAttribute
Update timeout elements in Dial.
- Loading branch information
Showing
8 changed files
with
164 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Xml.Serialization; | ||
|
||
namespace Apidaze.SDK.ScriptBuilder.POCO | ||
{ | ||
public class Number | ||
{ | ||
[XmlAttribute("timeout")] public double Timeout { get; set; } | ||
|
||
[XmlText(typeof(string))] public string Value { get; set; } | ||
|
||
public Number() | ||
{ | ||
} | ||
|
||
public Number(string value, double timeout = default) | ||
{ | ||
Timeout = timeout; | ||
Value = value; | ||
} | ||
|
||
/// <summary> | ||
/// Serialize a Timeout conditionally. | ||
/// The result of the method determines whether the property is serialized. If the method returns true then the property will be serialized, | ||
/// if it returns false then the property will be skipped. | ||
/// </summary> | ||
/// <returns><c>true</c> if value greater than 0, <c>false</c> otherwise.</returns> | ||
public bool ShouldSerializeTimeout() | ||
{ | ||
return Math.Abs(Timeout) > 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Xml.Serialization; | ||
|
||
namespace Apidaze.SDK.ScriptBuilder.POCO | ||
{ | ||
public class SipAccount | ||
{ | ||
[XmlAttribute("timeout")] public double Timeout { get; set; } | ||
|
||
[XmlText(typeof(string))] public string Value { get; set; } | ||
|
||
public SipAccount() | ||
{ | ||
} | ||
|
||
public SipAccount(string value, double timeout = default) | ||
{ | ||
Timeout = timeout; | ||
Value = value; | ||
} | ||
|
||
/// <summary> | ||
/// Serialize a Timeout conditionally. | ||
/// The result of the method determines whether the property is serialized. If the method returns true then the property will be serialized, | ||
/// if it returns false then the property will be skipped. | ||
/// </summary> | ||
/// <returns><c>true</c> if value greater than 0, <c>false</c> otherwise.</returns> | ||
public bool ShouldSerializeTimeout() | ||
{ | ||
return Math.Abs(Timeout) > 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Xml.Serialization; | ||
|
||
namespace Apidaze.SDK.ScriptBuilder.POCO | ||
{ | ||
public class SipUri | ||
{ | ||
[XmlAttribute("timeout")] public double Timeout { get; set; } | ||
|
||
[XmlText(typeof(string))] public string Value { get; set; } | ||
|
||
public SipUri() | ||
{ | ||
} | ||
|
||
public SipUri(string value, double timeout = default) | ||
{ | ||
Timeout = timeout; | ||
Value = value; | ||
} | ||
|
||
/// <summary> | ||
/// Serialize a Timeout conditionally. | ||
/// The result of the method determines whether the property is serialized. If the method returns true then the property will be serialized, | ||
/// if it returns false then the property will be skipped. | ||
/// </summary> | ||
/// <returns><c>true</c> if value greater than 0, <c>false</c> otherwise.</returns> | ||
public bool ShouldSerializeTimeout() | ||
{ | ||
return Math.Abs(Timeout) > 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters