Exemplo n.º 1
0
 /// <summary>
 /// Appends the usage common fields.
 /// </summary>
 /// <param name="uriBuilder">The URI.</param>
 /// <param name="serverConnection">The server connection.</param>
 public static void AppendUsageCommonFields(this UriBuilder uriBuilder, IServerConnection serverConnection)
 {
     AppendQuery(uriBuilder, StringTable.ApiKey, serverConnection.ClientId);
     AppendQuery(uriBuilder, StringTable.AppName, serverConnection.AppName);
     AppendQuery(uriBuilder, StringTable.Version, serverConnection.AppVersion);
     AppendQuery(uriBuilder, StringTable.Udid, serverConnection.Udid);
 }
Exemplo n.º 2
0
        public override void Run()
        {
            var wb = Workbench.Instance;
            var exp = wb.ActiveSiteExplorer;
            var items = wb.ActiveSiteExplorer.SelectedItems;
            var openMgr = ServiceRegistry.GetService<OpenResourceManager>();
            var connMgr = ServiceRegistry.GetService<ServerConnectionManager>();
            _conn = connMgr.GetConnection(wb.ActiveSiteExplorer.ConnectionName);

            if (items.Length == 1)
            {
                var item = items[0];
                if (!item.IsFolder)
                {
                    if (openMgr.IsOpen(item.ResourceId, _conn))
                    {
                        var ed = openMgr.GetOpenEditor(item.ResourceId, _conn);
                        if (!(ed is XmlEditor))
                        {
                            MessageService.ShowMessage(Strings.ResourceAlreadyOpened);
                            return;
                        }
                        else
                        {
                            ed.Activate();
                        }
                    }
                    else
                    {
                        openMgr.Open(item.ResourceId, _conn, true, exp);
                    }
                }
            }
        }
Exemplo n.º 3
0
        public bool HandleDrop(IServerConnection conn, string file, string folderId)
        {
            try
            {
                var wb = Workbench.Instance;
                var exp = wb.ActiveSiteExplorer;
                var fs = ObjectFactory.CreateFeatureSource(conn, "OSGeo.SQLite"); //NOXLATE

                string fileName = Path.GetFileName(file);
                string resName = Path.GetFileNameWithoutExtension(file);
                int counter = 0;
                string resId = folderId + resName + ".FeatureSource"; //NOXLATE
                while (conn.ResourceService.ResourceExists(resId))
                {
                    counter++;
                    resId = folderId + resName + " (" + counter + ").FeatureSource"; //NOXLATE
                }
                fs.ResourceID = resId;
                fs.SetConnectionProperty("File", StringConstants.MgDataFilePath + fileName); //NOXLATE
                conn.ResourceService.SaveResource(fs);

                using (var stream = File.Open(file, FileMode.Open))
                {
                    fs.SetResourceData(fileName, OSGeo.MapGuide.ObjectModels.Common.ResourceDataType.File, stream);
                }

                return true;
            }
            catch (Exception ex)
            {
                ErrorDialog.Show(ex);
                return false;
            }
        }
 /// <summary>
 /// Initialise a new <see cref="EncryptingConnection"/>.
 /// </summary>
 /// <param name="innerConnection">The connection for sending messages.</param>
 public EncryptingConnection(IServerConnection innerConnection)
 {
     this.innerConnection = innerConnection;
     innerConnection.SendMessageCompleted += PassOnSendMessageCompleted;
     innerConnection.RequestSending += PassOnRequestSending;
     innerConnection.ResponseReceived += PassOnResponseReceived;
 }
Exemplo n.º 5
0
        public bool HandleDrop(IServerConnection conn, string file, string folderId)
        {
            try
            {
                if (!MessageService.AskQuestion(Strings.ConfirmLoadPackage, Strings.Confirm))
                    return false;

                var wb = Workbench.Instance;
                var exp = wb.ActiveSiteExplorer;
                var optDiag = new PackageUploadOptionDialog();
                optDiag.ShowDialog();
                DialogResult res;
                if (optDiag.Method == PackageUploadMethod.Transactional)
                {
                    res = PackageProgress.UploadPackage(wb, conn, file);
                }
                else
                {
                    res = PackageProgress.StartNonTransactionalUploadLoop(wb, conn, file);
                }
                if (res == System.Windows.Forms.DialogResult.OK)
                {
                    exp.RefreshModel(conn.DisplayName);
                }
                return false; //Already refreshed if successful
            }
            catch (Exception ex)
            {
                ErrorDialog.Show(ex);
                return false;
            }
        }
