src/Orleans.Core/Manifest/GrainVersionManifest.cs
/// <summary>
/// Gets the set of supported silos for a specified grain interface and version.
/// </summary>
/// <param name="interfaceType">The grain interface type name.</param>
/// <param name="version">The grain interface version.</param>
/// <returns>The set of silos which support the specified grain interface type and version.</returns>
Gets the set of supported silos for a specified grain interface and version.
Gets the set of supported silos for a specified grain interface and version .
public (MajorMinorVersion Version, SiloAddress[] Result) GetSupportedSilos(GrainInterfaceType interfaceType, ushort version)
        {
            var cache = GetCache();
            if (cache.SupportedSilosByInterface.TryGetValue((interfaceType, version), out var result))
            {
                return (cache.Version, result);
            }
            if (_genericInterfaceMapping.TryGetValue(interfaceType, out var genericInterfaceId))
            {
                return GetSupportedSilos(genericInterfaceId, version);
            }
            if (GenericGrainInterfaceType.TryParse(interfaceType, out var generic) && generic.IsConstructed)
            {
                var genericId = _genericInterfaceMapping[interfaceType] = generic.GetGenericGrainType().Value;
                return GetSupportedSilos(genericId, version);
            }
            return (cache.Version, Array.Empty<SiloAddress>());
        }
public ( MajorMinorVersion Version , SiloAddress [ ] Result ) GetSupportedSilos ( GrainInterfaceType interfaceType , ushort version ) { var cache = GetCache ( ) ; if ( cache . SupportedSilosByInterface . TryGetValue ( ( interfaceType , version ) , out var result ) ) { return ( cache . Version , result ) ; } if ( _genericInterfaceMapping . TryGetValue ( interfaceType , out var genericInterfaceId ) ) { return GetSupportedSilos ( genericInterfaceId , version ) ; } if ( GenericGrainInterfaceType . TryParse ( interfaceType , out var generic ) && generic . IsConstructed ) { var genericId = _genericInterfaceMapping [ interfaceType ] = generic . GetGenericGrainType ( ) . Value ; return GetSupportedSilos ( genericId , version ) ; } return ( cache . Version , Array . Empty < SiloAddress > ( ) ) ; }
Gets the set of supported silos for a specified grain interface and version.
Gets the set of supported silos for a specified grain interface and version .
// No supported silos for this version.
The set of silos which support the specified grain interface type and version.
The set of silos which support the specified grain interface type and version .
interfaceType
GrainInterfaceType
The grain interface type name.
The grain interface type name .
version
ushort
The grain interface version.
The grain interface version .