public SchemasController( ScimServerConfiguration serverConfiguration, ISchemaService schemaService) : base(serverConfiguration) { _SchemaService = schemaService; }
protected ContentTextNodeParserBase([NotNull] IFactory factory, [NotNull] ITraceService trace, [NotNull] IReferenceParserService referenceParser, [NotNull] ISchemaService schemaService, double priority) : base(priority) { Factory = factory; Trace = trace; ReferenceParser = referenceParser; SchemaService = schemaService; }
public RequestIdentityProofViewModel( IUserDialogs userDialogs, INavigationService navigationService, IAgentProvider agentContextProvider, IMessageService messageService, IConnectionService defaultConnectionService, ISchemaService schemaService, ICredentialService credentialService, ILedgerService ledgerService, IProofService proofService ) : base( "Request Identity Proof", userDialogs, navigationService) { _agentContextProvider = agentContextProvider; _connectionService = defaultConnectionService; _proofService = proofService; _messageService = messageService; _schemaService = schemaService; _credentialService = credentialService; _ledgerService = ledgerService; Schemas = new RangeEnabledObservableCollection <SchemaRecord>(); CredDefinitions = new RangeEnabledObservableCollection <DefinitionRecord>(); }
public void OnAborting(object sender, EngineEventArgs e) { IEngine engine = sender as IEngine; ISchemaService schemaService = engine.GetService <ISchemaService>(); schemaService.Abort(); }
public void OnExecuting(object sender, ExecutionCancelEventArgs e) { IEngine engine = sender as IEngine; CreateObjectCommand createObjectCommand = CreateObjectCommand.Evaluate(engine, e.Command); if (createObjectCommand == null) { return; } IObjectService objectService = engine.GetService <IObjectService>(); ISchemaService schemaService = engine.GetService <ISchemaService>(); IDatabaseService databaseService = engine.GetService <IDatabaseService>(); databaseService.EnsureTransaction(); Type type = objectService.GetTypeByName(createObjectCommand.ClassName); //Create a new object of the class object obj = objectService.CreateObject(type); //Set the properties of the new object if (createObjectCommand.Values != null) { foreach (string propertyName in createObjectCommand.Values.Keys) { if (schemaService.HasProperty(createObjectCommand.ClassName, propertyName)) { objectService.SetProperty(obj, propertyName, createObjectCommand.Values[propertyName]); } } } }
public CredentialTests() { var recordService = new DefaultWalletRecordService(); var ledgerService = new DefaultLedgerService(); _eventAggregator = new EventAggregator(); var provisioning = ServiceUtils.GetDefaultMockProvisioningService(); var tailsService = new DefaultTailsService(ledgerService, new HttpClientHandler()); _schemaService = new DefaultSchemaService(provisioning, recordService, ledgerService, tailsService); _connectionService = new DefaultConnectionService( _eventAggregator, recordService, provisioning, new Mock <ILogger <DefaultConnectionService> >().Object); _credentialService = new DefaultCredentialService( _eventAggregator, ledgerService, _connectionService, recordService, _schemaService, tailsService, provisioning, new Mock <ILogger <DefaultCredentialService> >().Object); }
public AppSaasDbContext(DbContextOptions <AppSaasDbContext> options, ISchemaService schemaService) : base(options) { if (!string.IsNullOrEmpty(schemaService.Schema)) { Schema = schemaService.Schema; } }
public void CreateProperty(CreatePropertyCommand createPropertyCommand, object sender, ExecutionCancelEventArgs e) { IEngine engine = sender as IEngine; ISchemaService schemaService = engine.GetService <ISchemaService>(); IDatabaseService databaseService = engine.GetService <IDatabaseService>(); string className = createPropertyCommand.ClassName; string propertyName = createPropertyCommand.Name; string propertyType = createPropertyCommand.Type.ToString(); string columnName = createPropertyCommand.ColumnName; DbType columnType = databaseService.GetDbType(createPropertyCommand.Type, createPropertyCommand.StringLength);; string tableName = schemaService.GetTableForClass(className); //Add a property to the class schemaService.CreateProperty(className, propertyName, propertyType); //Set the nullability of the property schemaService.SetPropertyMetaData(className, propertyName, PropertyMetaData.Nullable, createPropertyCommand.Nullable); //Add a column to the table schemaService.CreateColumn(tableName, columnName, columnType); //Set the nullability of the column schemaService.SetColumnMetaData(tableName, columnName, ColumnMetaData.Nullable, createPropertyCommand.Nullable); //Map the property to the column in the schema schemaService.MapPropertyToColumn(className, propertyName, tableName, columnName); }
public ShellViewModel(IPresentationService presentationService, IShellSettingsService shellSettingsService, IEventAggregator eventAggregator, IMenuViewModel menu, ISettingsViewModel settings, ICodeGenSettingsService codeGenSettingsService, ICodeGenSettings codeGenSettings, IMessageService messageService, IMappingViewModel mapping, ISchemaService schemaService, ICustomSchemaSqlViewModel customSchemaSqlViewModel, ITemplateWriterService templateWriterService) { this._shellSettingsService = shellSettingsService; this._codeGenSettingsService = codeGenSettingsService; this._codeGenSettings = codeGenSettings; this._messageService = messageService; this._templateWriterService = templateWriterService; this.Menu = menu; this.Settings = settings; this.Mapping = mapping; this._schemaService = schemaService; this.CustomSchemaSqlViewModel = customSchemaSqlViewModel; this.WindowClosing = new Command <CancelEventArgs>(OnWindowClosing); this.WindowDrop = new Command <DragEventArgs>(OnWindowDrop); this.DisplayText = "IQToolkit CodeGen"; this.SetWindowPosition(presentationService); eventAggregator.GetEvent <LoadSchemaEvent>().Subscribe(this.LoadSchemaEventHandler); eventAggregator.GetEvent <GenerateFilesEvent>().Subscribe(_ => this.GenerateFilesEventHandler()); eventAggregator.GetEvent <CustomSchemaSqlViewVisibilityChangedEvent>().Subscribe(this.CustomSchemaSqlViewVisibilityChangedEvent); }
public SchemaServiceDemo(String defaultRepository, String secondaryRepository, String userName, String password) : base(defaultRepository, secondaryRepository, userName, password) { ServiceFactory serviceFactory = ServiceFactory.Instance; schemaService = serviceFactory.GetRemoteService<ISchemaService>(DemoServiceContext); }
public ProductController( ISolrSearchService searchService, ISchemaService schemaService) { this.searchService = searchService; this.schemaService = schemaService; }
public CredentialTests() { var recordService = new DefaultWalletRecordService(); var ledgerService = new DefaultLedgerService(); _eventAggregator = new EventAggregator(); _poolService = new DefaultPoolService(); var routingMock = new Mock <IMessageService>(); routingMock.Setup(x => x.SendAsync(It.IsAny <Wallet>(), It.IsAny <IAgentMessage>(), It.IsAny <ConnectionRecord>(), It.IsAny <string>())) .Callback((Wallet _, IAgentMessage content, ConnectionRecord __, string ___) => { if (_routeMessage) { _messages.Add(content); } else { throw new AgentFrameworkException(ErrorCode.LedgerOperationRejected, ""); } }) .Returns(Task.FromResult(false)); var provisioningMock = new Mock <IProvisioningService>(); provisioningMock.Setup(x => x.GetProvisioningAsync(It.IsAny <Wallet>())) .Returns(Task.FromResult(new ProvisioningRecord { Endpoint = new AgentEndpoint { Uri = MockEndpointUri }, MasterSecretId = MasterSecretId, TailsBaseUri = MockEndpointUri })); var tailsService = new DefaultTailsService(ledgerService); _schemaService = new DefaultSchemaService(provisioningMock.Object, recordService, ledgerService, tailsService); _connectionService = new DefaultConnectionService( _eventAggregator, recordService, routingMock.Object, provisioningMock.Object, new Mock <ILogger <DefaultConnectionService> >().Object); _credentialService = new DefaultCredentialService( _eventAggregator, routingMock.Object, ledgerService, _connectionService, recordService, _schemaService, tailsService, provisioningMock.Object, new Mock <ILogger <DefaultCredentialService> >().Object); }
public void CreateRelationship(CreatePropertyCommand createPropertyCommand, object sender, Puzzle.SideFX.Framework.Execution.ExecutionCancelEventArgs e) { IEngine engine = sender as IEngine; ISchemaService schemaService = engine.GetService <ISchemaService>(); IDatabaseService databaseService = engine.GetService <IDatabaseService>(); string className = createPropertyCommand.ClassName; string propertyName = createPropertyCommand.Name; string propertyType = createPropertyCommand.Type.ToString(); string columnName = createPropertyCommand.ColumnName; DbType columnType = DbType.Int32; //TODO: Get the column of the identity property string tableName = schemaService.GetTableForClass(className); switch (createPropertyCommand.Multiplicity) { case Multiplicity.OneToMany: case Multiplicity.OneToOne: //Add a property to the class schemaService.CreateProperty(className, propertyName, propertyType); //Set the nullability of the property schemaService.SetPropertyMetaData(className, propertyName, PropertyMetaData.Nullable, createPropertyCommand.Nullable); //Add a column to the table schemaService.CreateColumn(tableName, columnName, columnType); //Set the nullability of the column schemaService.SetColumnMetaData(tableName, columnName, ColumnMetaData.Nullable, createPropertyCommand.Nullable); //Map the property to the column in the schema schemaService.MapPropertyToColumn(className, propertyName, tableName, columnName); break; case Multiplicity.ManyToMany: //Add a property to the class schemaService.CreateListProperty(className, propertyName, propertyType); //Add a many-many table //schemaService.CreateTable(tableName, columnName, columnType); break; case Multiplicity.ManyToOne: //Add a property to the class schemaService.CreateListProperty(className, propertyName, propertyType); //Add a column to the table //schemaService.CreateColumn(tableName, columnName, columnType); break; } }
public SchemaController( ISchemaService taskService, CombinedLogger <TaskController> logger ) { _schemaService = taskService; _logger = logger; }
protected TemplateTextNodeParserBase([NotNull] IFactory factory, [NotNull] ITraceService trace, [NotNull] IPipelineService pipelines, [NotNull] IReferenceParserService referenceParser, [NotNull] ISchemaService schemaService, double priority) : base(priority) { Factory = factory; Trace = trace; Pipelines = pipelines; ReferenceParser = referenceParser; SchemaService = schemaService; }
public EphemeralChallengeTests() { var recordService = new DefaultWalletRecordService(); var ledgerService = new DefaultLedgerService(); var eventAggregator = new EventAggregator(); var routingMock = new Mock <IMessageService>(); routingMock.Setup(x => x.SendAsync(It.IsAny <Wallet>(), It.IsAny <AgentMessage>(), It.IsAny <ConnectionRecord>(), It.IsAny <string>(), It.IsAny <bool>())) .Callback((Wallet _, AgentMessage content, ConnectionRecord __, string ___, bool ____) => { if (_routeMessage) { _messages.Add(content); } else { throw new AgentFrameworkException(ErrorCode.LedgerOperationRejected, ""); } }) .Returns(Task.FromResult <MessageContext>(null)); var provisioningMock = ServiceUtils.GetDefaultMockProvisioningService(); var tailsService = new DefaultTailsService(ledgerService, new HttpClientHandler()); _schemaService = new DefaultSchemaService(provisioningMock, recordService, ledgerService, tailsService); _connectionService = new DefaultConnectionService( eventAggregator, recordService, provisioningMock, new Mock <ILogger <DefaultConnectionService> >().Object); _credentialService = new DefaultCredentialService( eventAggregator, ledgerService, _connectionService, recordService, _schemaService, tailsService, provisioningMock, new Mock <ILogger <DefaultCredentialService> >().Object); _proofService = new DefaultProofService( eventAggregator, _connectionService, recordService, provisioningMock, ledgerService, tailsService, new Mock <ILogger <DefaultProofService> >().Object); _ephemeralChallengeService = new DefaultEphemeralChallengeService(eventAggregator, _proofService, recordService, provisioningMock, new Mock <ILogger <DefaultEphemeralChallengeService> >().Object); }
public SolrClient(string facetConfiguration,ISchemaService schemaService) { if (File.Exists(facetConfiguration)) { this.configuration = XElement.Load(facetConfiguration); } this.schemaService = schemaService; }
public CredentialDefinitionController( IAgentProvider agentContextProvider, IProvisioningService provisionService, ISchemaService schemaService) { _agentContextProvider = agentContextProvider; _provisionService = provisionService; _schemaService = schemaService; }
public SchemaServiceTests() { var walletService = new DefaultWalletRecordService(); var ledgerService = new DefaultLedgerService(); var tailsService = new DefaultTailsService(ledgerService); _poolService = new DefaultPoolService(); _schemaService = new DefaultSchemaService(walletService, ledgerService, tailsService); }
public SchemaController( IAgentProvider agentContextProvider, IProvisioningService provisionService, ISchemaService schemaService) { _agentContextProvider = agentContextProvider; _provisionService = provisionService; _schemaService = schemaService; }
public ItemParser([NotNull] IConfiguration configuration, [NotNull] IFactory factory, [NotNull] ITraceService trace, [NotNull] ISchemaService schemaService, [ImportMany, NotNull, ItemNotNull] IEnumerable <ITextNodeParser> textNodeParsers) : base(Constants.Parsers.Items) { Configuration = configuration; Factory = factory; Trace = trace; SchemaService = schemaService; TextNodeParsers = textNodeParsers; PathMatcher = Factory.PathMatcher(configuration.GetString(Constants.Configuration.Items.Include), configuration.GetString(Constants.Configuration.Items.Exclude)); }
public SchemaServiceTests() { var walletService = new DefaultWalletRecordService(); var ledgerService = new DefaultLedgerService(); var tailsService = new DefaultTailsService(ledgerService, new HttpClientHandler()); var provisioningMock = new Mock <IProvisioningService>(); _schemaService = new DefaultSchemaService(provisioningMock.Object, walletService, ledgerService, tailsService); }
private static void ProcessTables(ISchemaService schemaService) { var tables = schemaService.GetTablesBy("Avid"); foreach (var table in tables) { CreateDatabaseFolder(table.DatabaseName); var columns = schemaService.GetColumnsBy("Avid", table.TableSchema, table.TableName); CreateClassFile(table, columns); } }
public ComponentService( IComponentStore componentStore, IDataLoader <Guid, Component> componentById, ISchemaService schemaService, IChangeLogService changeLogService) { _componentStore = componentStore; _componentById = componentById; _schemaService = schemaService; _changeLogService = changeLogService; }
public CreateSchemaHandler ( IAgentProvider aAgentProvider, IProvisioningService aProvisioningService, ISchemaService aSchemaService ) { AgentProvider = aAgentProvider; ProvisioningService = aProvisioningService; SchemaService = aSchemaService; }
public CreateCredentialDefinitionHandler ( IAgentProvider aAgentProvider, IProvisioningService aProvisioningService, ISchemaService aSchemaService ) { AgentProvider = aAgentProvider; ProvisioningService = aProvisioningService; SchemaService = aSchemaService; }
public SchemaController( ILogger <SchemaController> logger, ISchemaService schemaService, IMemoryCache cache, IOptions <CacheOptions> options ) { this.logger = logger; this.schemaService = schemaService; this.cache = cache; this.options = options.Value; }
public static DeleteObjectsCommand Evaluate(IEngine engine, Command command) { if (command.Parameters.Count < 2) { return(null); } if (command.Parameters[0].Name.ToLower() != "delete") { return(null); } if (command.Parameters[0].Value != null) { return(null); } string name = command.Parameters[1].Name; if (string.IsNullOrEmpty(name)) { return(null); } ISchemaService schemaService = engine.GetService <ISchemaService>(); if (!schemaService.HasClass(name)) { return(null); } DeleteObjectsCommand deleteObjectsCommand = new DeleteObjectsCommand(name); EvaluateMatch(command.Parameters[1].Value, name, schemaService, deleteObjectsCommand); if (command.Parameters.Count > 2) { switch (command.Parameters[2].Name.ToLower()) { case "match": case "where": EvaluateMatch(command.Parameters[2].Value, name, schemaService, deleteObjectsCommand); break; case "query": if (command.Parameters[2].Value != null) { deleteObjectsCommand.Where = command.Parameters[2].Value.ToString(); } break; } } return(deleteObjectsCommand); }
public void OnExecuting(object sender, ExecutionCancelEventArgs e) { CreateClassCommand createClassCommand = CreateClassCommand.Evaluate(e.Command); if (createClassCommand == null) { return; } IEngine engine = sender as IEngine; ISchemaService schemaService = engine.GetService <ISchemaService>(); string name = createClassCommand.Name; string propertyName = "Id"; string propertyType = "System.Int32"; string columnName = name + "Id"; DbType columnType = DbType.Int32; //Add the class to the schema schemaService.CreateClass(name); //Add a property to the class schemaService.CreateProperty(name, propertyName, propertyType); //Mark the property as an identity property schemaService.SetPropertyMetaData(name, propertyName, PropertyMetaData.Identity, true); //Mark the property as not nullable schemaService.SetPropertyMetaData(name, propertyName, PropertyMetaData.Nullable, false); //Mark the property as assigned by the data source schemaService.SetPropertyMetaData(name, propertyName, PropertyMetaData.SourceAssigned, true); //Add the table to the schema schemaService.CreateTable(createClassCommand.TableName); //Add a column to the table schemaService.CreateColumn(createClassCommand.TableName, columnName, columnType); //Mark the column as a primary key column schemaService.SetColumnMetaData(createClassCommand.TableName, columnName, ColumnMetaData.PrimaryKey, true); //Mark the column as not nullable schemaService.SetColumnMetaData(createClassCommand.TableName, columnName, ColumnMetaData.Nullable, false); //Mark the column as an auto increasing column schemaService.SetColumnMetaData(createClassCommand.TableName, columnName, ColumnMetaData.AutoIncreaser, true); //Map the class to the table in the schema schemaService.MapClassToTable(name, createClassCommand.TableName); //Map the property to the column in the schema schemaService.MapPropertyToColumn(name, propertyName, createClassCommand.TableName, columnName); }
public ProofTests() { var recordService = new DefaultWalletRecordService(); var ledgerService = new DefaultLedgerService(new DefaultLedgerSigningService()); _eventAggregator = new EventAggregator(); var messageService = new DefaultMessageService(new Mock <ILogger <DefaultMessageService> >().Object, new IMessageDispatcher[] { }); var provisioning = ServiceUtils.GetDefaultMockProvisioningService(); var paymentService = new DefaultPaymentService(); var clientFactory = new Mock <IHttpClientFactory>(); clientFactory.Setup(x => x.CreateClient(It.IsAny <string>())) .Returns(new HttpClient()); var tailsService = new DefaultTailsService(ledgerService, clientFactory.Object); _schemaService = new DefaultSchemaService(provisioning, recordService, ledgerService, paymentService, tailsService); _connectionService = new DefaultConnectionService( _eventAggregator, recordService, provisioning, new Mock <ILogger <DefaultConnectionService> >().Object); _credentialService = new DefaultCredentialService( _eventAggregator, ledgerService, _connectionService, recordService, _schemaService, tailsService, provisioning, paymentService, messageService, new Mock <ILogger <DefaultCredentialService> >().Object); _proofService = new DefaultProofService( _eventAggregator, _connectionService, recordService, provisioning, ledgerService, tailsService, messageService, new Mock <ILogger <DefaultProofService> >().Object); }
public object Render(object obj, bool list) { StringBuilder sb = new StringBuilder(); ISchemaService schemaService = engine.GetService <ISchemaService>(); IObjectService objectService = engine.GetService <IObjectService>(); string className = objectService.GetTypeName(obj); sb.Append(className + ": "); if (!list) { sb.Append(Environment.NewLine); } IList <string> propertyNames = schemaService.GetPropertyNames(obj.GetType()); foreach (string propertyName in propertyNames) { sb.Append(propertyName + "="); if (objectService.IsNull(obj, propertyName)) { sb.Append("{null}"); } else { sb.Append(objectService.GetProperty(obj, propertyName).ToString()); } if (list) { sb.Append(", "); } else { sb.Append(Environment.NewLine); } } if (list) { if (propertyNames.Count > 0) { sb.Length -= 2; } } return(sb.ToString()); }
public HomeController( IWalletService walletService, IProvisioningService provisioningService, ISchemaService schemaService, IAgentProvider agentContextProvider, ILogger <HomeController> logger, IOptions <AgentOptions> walletOptions) { _walletService = walletService; _provisioningService = provisioningService; _walletOptions = walletOptions.Value; _schemaService = schemaService; _agentContextProvider = agentContextProvider; _logger = logger; }
public SchemaController(ISchemaService schemaService) { this.schemaService = schemaService; }
public EditorController(ISchemaService schemaService) { this.schemaService = schemaService; }
public SchemaController(ICommandDispatcher dispatcher, ISchemaService schemaService) { _dispatcher = dispatcher; _schemaService = schemaService; }
private static void EvaluateMatch(object possibleMatch, string name, ISchemaService schemaService, DisplayObjectsCommand displayObjectsCommand) { IList<Parameter> match = possibleMatch as IList<Parameter>; if (match != null) { foreach (Parameter parameter in match) { if (schemaService.HasProperty(name, parameter.Name)) { displayObjectsCommand.Match[parameter.Name] = parameter.Value; } } } }