Exemplo n.º 6
0
        public override void Run()
        {
            var wb = Workbench.Instance;
            var exp = wb.ActiveSiteExplorer;
            var items = wb.ActiveSiteExplorer.SelectedItems;
            var openMgr = ServiceRegistry.GetService<OpenResourceManager>();
            var connMgr = ServiceRegistry.GetService<ServerConnectionManager>();
            _conn = connMgr.GetConnection(wb.ActiveSiteExplorer.ConnectionName);

            if (items.Length > 0)
            {
                foreach (var item in items)
                {
                    if (!item.IsFolder)
                    {
                        if (openMgr.IsOpen(item.ResourceId, _conn))
                        {
                            openMgr.GetOpenEditor(item.ResourceId, _conn).Activate();
                        }
                        else
                        {
                            openMgr.Open(item.ResourceId, _conn, false, exp);
                        }
                    }
                }
            }
        }
Exemplo n.º 7
0
        public bool HandleDrop(IServerConnection conn, string file, string folderId)
        {
            try
            {
                var wb = Workbench.Instance;
                var exp = wb.ActiveSiteExplorer;

                //The easiest way to tell if this XML file is legit
                var res = ResourceTypeRegistry.Deserialize(File.ReadAllText(file));

                int counter = 0;
                string name = Path.GetFileNameWithoutExtension(file);
                string resId = folderId + name + "." + res.ResourceType.ToString(); //NOXLATE

                while (conn.ResourceService.ResourceExists(resId))
                {
                    counter++;
                    resId = folderId + name + " (" + counter + ")." + res.ResourceType.ToString(); //NOXLATE
                }

                res.ResourceID = resId;
                conn.ResourceService.SaveResource(res);

                return true;
            }
            catch (Exception ex)
            {
                ErrorDialog.Show(ex);
                return false;
            }
        }
Exemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResourceEditorServiceBase"/> class.
 /// </summary>
 /// <param name="resourceID">The resource ID.</param>
 /// <param name="conn">The conn.</param>
 /// <remarks>
 /// The editor service does not do live edits of the resource you pass in to this constructor
 /// 
 /// When an editor is modifying a resource, it is not modifying the resource you specify here. It is instead modifying a
 /// session-based copy of the resource that is created internally by the editor service. On a save action (a call to 
 /// <see cref="M:Maestro.Editors.ResourceEditorServiceBase.Save"/>), the session-based copy is copied back into the resource 
 /// id you specified, overwriting its contents and data files.
 /// 
 /// This provides an extra level of safety against unintentional edits, as such edits will only apply to the session-copy, only
 /// being committed back to the resource id you specified on an explicit save action.
 /// </remarks>
 protected ResourceEditorServiceBase(string resourceID, IServerConnection conn)
 {
     this.IsNew = ResourceIdentifier.IsSessionBased(resourceID);
     this.ResourceID = resourceID;
     _conn = conn;
     this.PreviewLocale = "en"; //NOXLATE
 }
Exemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the ProfilingDialog class
 /// </summary>
 /// <param name="item"></param>
 /// <param name="resourceId"></param>
 /// <param name="connection"></param>
 public ProfilingDialog(IResource item, string resourceId, IServerConnection connection)
     : this()
 {
     m_connection = connection;
     m_item = item;
     m_resourceId = resourceId;
 }
 public void TestFixtureSetUp()
 {
     // initialize a server connection to a locally-running MongoDB server
     _serverConnection = new ServerConnection(LOCAL_MONGO_SERVER_CONNECTION_STRING);
     // connect to the existing db on the server (or create it if it does not already exist)
     _databaseConnection = new DatabaseConnection(_serverConnection, "MyFirstDatabase");
 }
