Example #1
0
        public static PartitionConfig ReadPartitionConfig(string fullPath)
        {
            PartitionConfig config     = null;
            var             configPath = Path.Combine(fullPath, MetadataConstants.PartitionSettingsFileName);

            if (File.Exists(configPath))
            {
                try
                {
                    using (var fs = File.OpenRead(configPath))
                    {
                        config = ConfigurationSerializer.ReadPartitionConfiguration(fs);
                    }
                }
                catch (Exception ex)
                {
                    Trace.TraceWarning("Failed to read partiton config from {0}. Error {1}", fullPath, ex);
                }
            }
            return(config);
        }