示例#1
0
 /// <summary>
 /// Register a versioner to add a versioning system to the VersionManager
 /// </summary>
 /// <param name="name">The version key</param>
 /// <param name="isAddressable">Whether the versioning system is addressable (different version values can be accessed by changing url)</param>
 /// <param name="versioner">The Versioner for the versioning system</param>
 /// <param name="versions">All the valid version values for the versioning system (null if these are not limited)</param>
 public void RegisterVersion(
     Versioner versioner)
 {
     Versioners.Add(versioner);
     if (versioner.IsAddressable)
     {
         AddressableVersionKeys.Add(versioner.VersionKey);
     }
     else
     {
         UnaddressableVersionKeys.Add(versioner.VersionKey);
     }
     VersionLists.Add(versioner.VersionKey, versioner.AllVersionValues);
 }
示例#2
0
 /// <summary>
 /// Register a versioner to add a versioning system to the VersionManager
 /// </summary>
 /// <param name="name">The version key</param>
 /// <param name="versioner">The Versioner for the versioning system</param>
 public void RegisterVersion(Versioner versioner)
 {
     Versioners.Add(versioner);
     if (versioner.IsAddressable)
     {
         AddressableVersionKeys.Add(versioner.VersionKey);
     }
     else
     {
         UnaddressableVersionKeys.Add(versioner.VersionKey);
     }
     if (!VersionLists.ContainsKey(versioner.VersionKey))
     {
         VersionLists.TryAdd(versioner.VersionKey, versioner.AllVersionValues);
     }
 }