Exemplo n.º 11
0
        /// <summary>
        /// Extracts the DWF symbol data store from the given symbol library to a new session-based drawing source
        /// </summary>
        /// <param name="conn"></param>
        /// <param name="symResId"></param>
        /// <returns></returns>
        public static IDrawingSource PrepareSymbolDrawingSource(IServerConnection conn, string symResId)
        {
            //Extract the symbols.dwf resource data and copy to a session based drawing source
            var dwf = conn.ResourceService.GetResourceData(symResId, "symbols.dwf"); //NOXLATE
            if (!dwf.CanSeek)
            {
                //House in MemoryStream
                var ms = new MemoryStream();
                Utility.CopyStream(dwf, ms);
                ms.Position = 0L;

                //Replace old stream with new
                dwf.Dispose();
                dwf = ms;
            }
            var ds = OSGeo.MapGuide.ObjectModels.ObjectFactory.CreateDrawingSource(conn);
            ds.SourceName = "symbols.dwf"; //NOXLATE
            ds.ResourceID = "Session:" + conn.SessionID + "//" + Guid.NewGuid() + ".DrawingSource"; //NOXLATE
            conn.ResourceService.SaveResource(ds);

            using (dwf)
            {
                conn.ResourceService.SetResourceData(ds.ResourceID, "symbols.dwf", OSGeo.MapGuide.ObjectModels.Common.ResourceDataType.File, dwf); //NOXLATE
            }
            return ds;
        }
Exemplo n.º 12
0
 internal ResourceEditorService(string resourceID, IServerConnection conn, IUrlLauncherService launcher, ISiteExplorer siteExp, OpenResourceManager orm)
     : base(resourceID, conn)
 {
     _siteExp = siteExp;
     _launcher = launcher;
     _orm = orm;
 }
Exemplo n.º 13
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SymbolPicker"/> class.
        /// </summary>
        /// <param name="symbolLibrary">The symbol library.</param>
        /// <param name="conn">The conn.</param>
        public SymbolPicker(string symbolLibrary, IServerConnection conn)
            : this(conn)
        {
            if (ResourceIdentifier.GetResourceType(symbolLibrary) != OSGeo.MapGuide.MaestroAPI.ResourceTypes.SymbolLibrary)
                throw new ArgumentException(string.Format(Strings.ErrorInvalidSymbolLibraryResourceId, symbolLibrary));

            txtSymbolLibrary.Text = symbolLibrary;
        }
Exemplo n.º 14
0
        public MapPreviewWindow(IServerConnection conn)
        {
            InitializeComponent();
            _conn = conn;

            new MapViewerController(viewer, legend, this, propertyPane, toolbar);
            this.Disposed += OnDisposed;
        }
Exemplo n.º 15
0
        public SessionTests()
        {
            var mock = new Mock<IAuthentication>();
            mock.Setup(a => a.Authenticate()).ReturnsAsync(UserInfoExample);
            BasicAuthenticationMock = mock.Object;

            BasicServerConnectionMock = new Mock<IServerConnection>().Object;
        }
Exemplo n.º 16
0
 public MainForm(IServerConnection conn)
 {
     InitializeComponent();
     _conn = conn;
     _origTitle = this.Text;
     #if DEBUG
     debugToolStripMenuItem.Visible = true;
     #endif
 }
Exemplo n.º 17
0
 /// <summary>
 /// Closes the editor instances for the given resource id
 /// </summary>
 /// <param name="conn"></param>
 /// <param name="resourceId"></param>
 /// <param name="discardChanges"></param>
 public void CloseEditors(IServerConnection conn, string resourceId, bool discardChanges)
 {
     string key = ComputeResourceKey(resourceId, conn);
     if (_openItems.ContainsKey(key))
     {
         var ed = _openItems[key];
         ed.Close(discardChanges);
     }
 }
