/// <summary> /// /// </summary> /// <param name="loggerRef"></param> /// <param name="indent"></param> public FilterLogger(Reference <ILogger> loggerRef, string indent) { MinLogSeverity = LogSeverity.DebugL3; _loggerRef = loggerRef.Clone(); _logger = _loggerRef.Target; _indent = indent; }
/// <summary> /// Creates a copy of a project item to another folder /// </summary> /// <param name="ref">Project item to copy</param> /// <param name="dest">Destination folder</param> /// <returns>Reference to the copy</returns> public Reference ProjectItemCopy(Reference @ref, Reference dest) { // Create a clone reference var copyRef = (Reference)@ref.Clone(); // Copy storage file string refPath = Path.GetFileName(@ref.StoragePath.TrimEnd('\\')); string destinationPath = (dest.TargetKind == ReferenceTargetKind.Directory) ? dest.StoragePath : Path.GetDirectoryName(dest.StoragePath); string newPath = Path.Combine(destinationPath, refPath); if (@ref.TargetKind == ReferenceTargetKind.Directory) { DirectoryHelper.CopyDirectory(@ref.StoragePath, newPath); // Update children UpdateRenameChildren(copyRef, copyRef.StoragePath, newPath); } else { // Find a nonconflicting file name newPath = GetNonConflictingPath(refPath, destinationPath); // Copy File.Copy(@ref.StoragePath, newPath); } // Parent reference copyRef.Name = Path.GetFileName(newPath); copyRef.StoragePath = newPath; dest.Add(copyRef); return(copyRef); }
public Reference copy(Reference r) { Ice.Identity ident = r.getIdentity(); if (ident.name.Length == 0 && ident.category.Length == 0) { return(null); } return((Reference)r.Clone()); }
public MarketDataRealtimeServer( Reference <ILogger> loggerRef, AsyncThreadQueue threadQueue, ICoreClient client) { _loggerRef = loggerRef?.Clone() ?? throw new ArgumentNullException(nameof(loggerRef)); _threadQueue = threadQueue; _client = client; _subsDetailIndex = new Dictionary <Guid, SubscriptionDetail>(); }
public ISimpleStep Clone() { return(new TaskStep() { Name = Name, Condition = Condition, ContinueOnError = ContinueOnError, Enabled = Enabled, Environment = new Dictionary <String, String>(Environment ?? new Dictionary <String, String>(0, StringComparer.Ordinal)), Inputs = new Dictionary <String, String>(Inputs ?? new Dictionary <String, String>(0, StringComparer.OrdinalIgnoreCase)), Reference = Reference?.Clone(), TimeoutInMinutes = TimeoutInMinutes, }); }
public object Clone() { try { Binding clone = (Binding)MemberwiseClone(); clone.target = (Reference)target.Clone(); clone.expression = expression != null ? (Expression)expression.Clone() : null; clone.id = id == null ? null : ExpressionUtils.generateBindingId(); return(clone); } catch (CloneNotSupportedException ex) { throw new InvalidOperationException(ex.ToString(), ex); } }
public MarketDataRealtimeClient( Reference <ILogger> loggerRef, AsyncThreadQueue clientThreadQueue, ICoreClient client, MDSProviderId dataProvider) { if (dataProvider == MDSProviderId.Undefined) { throw new ArgumentNullException(nameof(dataProvider)); } ProviderId = dataProvider; _loggerRef = loggerRef?.Clone() ?? throw new ArgumentNullException(nameof(loggerRef)); ClientThreadQueue = clientThreadQueue ?? new AsyncThreadQueue(_loggerRef.Target); _mds = new MarketDataRealtimeServer(_loggerRef, clientThreadQueue, client); var serverSettings = new NamedValueSet(); serverSettings.Set(MdpConfigName.ProviderId, (int)dataProvider); _mds.ApplySettings(serverSettings); _mds.Start(); }
protected override Image Load() { return((Image)Reference.Clone()); }
public LaunchPackage(Reference <ICoreClient> clientRef, InternalRequest request) { _ClientRef = clientRef.Clone(); _Request = request; }
/// <summary> /// Initializes a new instance of the <see cref="CoreClientFactory"/> class. /// </summary> public CoreClientFactory(Reference <ILogger> loggerRef) { _loggerRef = loggerRef.Clone(); }