@@ -18,6 +18,10 @@ public record Node
1818 /// Protocol for the Typesense service - defaults to http.
1919 /// </summary>
2020 public string Protocol { get ; set ; } = "http" ;
21+ /// <summary>
22+ /// Protocol for the Typesense service - defaults to http.
23+ /// </summary>
24+ public string AdditionalPath { get ; set ; } = "" ;
2125
2226 [ Obsolete ( "Use multi-arity constructor instead." ) ]
2327 public Node ( )
@@ -52,4 +56,32 @@ public Node(string host, string port, string protocol = "http")
5256 Port = port ;
5357 Protocol = protocol ;
5458 }
59+
60+ /// <param name="host">Hostname for the Typesense service.</param>
61+ /// <param name="port">Port for the typesense service.</param>
62+ /// <param name="protocol">Protocol for the Typesense service - defaults to http.</param>
63+ /// <param name="additionalPath">additionalPath for the Typesense service - defaults to empty string.</param>
64+ /// <exception cref="ArgumentException"></exception>
65+ public Node ( string host , string port , string protocol = "http" , string additionalPath = "" )
66+ {
67+ if ( string . IsNullOrEmpty ( host ) )
68+ {
69+ throw new ArgumentException ( "Cannot be NULL or empty." , nameof ( host ) ) ;
70+ }
71+
72+ if ( string . IsNullOrEmpty ( protocol ) )
73+ {
74+ throw new ArgumentException ( "Cannot be NULL or empty." , nameof ( protocol ) ) ;
75+ }
76+
77+ if ( string . IsNullOrEmpty ( port ) )
78+ {
79+ throw new ArgumentException ( "Cannot be NULL or empty." , nameof ( port ) ) ;
80+ }
81+
82+ Host = host ;
83+ Port = port ;
84+ Protocol = protocol ;
85+ AdditionalPath = additionalPath ;
86+ }
5587}
0 commit comments