Exemplo n.º 18
0
 public DownloadFile(
     FileHeader fileHeader, 
     IServerConnection serverConnection, 
     IEventAggregator eventAggregator)
 {
     _fileHeader = fileHeader;
     _serverConnection = serverConnection;
     _eventAggregator = eventAggregator;
 }
 public StartRequestingForConferencialMessages(
     ICurrentContext currentContext, 
     IServerConnection serverConnection, 
     IEventAggregator eventAggregator)
 {
     _currentContext = currentContext;
     _serverConnection = serverConnection;
     _eventAggregator = eventAggregator;
 }
Exemplo n.º 20
0
 /// <summary>
 /// Initializes a new instance of the ImageSymbolConverter class
 /// </summary>
 /// <param name="conn"></param>
 /// <param name="symbolLibId"></param>
 public ImageSymbolConverter(IServerConnection conn, string symbolLibId)
 {
     Check.NotNull(conn, "conn"); //NOXLATE
     Check.NotEmpty(symbolLibId, "symbolLibId"); //NOXLATE
     Check.Precondition(ResourceIdentifier.GetResourceType(symbolLibId) == ResourceTypes.SymbolLibrary, "ResourceIdentifier.GetResourceType(symbolLibId) == ResourceTypes.SymbolLibrary"); //NOXLATE
     Check.Precondition(Array.IndexOf(conn.Capabilities.SupportedServices, (int)ServiceType.Drawing) >= 0, "Array.IndexOf(conn.Capabilities.SupportedServices, (int)ServiceType.Drawing) >= 0"); //NOXLATE
     _symbolLibId = symbolLibId;
     _conn = conn;
 }
Exemplo n.º 21
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CopyMoveToServerDialog"/> class.
        /// </summary>
        /// <param name="source">The source.</param>
        /// <param name="target">The target.</param>
        public CopyMoveToServerDialog(IServerConnection source, IServerConnection target)
            : this()
        {
            _source = source;
            _target = target;

            cmbAction.SelectedItem = _lastAction;
            chkOverwrite.Checked = _overwrite;
        }
Exemplo n.º 22
0
 public UploadFile(
     IServerConnection serverConnection,
     int receiverNumber,
     FileBasicInfo fileBasicInfo)
 {
     _serverConnection = serverConnection;
     _receiverNumber = receiverNumber;
     _fileBasicInfo = fileBasicInfo;
 }
Exemplo n.º 23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PackageEditorDialog"/> class.
 /// </summary>
 /// <param name="filename">The filename.</param>
 /// <param name="conn">The conn.</param>
 public PackageEditorDialog(string filename, IServerConnection conn)
     : this()
 {
     _conn = conn;
     m_filename = filename;
     m_resources = new Dictionary<string, ResourceItem>();
     ResourceTree.ImageList = RepositoryIcons.CreateImageList(); //owner.ResourceEditorMap.SmallImageList;
     ResourceDataFileList.SmallImageList = RepositoryIcons.CreateImageList(); //ResourceEditors.ShellIcons.ImageList;
 }
 public StartRequestingForFiles(
     IServerConnection serverConnection,
     ICurrentContext currentContext,
     IEventAggregator eventAggregator)
 {
     _serverConnection = serverConnection;
     _currentContext = currentContext;
     _eventAggregator = eventAggregator;
 }
Exemplo n.º 25
0
 public Connect(
     IServerConnection serverConnection, 
     string serverAddress, 
     IEventAggregator eventAggregator)
 {
     _serverConnection = serverConnection;
     _serverAddress = serverAddress;
     _eventAggregator = eventAggregator;
 }
 public StartRequestingForMessages(
     IServerConnection serverConnection,
     IEventAggregator eventAggregator,
     ICurrentContext currentContext)
 {
     _serverConnection = serverConnection;
     _eventAggregator = eventAggregator;
     _currentContext = currentContext;
 }
Exemplo n.º 27
0
 public LogoDialog(IServerConnection conn)
     : this()
 {
     //TOOD: Maybe be more graceful? Like allow text entry, but disable browsing buttons?
     if (Array.IndexOf(conn.Capabilities.SupportedServices, (int)ServiceType.Drawing) < 0)
     {
         throw new InvalidOperationException(Strings.RequiredServiceNotSupported + ServiceType.Drawing.ToString());
     }
     _conn = conn;
 }
