Exemple #1
0
            public IDictionary <string, object> GetHeaders()
            {
                var result = new Dictionary <string, object>();
                var commit = Commits.LastOrDefault();
                var source = default(IReadOnlyDictionary <string, object>);

                if (commit != null)
                {
                    source = commit.Headers;
                }
                else if (Snapshot != null)
                {
                    source = Snapshot.Headers;
                }

                if (source != null)
                {
                    foreach (var entry in source)
                    {
                        result.Add(entry.Key, entry.Value);
                    }
                }

                return(result);
            }