Exemple #1
0
        internal Protocol_ApplicationProtocols(string name, InnerEnum innerEnum, Protocol_ApplicationProtocolCategory identifier, int version)
        {
            this.Identifier = identifier;
            this.Version    = version;

            nameValue      = name;
            ordinalValue   = nextOrdinal++;
            innerEnumValue = innerEnum;
        }
Exemple #2
0
 private ApplicationSupportedProtocols GetApplicationSupportedProtocols(IList <int> configVersions, Org.Neo4j.causalclustering.protocol.Protocol_ApplicationProtocolCategory category)
 {
     if (configVersions.Count == 0)
     {
         return(new ApplicationSupportedProtocols(category, Collections.emptyList()));
     }
     else
     {
         IList <int> knownVersions = ProtocolsForConfig(category, configVersions, version => Org.Neo4j.causalclustering.protocol.Protocol_ApplicationProtocols.find(category, version));
         if (knownVersions.Count == 0)
         {
             throw new System.ArgumentException(format("None of configured %s implementations %s are known", category.canonicalName(), configVersions));
         }
         else
         {
             return(new ApplicationSupportedProtocols(category, knownVersions));
         }
     }
 }
Exemple #3
0
 public static Optional <Protocol_ApplicationProtocol> Find(Protocol_ApplicationProtocolCategory category, int?version)
 {
     return(Protocol.find(Protocol_ApplicationProtocols.values(), category, version, System.Func.identity()));
 }