Skip to content

Commit

Permalink
Fixed code compliance for ToMongoQuery (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraser Greenroyd authored Mar 26, 2024
2 parents ec66e57 + cc853ff commit 55fafd2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions Mongo_Adapter/MongoAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ public partial class MongoAdapter : BHoMAdapter
/**** Constructors ****/
/***************************************************/

[Description("Create an adapter to a Mongo database. Use this constructor if you have the name of the server hosting the database and its port number")]
[Input("serverName", "address of the server hosting the database. Will generally start with \"mongodb://\"")]
[Input("port", "port number used to access the database. This will generally be the number after the ':' at the end of the address of the database")]
[Input("databaseName", "name of the database itself")]
[Input("collectionName", "name of the collection you want to access inside that database")]
[Input("useHistory", "If true, will store a copy of the data pushed to Mongo in a separate collection. Data from the last 5 pushes is available there")]
[Output("adapter", "Adapter to Mongo Database")]
[Description("Create an adapter to a Mongo database. Use this constructor if you have the name of the server hosting the database and its port number.")]
[Input("serverName", "address of the server hosting the database. Will generally start with \"mongodb://\".")]
[Input("port", "port number used to access the database. This will generally be the number after the ':' at the end of the address of the database.")]
[Input("databaseName", "name of the database itself.")]
[Input("collectionName", "name of the collection you want to access inside that database.")]
[Input("useHistory", "If true, will store a copy of the data pushed to Mongo in a separate collection. Data from the last 5 pushes is available there.")]
[Output("adapter", "Adapter to Mongo Database.")]
public MongoAdapter(string serverName = "mongodb://localhost", int port = 27017, string databaseName = "project", string collectionName = "bhomObjects", bool useHistory = true)
{

Expand Down Expand Up @@ -85,12 +85,12 @@ public MongoAdapter(string serverName = "mongodb://localhost", int port = 27017,

/***************************************************/

[Description("Create an adapter to a Mongo database. Use this constructor if you have a single long string representing the location of your database (and potentially identification)")]
[Input("connectionString", "Text given to you to access the database. Will generally start with \"mongodb://\"")]
[Input("databaseName", "name of the database itself")]
[Input("collectionName", "name of the collection you want to access inside that database")]
[Input("useHistory", "If true, will store a copy of the data pushed to Mongo in a separate collection. Data from the last 5 pushes is available there")]
[Output("adapter", "Adapter to Mongo Database")]
[Description("Create an adapter to a Mongo database. Use this constructor if you have a single long string representing the location of your database (and potentially identification).")]
[Input("connectionString", "Text given to you to access the database. Will generally start with \"mongodb://\".")]
[Input("databaseName", "name of the database itself.")]
[Input("collectionName", "name of the collection you want to access inside that database.")]
[Input("useHistory", "If true, will store a copy of the data pushed to Mongo in a separate collection. Data from the last 5 pushes is available there.")]
[Output("adapter", "Adapter to Mongo Database.")]
public MongoAdapter(string connectionString, string databaseName = "project", string collectionName = "bhomObjects", bool useHistory = false)
{

Expand Down
2 changes: 1 addition & 1 deletion Mongo_Engine/Convert/Bson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static BsonDocument ToBson(object obj, string tag)

/*******************************************/

public static object FromBson(BsonDocument document)
public static object FromBson(this BsonDocument document)

Check warning on line 56 in Mongo_Engine/Convert/Bson.cs

View check run for this annotation

BHoMBot-CI / beta-documentation-compliance

Mongo_Engine/Convert/Bson.cs#L56

Input parameter requires a matching Input attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsInputAttributePresent Method must contain an Output or MultiOutput attribute - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/HasOutputAttribute
{
document.Remove("__Tag__");
document.Remove("__Time__");
Expand Down

0 comments on commit 55fafd2

Please sign in to comment.