Exemplo n.º 28
0
 public LegendControlPresenter(Legend legend, RuntimeMap map)
 {
     _legend = legend;
     _map = map;
     _provider = _map.CurrentConnection;
     _resSvc = _provider.ResourceService;
     InitInitialSelectabilityStates();
     _selectableIcon = Properties.Resources.lc_select;
     _unselectableIcon = Properties.Resources.lc_unselect;
 }
Exemplo n.º 29
0
 protected static void ResetItem(OpenResourceManager omgr, RepositoryItem ri, IServerConnection conn)
 {
     ri.Reset();
     if (omgr.IsOpen(ri.ResourceId, conn))
     {
         ri.IsOpen = true;
         var ed = omgr.GetOpenEditor(ri.ResourceId, conn);
         if (ed.IsDirty)
             ri.IsDirty = true;
     }
 }
Exemplo n.º 30
0
        public bool HandleDrop(IServerConnection conn, string file, string folderId)
        {
            try
            {
                var wb = Workbench.Instance;
                var exp = wb.ActiveSiteExplorer;
                var fs = ObjectFactory.CreateFeatureSource(conn, "OSGeo.SHP"); //NOXLATE

                string fileName = Path.GetFileName(file);
                string resName = Path.GetFileNameWithoutExtension(file);
                int counter = 0;
                string resId = folderId + resName + ".FeatureSource"; //NOXLATE
                while (conn.ResourceService.ResourceExists(resId))
                {
                    counter++;
                    resId = folderId + resName + " (" + counter + ").FeatureSource"; //NOXLATE
                }
                fs.ResourceID = resId;
                fs.SetConnectionProperty("DefaultFileLocation", StringConstants.MgDataFilePath + fileName); //NOXLATE
                conn.ResourceService.SaveResource(fs);

                //As we all know, the term shape file is deceptive...
                string[] files = new string[]
                {
                    file,
                    file.Substring(0, file.LastIndexOf(".")) + ".shx", //NOXLATE
                    file.Substring(0, file.LastIndexOf(".")) + ".dbf", //NOXLATE
                    file.Substring(0, file.LastIndexOf(".")) + ".idx", //NOXLATE
                    file.Substring(0, file.LastIndexOf(".")) + ".prj", //NOXLATE
                    file.Substring(0, file.LastIndexOf(".")) + ".cpg" //NOXLATE
                };

                foreach (string fn in files)
                {
                    if (File.Exists(fn))
                    {
                        using (var stream = File.Open(fn, FileMode.Open))
                        {
                            string dataName = Path.GetFileName(fn);
                            fs.SetResourceData(dataName, OSGeo.MapGuide.ObjectModels.Common.ResourceDataType.File, stream);
                        }
                    }
                }

                return true;
            }
            catch (Exception ex)
            {
                ErrorDialog.Show(ex);
                return false;
            }
        }
Exemplo n.º 31
0
 public WsServerNodeMqSender(IServerConnection serverConnection)
 {
     _serverConnection = serverConnection;
 }
 public RemoteTargetTemperature(IServerConnection remoteConnection, string deviceName)
     : this(remoteConnection, getDeviceName : deviceName, setDeviceName : deviceName)
 {
 }
 public RemoteTargetTemperature(IServerConnection remoteConnection, string getDeviceName, string setDeviceName)
     : base(remoteConnection, getDeviceName, setDeviceName)
 {
 }
Exemplo n.º 34
0
 public FederationConnector(IServerConnection connection)
 {
     _serverConnection = connection;
 }
Exemplo n.º 35
0
 public HTTPClientService(IServerConnection pingConnection)
 {
     _platformPingConnection = pingConnection;
 }
Exemplo n.º 36
0
 public AuditConnector(IServerConnection connection)
 {
     _serverConnection = connection;
 }
Exemplo n.º 37
0
 public override bool Execute(IServerConnection server, IPlayer p, params string[] args)
 {
     return(false);
 }
