@@ -52,15 +52,15 @@ internal Provider(ILdClient client)
52
52
/// Construct a new instance of the provider with the given configuration.
53
53
/// </summary>
54
54
/// <param name="config">A client configuration object</param>
55
- public Provider ( Configuration config ) : this ( new LdClient ( config ) )
55
+ public Provider ( Configuration config ) : this ( new LdClient ( WrapConfig ( config ) ) )
56
56
{
57
57
}
58
58
59
59
/// <summary>
60
60
/// Construct a new instance of the provider with the given SDK key.
61
61
/// </summary>
62
62
/// <param name="sdkKey">The SDK key</param>
63
- public Provider ( string sdkKey ) : this ( new LdClient ( sdkKey ) )
63
+ public Provider ( string sdkKey ) : this ( new LdClient ( WrapConfig ( Configuration . Builder ( sdkKey ) . Build ( ) ) ) )
64
64
{
65
65
}
66
66
@@ -83,6 +83,14 @@ public ILdClient GetClient()
83
83
return _client ;
84
84
}
85
85
86
+ private static Configuration WrapConfig ( Configuration config )
87
+ {
88
+ return Configuration . Builder ( config )
89
+ . WrapperInfo ( Components . WrapperInfo ( ) . Name ( "open-feature-dotnet-server" )
90
+ . Version ( typeof ( Provider ) . Assembly . GetName ( ) . Version . ToString ( ) ) )
91
+ . Build ( ) ;
92
+ }
93
+
86
94
#region FeatureProvider Implementation
87
95
88
96
/// <inheritdoc />
@@ -180,10 +188,10 @@ await EventChannel.Writer.WriteAsync(new ProviderEventPayload
180
188
{
181
189
ProviderName = _metadata . Name ,
182
190
Type = ProviderEventTypes . ProviderConfigurationChanged ,
183
- FlagsChanged = new List < string > { changeEvent . Key } ,
191
+ FlagsChanged = new List < string > { changeEvent . Key } ,
184
192
} ) . ConfigureAwait ( false ) ;
185
193
}
186
- catch ( Exception e )
194
+ catch ( Exception e )
187
195
{
188
196
_logger . Warn ( $ "Encountered an error sending configuration changed events: { e . Message } ") ;
189
197
}
0 commit comments