Esempio n. 1
0
 public RepositoryHandler(Uri repositoryUri, ResolverClientOptions options = null)
 {
     ClientOptions = options ?? new ResolverClientOptions();
     RepositoryUri = repositoryUri;
     _modelFetcher = repositoryUri.Scheme == "file" ?
                     _modelFetcher = new LocalModelFetcher(ClientOptions) :
                                     _modelFetcher = new RemoteModelFetcher(ClientOptions);
     _clientId = Guid.NewGuid();
     ResolverEventSource.Shared.InitFetcher(_clientId, repositoryUri.Scheme);
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes the <c>ResolverClient</c> with custom client <paramref name="options"/> while pointing to
 /// a custom <paramref name="repositoryUriStr"/> for resolution.
 /// </summary>
 /// <param name="repositoryUriStr">
 /// The model repository <c>Uri</c> in string format. This can be a remote endpoint or local directory.
 /// </param>
 /// <param name="options">
 /// <c>ResolverClientOptions</c> to configure resolution and client behavior.
 /// </param>
 public ResolverClient(string repositoryUriStr, ResolverClientOptions options) :
     this(new Uri(repositoryUriStr), options)
 {
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes the <c>ResolverClient</c> with custom client <paramref name="options"/> while pointing to
 /// a custom <paramref name="repositoryUri"/> for resolution.
 /// </summary>
 /// <param name="repositoryUri">
 /// The model repository <c>Uri</c>. This can be a remote endpoint or local directory.
 /// </param>
 /// <param name="options">
 /// <c>ResolverClientOptions</c> to configure resolution and client behavior.
 /// </param>
 public ResolverClient(Uri repositoryUri, ResolverClientOptions options)
 {
     this.repositoryHandler = new RepositoryHandler(repositoryUri, options);
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes the <c>ResolverClient</c> with custom client <paramref name="options"/> while pointing to
 /// the Azure IoT Plug and Play Model repository https://devicemodels.azure.com for resolution.
 /// </summary>
 /// <param name="options">
 /// <c>ResolverClientOptions</c> to configure resolution and client behavior.
 /// </param>
 public ResolverClient(ResolverClientOptions options) : this(new Uri(DefaultRepository), options)
 {
 }