Prerequisites: None
Namespaces: InRule.Repository.Client
Classes: RuleCatalogConnection
The rule catalog connection object is used to obtain the RuleApplicationDef from the catalog for authoring rules in code.
Creating a Catalog connection with URI
// Create a RuleCatalogConnection passing in the catalog URI
RuleCatalogConnection connection = new RuleCatalogConnection(new Uri(repositoryUri));
Creating a Catalog connection with credentials
// Create a RuleCatalogConnection passing in the catalog URI and login credentials
RuleCatalogConnection connection
= new RuleCatalogConnection(new Uri(repositoryUri),new TimeSpan(0,10,0),"Admin","password");
Getting a Catalog connection with oAuthManager
var settings = new OAuthSettings();
settings.Audience = "YOUR_VALUE";
settings.ClientId = "YOUR_VALUE";
settings.Authority = "YOUR_VALUE";
settings.RedirectUri = "YOUR_VALUE";
settings.LogoutUrl = "YOUR_VALUE";
var oAuthManager = new OAuthManager(settings);
// Gets a RuleCatalogConnection from your oAuthManager instance
RuleCatalogConnection connection = oAuthManager.CreateCatalogConnectionAsync(repositoryUri, new TimeSpan(0,10,0), false);
Comments
0 comments
Please sign in to leave a comment.