Exemplo n.º 38
0
 public Game(IChessBoardUIControl chessBoardUI, string id, IPlayer GameCreator, string token, IServerConnection service)
 {
     this.service    = service;
     GameId          = id;
     this.ChessBoard = new ChessBoard(chessBoardUI, this);
     AddPlayer(GameCreator);
     JoinToken          = token;
     GameInstancePlayer = GameCreator;
     eventAggregator.Subscribe(this);
 }
Exemplo n.º 39
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="serverConnection">Caspar CG Tcp Server connection to listen</param>
 public AmcpTCPParser(IServerConnection serverConnection)
 {
     ServerConnection = serverConnection;
     ServerConnection.DataReceived += ServerConnection_DataReceived;
 }
Exemplo n.º 40
0
        static RuntimeMap CreateMap(IServerConnection conn, IMapDefinition mdf, double val, bool b)
        {
            var ctor = typeof(RuntimeMap).GetInternalConstructor(new[] { typeof(IServerConnection), typeof(IMapDefinition), typeof(double), typeof(bool) });

            return(ctor.Invoke(new object[] { conn, mdf, val, b }) as RuntimeMap);
        }
Exemplo n.º 41
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PromotionContext"/> class.
 /// </summary>
 /// <param name="conn">The connection.</param>
 /// <param name="item">The item.</param>
 public PromotionContext(IServerConnection conn, IReadOnlyItem item)
 {
     Conn = conn;
     Item = item;
 }
Exemplo n.º 42
0
 public ReadOnlyWsServerNodeRedis(IServerConnection serverConnection)
 {
     _serverConnection = serverConnection;
 }
Exemplo n.º 43
0
 /// <summary>
 /// Adds "Administrators" to the identity list of the current connection
 /// </summary>
 /// <param name="conn">The connection to escalate.</param>
 /// <returns>A <see cref="IDisposable"/> object.  Calling <see cref="IDisposable.Dispose"/> will
 /// return the identity list to its original state</returns>
 public static IDisposable AsAdmin(this IServerConnection conn)
 {
     return(conn.Permissions.Escalate("Administrators"));
 }
Exemplo n.º 44
0
        /// <summary>
        /// 内部完成redis连接的创建和mq交换器、队列的声明以及mq消费者的启动,队列和交换器的绑定由启动的消费者负责。
        /// (mq消费者的启动是异步的,不会立即启动,而是在满足了后续的条件后才会启动)。
        /// </summary>
        /// <param name="serverAppType"></param>
        /// <param name="mqMessagePaths"></param>
        /// <returns></returns>
        public static bool Create(ServerAppType serverAppType, AbstractMqMessagePath[] mqMessagePaths, out IServerConnection serverConfig)
        {
            string mqClientTypeName = serverAppType.GetName();

            serverConfig = null;
            ConnectionMultiplexer redisConn;

            try {
                redisConn = ConnectionMultiplexer.Connect(ServerRoot.HostConfig.RedisConfig);
            }
            catch (Exception e) {
                NTMinerConsole.UserError("连接redis失败");
                Logger.ErrorDebugLine(e);
                return(false);
            }
            IConnection connection;// TODO:需要一个机制在连接关闭时重新连接,因为AutomaticRecovery也会失败

            try {
                var factory = new ConnectionFactory {
                    HostName = ServerRoot.HostConfig.MqHostName,
                    UserName = ServerRoot.HostConfig.MqUserName,
                    Password = ServerRoot.HostConfig.MqPassword,
                    AutomaticRecoveryEnabled = true, // 默认值也是true,复述一遍起文档作用
                    TopologyRecoveryEnabled  = true  // 默认值也是true,复述一遍起文档作用
                };
                connection = factory.CreateConnection(mqClientTypeName);
            }
            catch (Exception e) {
                NTMinerConsole.UserError("连接Mq失败");
                Logger.ErrorDebugLine(e);
                return(false);
            }
            IModel channel = connection.CreateModel();

            channel.ExchangeDeclare(MqKeyword.NTMinerExchange, ExchangeType.Direct, durable: true, autoDelete: false, arguments: null);

            StartConsumer(channel, mqMessagePaths);

            serverConfig = new ServerConnection(redisConn, channel);
            return(true);
        }
