예제 #1
0
        private string CreateEtwLogDirectory()
        {
            string etwParentFolder = Path.Combine(
                this.initParam.WorkDirectory,
                Utility.ShortWindowsFabricIdForPaths);

            string destinationKey = Path.Combine(
                this.mdsFileProducerSettings.DirectoryName,
                this.mdsFileProducerSettings.TableName);

            string etwFolder;
            bool   success = Utility.CreateWorkSubDirectory(
                this.traceSource,
                this.logSourceId,
                destinationKey,
                string.Concat(Utility.EtwConsumerWorkSubFolderIdPrefix, this.logSourceId),
                etwParentFolder,
                out etwFolder);

            if (success)
            {
                return(Path.Combine(etwFolder, LogDirName));
            }

            return(null);
        }
예제 #2
0
        /// <summary>
        /// Creates bookmark directory.
        /// </summary>
        /// <param name="sourceFolder"></param>
        /// <param name="workDirectory"></param>
        /// <param name="destinationKey"></param>
        /// <param name="bookmarkFolder"></param>
        /// <returns></returns>
        private bool CreateBookmarkSubDirectory(
            string sourceFolder,
            string workDirectory,
            string destinationKey,
            out string bookmarkFolder)
        {
            string bookmarkParentFolder = Path.Combine(
                workDirectory,
                Utility.ShortWindowsFabricIdForPaths);

            bool success = Utility.CreateWorkSubDirectory(
                this.traceSource,
                this.logSourceId,
                destinationKey,
                sourceFolder,
                bookmarkParentFolder,
                out bookmarkFolder);

            if (success)
            {
                bookmarkFolder = Path.Combine(bookmarkFolder, BookmarkDirName);
            }

            FabricDirectory.CreateDirectory(bookmarkFolder);
            return(success);
        }
예제 #3
0
        private string CreateBlobUploaderWorkSubDirectory()
        {
            string workParentFolder = Path.Combine(
                this.initParam.WorkDirectory,
                Utility.ShortWindowsFabricIdForPaths);

            string workFolder;
            bool   success = Utility.CreateWorkSubDirectory(
                this.traceSource,
                this.logSourceId,
                this.destinationKey,
                this.etwLogDirName,
                workParentFolder,
                out workFolder);

            if (success)
            {
                return(Path.Combine(workFolder, AzureConstants.AzureFileUploaderFolder));
            }

            return(null);
        }