Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please review #59

Merged
merged 12 commits into from
Oct 28, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change PeterO.Cbor reference from package to project
  • Loading branch information
aseigler committed Oct 19, 2018
commit 2ff0b5279e70703ccdf7af0a2f54621eab1b6d49
4 changes: 2 additions & 2 deletions CBOR/CBOR.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>3.4.0-beta1</Version>
<Owners>Peter Occil</Owners>
<Description>A C# implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 7049.</Description>
Expand Down Expand Up @@ -32,7 +32,7 @@ Version 3.4.0-alpha1:

</PackageReleaseNotes>
<PackageTags>cbor data serialization binary json</PackageTags>
<SignAssembly>True</SignAssembly>
<SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>PeterO.snk</AssemblyOriginatorKeyFile>
<Title>CBOR (Concise Binary Object Representation)</Title>
<PackOnBuild>true</PackOnBuild>
Expand Down
8 changes: 4 additions & 4 deletions CBOR/PeterO/Cbor/CBORDataUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@

namespace PeterO.Cbor {
/// <include file='../../docs.xml'
/// path='docs/doc[@name="T:PeterO.Cbor.CBORDataUtilities"]/*'/>
/// path='docs/doc[@name="T:CBORDataUtilities"]/*'/>
public static class CBORDataUtilities {
private const int MaxSafeInt = 214748363;

/// <include file='../../docs.xml'
/// path='docs/doc[@name="M:PeterO.Cbor.CBORDataUtilities.ParseJSONNumber(System.String)"]/*'/>
/// path='docs/doc[@name="M:CBORDataUtilities.ParseJSONNumber(System.String)"]/*'/>
public static CBORObject ParseJSONNumber(string str) {
return ParseJSONNumber(str, false, false);
}

/// <include file='../../docs.xml'
/// path='docs/doc[@name="M:PeterO.Cbor.CBORDataUtilities.ParseJSONNumber(System.String,System.Boolean,System.Boolean)"]/*'/>
/// path='docs/doc[@name="M:CBORDataUtilities.ParseJSONNumber(System.String,System.Boolean,System.Boolean)"]/*'/>
public static CBORObject ParseJSONNumber(
string str,
bool integersOnly,
Expand All @@ -31,7 +31,7 @@ public static class CBORDataUtilities {
}

/// <include file='../../docs.xml'
/// path='docs/doc[@name="M:PeterO.Cbor.CBORDataUtilities.ParseJSONNumber(System.String,System.Boolean,System.Boolean,System.Boolean)"]/*'/>
/// path='docs/doc[@name="M:CBORDataUtilities.ParseJSONNumber(System.String,System.Boolean,System.Boolean,System.Boolean)"]/*'/>
public static CBORObject ParseJSONNumber(
string str,
bool integersOnly,
Expand Down
28 changes: 14 additions & 14 deletions CBOR/PeterO/Cbor/CBOREncodeOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,48 @@

namespace PeterO.Cbor {
/// <include file='../../docs.xml'
/// path='docs/doc[@name="T:PeterO.Cbor.CBOREncodeOptions"]/*'/>
/// path='docs/doc[@name="T:CBOREncodeOptions"]/*'/>
public sealed class CBOREncodeOptions {
/// <include file='../../docs.xml'
/// path='docs/doc[@name="F:PeterO.Cbor.CBOREncodeOptions.None"]/*'/>
/// path='docs/doc[@name="F:CBOREncodeOptions.None"]/*'/>
[Obsolete("Use 'new CBOREncodeOptions(true,true)' instead. Option classes in this library will follow the form seen in JSONOptions in a later version; the approach used in this class is too complicated. 'CBOREncodeOptions.Default' contains recommended default options that may be adopted by certain CBORObject methods in the next major version.")]
public static readonly CBOREncodeOptions None =
new CBOREncodeOptions(0);

/// <include file='../../docs.xml'
/// path='docs/doc[@name="F:PeterO.Cbor.CBOREncodeOptions.Default"]/*'/>
/// path='docs/doc[@name="F:CBOREncodeOptions.Default"]/*'/>
public static readonly CBOREncodeOptions Default =
new CBOREncodeOptions(false, false);

/// <include file='../../docs.xml'
/// path='docs/doc[@name="F:PeterO.Cbor.CBOREncodeOptions.NoIndefLengthStrings"]/*'/>
/// path='docs/doc[@name="F:CBOREncodeOptions.NoIndefLengthStrings"]/*'/>
[Obsolete("Use 'new CBOREncodeOptions(false,true)' instead. Option classes in this library will follow the form seen in JSONOptions in a later version; the approach used in this class is too complicated.")]
public static readonly CBOREncodeOptions NoIndefLengthStrings =
new CBOREncodeOptions(1);

/// <include file='../../docs.xml'
/// path='docs/doc[@name="F:PeterO.Cbor.CBOREncodeOptions.NoDuplicateKeys"]/*'/>
/// path='docs/doc[@name="F:CBOREncodeOptions.NoDuplicateKeys"]/*'/>
[Obsolete("Use 'new CBOREncodeOptions(true,false)' instead. Option classes in this library will follow the form seen in JSONOptions in a later version; the approach used in this class is too complicated.")]
public static readonly CBOREncodeOptions NoDuplicateKeys =
new CBOREncodeOptions(2);

private readonly int value;

/// <include file='../../docs.xml'
/// path='docs/doc[@name="M:PeterO.Cbor.CBOREncodeOptions.#ctor"]/*'/>
/// path='docs/doc[@name="M:CBOREncodeOptions.#ctor"]/*'/>
public CBOREncodeOptions() : this(false, false) {
}

/// <include file='../../docs.xml'
/// path='docs/doc[@name="M:PeterO.Cbor.CBOREncodeOptions.#ctor(System.Boolean,System.Boolean)"]/*'/>
/// path='docs/doc[@name="M:CBOREncodeOptions.#ctor(System.Boolean,System.Boolean)"]/*'/>
public CBOREncodeOptions(
bool useIndefLengthStrings,
bool allowDuplicateKeys) :
this(useIndefLengthStrings, allowDuplicateKeys, false) {
}

/// <include file='../../docs.xml'
/// path='docs/doc[@name="M:PeterO.Cbor.CBOREncodeOptions.#ctor(System.Boolean,System.Boolean,System.Boolean)"]/*'/>
/// path='docs/doc[@name="M:CBOREncodeOptions.#ctor(System.Boolean,System.Boolean,System.Boolean)"]/*'/>
public CBOREncodeOptions(
bool useIndefLengthStrings,
bool allowDuplicateKeys,
Expand All @@ -60,27 +60,27 @@ public sealed class CBOREncodeOptions {
}

/// <include file='../../docs.xml'
/// path='docs/doc[@name="P:PeterO.Cbor.CBOREncodeOptions.UseIndefLengthStrings"]/*'/>
/// path='docs/doc[@name="P:CBOREncodeOptions.UseIndefLengthStrings"]/*'/>
public bool UseIndefLengthStrings {
get {
return (this.value & 1) == 0;
}
}

/// <include file='../../docs.xml'
/// path='docs/doc[@name="P:PeterO.Cbor.CBOREncodeOptions.AllowDuplicateKeys"]/*'/>
/// path='docs/doc[@name="P:CBOREncodeOptions.AllowDuplicateKeys"]/*'/>
public bool AllowDuplicateKeys {
get {
return (this.value & 2) == 0;
}
}

/// <include file='../../docs.xml'
/// path='docs/doc[@name="P:PeterO.Cbor.CBOREncodeOptions.Ctap2Canonical"]/*'/>
/// path='docs/doc[@name="P:CBOREncodeOptions.Ctap2Canonical"]/*'/>
public bool Ctap2Canonical { get; private set; }

/// <include file='../../docs.xml'
/// path='docs/doc[@name="P:PeterO.Cbor.CBOREncodeOptions.Value"]/*'/>
/// path='docs/doc[@name="P:CBOREncodeOptions.Value"]/*'/>
[Obsolete("Option classes in this library will follow the form seen in JSONOptions in a later version; the approach used in this class is too complicated.")]
public int Value {
get {
Expand All @@ -93,14 +93,14 @@ public sealed class CBOREncodeOptions {
}

/// <include file='../../docs.xml'
/// path='docs/doc[@name="M:PeterO.Cbor.CBOREncodeOptions.Or(PeterO.Cbor.CBOREncodeOptions)"]/*'/>
/// path='docs/doc[@name="M:CBOREncodeOptions.Or(CBOREncodeOptions)"]/*'/>
[Obsolete("May be removed in a later version. Option classes in this library will follow the form seen in JSONOptions in a later version; the approach used in this class is too complicated.")]
public CBOREncodeOptions Or(CBOREncodeOptions o) {
return new CBOREncodeOptions(this.value | o.value);
}

/// <include file='../../docs.xml'
/// path='docs/doc[@name="M:PeterO.Cbor.CBOREncodeOptions.And(PeterO.Cbor.CBOREncodeOptions)"]/*'/>
/// path='docs/doc[@name="M:CBOREncodeOptions.And(CBOREncodeOptions)"]/*'/>
[Obsolete("May be removed in a later version. Option classes in this library will follow the form seen in JSONOptions in a later version; the approach used in this class is too complicated.")]
public CBOREncodeOptions And(CBOREncodeOptions o) {
return new CBOREncodeOptions(this.value & o.value);
Expand Down
8 changes: 4 additions & 4 deletions CBOR/PeterO/Cbor/CBORException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@

namespace PeterO.Cbor {
/// <include file='../../docs.xml'
/// path='docs/doc[@name="T:PeterO.Cbor.CBORException"]/*'/>
/// path='docs/doc[@name="T:CBORException"]/*'/>
public class CBORException : Exception {
/// <include file='../../docs.xml'
/// path='docs/doc[@name="M:PeterO.Cbor.CBORException.#ctor"]/*'/>
/// path='docs/doc[@name="M:CBORException.#ctor"]/*'/>
public CBORException() {
}

/// <include file='../../docs.xml'
/// path='docs/doc[@name="M:PeterO.Cbor.CBORException.#ctor(System.String)"]/*'/>
/// path='docs/doc[@name="M:CBORException.#ctor(System.String)"]/*'/>
public CBORException(string message) : base(message) {
}

/// <include file='../../docs.xml'
/// path='docs/doc[@name="M:PeterO.Cbor.CBORException.#ctor(System.String,System.Exception)"]/*'/>
/// path='docs/doc[@name="M:CBORException.#ctor(System.String,System.Exception)"]/*'/>
public CBORException(string message, Exception innerException) :
base(message, innerException) {
}
Expand Down
Loading