Exemplo n.º 45
0
 /// <summary>
 /// Adds "ArasPlm" to the identity list of the current connection
 /// </summary>
 /// <param name="conn">The connection to escalate.</param>
 /// <returns>A <see cref="IDisposable"/> object.  Calling <see cref="IDisposable.Dispose"/> will
 /// return the identity list to its original state</returns>
 public static IDisposable AsArasPlm(this IServerConnection conn)
 {
     return(conn.Permissions.Escalate("ArasPlm"));
 }
Exemplo n.º 46
0
 public ServerSerializer(IServerConnection connection)
 {
     _connection = connection;
     _writer     = new BinaryDataWriter();
 }
Exemplo n.º 47
0
 public InvestigationsConnector(IServerConnection connection)
 {
     _serverConnection = connection;
 }
Exemplo n.º 48
0
 public BuildqueueConnector(IServerConnection connection)
 {
     _serverConnection = connection;
 }
Exemplo n.º 49
0
 public UsergroupsConnector(IServerConnection connection)
 {
     _serverConnection = connection;
 }
Exemplo n.º 50
0
 public UserMqSender(IServerConnection serverConnection)
 {
     _serverConnection = serverConnection;
 }
Exemplo n.º 51
0
 public OperationMqSender(IServerConnection serverConnection)
 {
     _serverConnection = serverConnection;
 }
Exemplo n.º 52
0
 protected RemoteObject(IServerConnection remoteConnection, string deviceName)
     : this(remoteConnection, deviceName, deviceName)
 {
 }
Exemplo n.º 53
0
 public ResourceEditorService(string resourceID, IServerConnection conn)
     : base(resourceID, conn)
 {
 }
Exemplo n.º 54
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VersionContext"/> class.
 /// </summary>
 /// <param name="conn">The connection.</param>
 /// <param name="item">The item.</param>
 public VersionContext(IServerConnection conn, IReadOnlyItem item)
 {
     Conn       = conn;
     OldVersion = item;
 }
Exemplo n.º 55
0
 public MinerClientMqSender(IServerConnection serverConnection)
 {
     _serverConnection = serverConnection;
 }
Exemplo n.º 56
0
 protected RemoteObject(IServerConnection remoteConnection, string getDeviceName, string setDeviceName)
 {
     GetDeviceName    = getDeviceName;
     SetDeviceName    = setDeviceName;
     RemoteConnection = remoteConnection;
 }
Exemplo n.º 57
0
 public DebugConnector(IServerConnection connection)
 {
     _serverConnection = connection;
 }
Exemplo n.º 58
0
 public override IResource CreateItem(string startPoint, IServerConnection conn)
 {
     return(ObjectFactory.CreateCompoundSymbol(new Version(1, 1, 0), Strings.DefaultSymbolName, Strings.DefaultSymbolDescription));
 }
        private IMapDefinition CreateLayerPreviewMapDefinition(ILayerDefinition ldf, string sessionId, string layerName, IServerConnection conn)
        {
            //Create temp map definition to house our current layer
            var    mdfId = $"Session:{sessionId}//Preview{counter++}.MapDefinition"; //NOXLATE
            string csWkt;
            var    extent = ldf.GetSpatialExtent(_conn, true, out csWkt);

            if (extent == null)
            {
                throw new ApplicationException(Strings.FailedToCalculateFeatureSourceExtents);
            }

            string layerSc = ldf.GetLayerSpatialContextName(_conn);

            //TODO: Based on the visible scales in this layer, size this extents accordingly
            var             mdf  = Utility.CreateMapDefinition(conn, Strings.PreviewMap, csWkt, extent);
            IMapDefinition2 mdf2 = mdf as IMapDefinition2;

            if (mdf2 != null && this.AddDebugWatermark)
            {
                CreateDebugWatermark(mdf2, conn, layerSc);
            }

            var layer = mdf.AddLayer(null, layerName, ldf.ResourceID);

            conn.ResourceService.SaveResourceAs(mdf, mdfId);
            mdf.ResourceID = mdfId;
            return(mdf);
        }
Exemplo n.º 60
0
 public TestsConnector(IServerConnection connection)
 {
     _serverConnection = connection;
 }