Skip to content

Commit

Permalink
Port Profile.java/.cs. Fixes #8
Browse files Browse the repository at this point in the history
  • Loading branch information
bchavez committed Nov 3, 2015
1 parent 2cd7522 commit 6307ab9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Source/RethinkDb.Driver/Model/Profile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ namespace RethinkDb.Driver.Model
{
public class Profile
{
public Profile(JArray profileObj)
{
this.ProfileObj = profileObj;
}

public JArray ProfileObj { get; }

public static Profile FromJsonArray(JArray profileObj)
{
if( profileObj == null )
if( profileObj == null && profileObj.Count == 0 )
{
return null;
}
throw new Exception("fromJSONArray not implemented");
return new Profile(profileObj);
}
}
}

0 comments on commit 6307ab9

Please sign in to comment.