コード例 #1
0
        public void SendMessage(string text)
        {
            var p = new SendMessageRequest
            {
                IdChat = 1,
                Text   = text
            };

            ConnectionInspector.Send(p);
        }
コード例 #2
0
 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);
 }
コード例 #3
0
 /// <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);
 }
コード例 #4
0
 public ShellViewModel()
 {
     ConnectionInspector = new ConnectionInspector(this);
     MainContent         = new AuthorizationViewModel(this);
     ConnectionInspector.PropertyChanged += this.OnServerPropertyChanged;
 }
コード例 #5
0
 /// <inheritdoc cref="IAdoNetProfiler.OnClosing(DbConnection)" />
 public void OnClosing(DbConnection connection)
 {
     _connectionEventTimeline = ConnectionInspector.CreateEventTimeline(connection, _connectionId, ConnectionEvent.Close);
 }
コード例 #6
0
 /// <inheritdoc cref="IAdoNetProfiler.OnOpening(DbConnection)" />
 public void OnOpening(DbConnection connection)
 {
     _connectionLifetimeTimeline = ConnectionInspector.CreateLifetimeTimeline(connection, _connectionId);
     _connectionEventTimeline    = ConnectionInspector.CreateEventTimeline(connection, _connectionId, ConnectionEvent.Open);
 }