public TelemetryCommonProperties( Func <string, string> hasher = null, Func <string> getMACAddress = null, IDockerContainerDetector dockerContainerDetector = null, IUserLevelCacheWriter userLevelCacheWriter = null) { _hasher = hasher ?? Sha256Hasher.Hash; _getMACAddress = getMACAddress ?? MacAddressGetter.GetMacAddress; _dockerContainerDetector = dockerContainerDetector ?? new DockerContainerDetectorForTelemetry(); _userLevelCacheWriter = userLevelCacheWriter ?? new UserLevelCacheWriter(); }
public TelemetryCommonProperties( Func <string> getCurrentDirectory = null, Func <string, string> hasher = null, Func <string> getMACAddress = null, IDockerContainerDetector dockerContainerDetector = null, IUserLevelCacheWriter userLevelCacheWriter = null) { _getCurrentDirectory = getCurrentDirectory ?? Directory.GetCurrentDirectory; _hasher = hasher ?? Sha256Hasher.Hash; _getMACAddress = getMACAddress ?? MacAddressGetter.GetMacAddress; _dockerContainerDetector = dockerContainerDetector ?? new DockerContainerDetectorForTelemetry(); _userLevelCacheWriter = userLevelCacheWriter ?? new UserLevelCacheWriter(new CliFolderPathCalculator()); }
public TelemetryCommonProperties( IOptions <TelemetryOptions> options, IDockerContainerDetector dockerContainerDetector, IStringHasher hasher, IMacAddressProvider macAddressProvider, IUserLevelCacheWriter userLevelCacheWriter) { _options = options; _hasher = hasher; _macAddressProvider = macAddressProvider; _dockerContainerDetector = dockerContainerDetector; _userLevelCacheWriter = userLevelCacheWriter; }