public void SendMessage(string text) { var p = new SendMessageRequest { IdChat = 1, Text = text }; ConnectionInspector.Send(p); }
public static DataService ConnectWithDatabaseInspectorOnEnable(string DatabaseName, string DatabasePath) { if (LastConnectionWithDatabaseInInspector == null || (LastConnectionWithDatabaseInInspector != null && LastConnectionWithDatabaseInInspector.DatabaseName != DatabaseName)) { DatabaseName = EditConnectionString(DatabaseName); dataService = new DataService(DatabaseName, DatabasePath); dataService.CreateDB(); LastConnectionWithDatabaseInInspector = new ConnectionInspector() { DatabaseName = DatabaseName, IsConnected = true }; } return(dataService); }
/// <summary> /// connects with database (if it's not already connected) in Streaming assets folder or creates it, if there is no such yet. /// Returns data service object. Call this when you want to communicate with database when in inspector. /// </summary> public static DataService ConnectWithDatabaseInspector(string DatabaseName, string DatabasePath) { if (LastConnectionWithDatabaseInInspector == null || (LastConnectionWithDatabaseInInspector != null && LastConnectionWithDatabaseInInspector.DatabaseName != DatabaseName)) { DatabaseName = EditConnectionString(DatabaseName); dataService = new DataService(DatabaseName, DatabasePath); dataService.CreateDB(); LastConnectionWithDatabaseInInspector = new ConnectionInspector() { DatabaseName = DatabaseName, IsConnected = true }; } else { Debug.Log("Database with given name already exists in <i>StreamingAssets</i> folder."); } return(dataService); }
public ShellViewModel() { ConnectionInspector = new ConnectionInspector(this); MainContent = new AuthorizationViewModel(this); ConnectionInspector.PropertyChanged += this.OnServerPropertyChanged; }
/// <inheritdoc cref="IAdoNetProfiler.OnClosing(DbConnection)" /> public void OnClosing(DbConnection connection) { _connectionEventTimeline = ConnectionInspector.CreateEventTimeline(connection, _connectionId, ConnectionEvent.Close); }
/// <inheritdoc cref="IAdoNetProfiler.OnOpening(DbConnection)" /> public void OnOpening(DbConnection connection) { _connectionLifetimeTimeline = ConnectionInspector.CreateLifetimeTimeline(connection, _connectionId); _connectionEventTimeline = ConnectionInspector.CreateEventTimeline(connection, _connectionId, ConnectionEvent.Open); }