コード例 #1
0
            public override void DoAction(bool onRemote, bool isFromMe)
            {
                // Local echo of my action: Return without doing anything
                if (onRemote && isFromMe)
                {
                    return;
                }

                NodeTypeManager.RestartPrivate();
            }
コード例 #2
0
        private static void LoadPrivate()
        {
            // this method must be called inside a lock block!
            var current = new NodeTypeManager();

            current.Load();

            Providers.Instance.NodeTypeManeger = current;

            NodeObserver.FireOnStart(Start);
            SnLog.WriteInformation("NodeTypeManager created: " + Providers.Instance.NodeTypeManeger);
        }
コード例 #3
0
            public override Task DoActionAsync(bool onRemote, bool isFromMe, CancellationToken cancellationToken)
            {
                // Local echo of my action: Return without doing anything
                if (onRemote && isFromMe)
                {
                    return(Task.CompletedTask);
                }

                NodeTypeManager.RestartPrivate();

                return(Task.CompletedTask);
            }
コード例 #4
0
 /// <summary>
 /// Restarts the NodeTypeManager without sending an ApplicationMessage.
 /// Do not call this method explicitly, the system will call it if neccessary (when the reset is triggered by an another instance).
 /// </summary>
 private static void RestartPrivate()
 {
     Logger.WriteInformation("NodeTypeManager.Restart executed.", Logger.Categories(),
                             new Dictionary <string, object> {
         { "AppDomain", AppDomain.CurrentDomain.FriendlyName }
     });
     OnReset();
     lock (_lock)
     {
         DataProvider.Current.Reset();
         _current = null;
     }
 }
コード例 #5
0
ファイル: NodeTypeManager.cs プロジェクト: sztomi/sensenet
        private static void LoadPrivate()
        {
            // this method must be called inside a lock block!
            var current = new NodeTypeManager();

            current.Load();
            current.StartEventSystem();

            _current = current;

            NodeObserver.FireOnStart(Start);
            SnLog.WriteInformation("NodeTypeManager created: " + _current);
        }
コード例 #6
0
ファイル: NodeTypeManager.cs プロジェクト: vlslavik/SenseNet
 /// <summary>
 /// Restarts the NodeTypeManager without sending an ApplicationMessage.
 /// Do not call this method explicitly, the system will call it if neccessary (when the reset is triggered by an another instance).
 /// </summary>
 private static void RestartPrivate()
 {
     Logger.WriteInformation(EventId.TypeSystem.NodeTypeManagerRestart,
                             "NodeTypeManager.Restart executed.",
                             properties: new Dictionary <string, object> {
         { "AppDomain", AppDomain.CurrentDomain.FriendlyName }
     });
     OnReset();
     lock (_lock)
     {
         DataProvider.Current.Reset();
         _current = null;
     }
 }
コード例 #7
0
ファイル: NodeTypeManager.cs プロジェクト: maxpavlov/FlexNet
 /// <summary>
 /// Restarts the NodeTypeManager without sending an ApplicationMessage.
 /// Do not call this method explicitly, the system will call it if neccessary (when the reset is triggered by an another instance).
 /// </summary>
 private static void RestartPrivate()
 {
     Logger.WriteInformation("NodeTypeManager.Restart executed.", Logger.Categories(), 
         new Dictionary<string, object> { { "AppDomain", AppDomain.CurrentDomain.FriendlyName } });
     OnReset();
     lock (_lock)
     {
         DataProvider.Current.Reset();
         _current = null;
     }
 }