Stores configuration entries for SharedDirectoryMapper extension.
コード例 #1
0
        private void HandleMappingError(SharedDirectoryMapperConfig config, IEventWriter eventWriter, MapperException ex)
        {
            String prefix = "Mapping of " + config.Label + " ";

            eventWriter.LogEvent(prefix + "STDOUT: " + ex.Process.StandardOutput.ReadToEnd(), EventLogEntryType.Information);
            eventWriter.LogEvent(prefix + "STDERR: " + ex.Process.StandardError.ReadToEnd(), EventLogEntryType.Information);

            throw new ExtensionException(Descriptor.Id, DisplayName + ": " + prefix + "failed", ex);
        }
コード例 #2
0
        public override void Configure(ServiceDescriptor descriptor, XmlNode node)
        {
            XmlNodeList?mapNodes = XmlHelper.SingleNode(node, "mapping", false) !.SelectNodes("map");

            if (mapNodes != null)
            {
                for (int i = 0; i < mapNodes.Count; i++)
                {
                    if (mapNodes[i] is XmlElement mapElement)
                    {
                        var config = SharedDirectoryMapperConfig.FromXml(mapElement);
                        _entries.Add(config);
                    }
                }
            }
        }
コード例 #3
0
        public override void Configure(ServiceDescriptor descriptor, XmlNode node)
        {
            var nodes = XmlHelper.SingleNode(node, "mapping", false).SelectNodes("map");

            if (nodes != null)
            {
                foreach (XmlNode mapNode in nodes)
                {
                    var mapElement = mapNode as XmlElement;
                    if (mapElement != null)
                    {
                        var config = SharedDirectoryMapperConfig.FromXml(mapElement);
                        _entries.Add(config);
                    }
                }
            }
        }
コード例 #4
0
 private void HandleMappingError(SharedDirectoryMapperConfig config, MapperException ex)
 {
     Logger.Error("Mapping of " + config.Label + " failed. STDOUT: " + ex.Process.StandardOutput.ReadToEnd()
                  + " \r\nSTDERR: " + ex.Process.StandardError.ReadToEnd(), ex);
     throw new ExtensionException(Descriptor.Id, DisplayName + ": Mapping of " + config.Label + "failed", ex);
 }
コード例 #5
0
        public SharedDirectoryMapper(bool enableMapping, string directoryUNC, string driveLabel)
        {
            SharedDirectoryMapperConfig config = new SharedDirectoryMapperConfig(enableMapping, driveLabel, directoryUNC);

            _entries.Add(config);
        }
コード例 #6
0
 public SharedDirectoryMapper(bool enableMapping, string directoryUNC, string driveLabel)
 {
     SharedDirectoryMapperConfig config = new SharedDirectoryMapperConfig(enableMapping, driveLabel, directoryUNC);
     _entries.Add(config);
 }
コード例 #7
0
 private void HandleMappingError(SharedDirectoryMapperConfig config, MapperException ex)
 {
     Logger.Error("Mapping of " + config.Label + " failed. STDOUT: " + ex.Process.StandardOutput.ReadToEnd()
         + " \r\nSTDERR: " + ex.Process.StandardError.ReadToEnd(), ex);
     throw new ExtensionException(Descriptor.Id, DisplayName + ": Mapping of " + config.Label + "failed", ex);
 }