src/Orleans.Core/Manifest/GrainVersionManifest.cs
/// <summary>
/// Gets the set of supported silos for the specified grain type.
/// </summary>
/// <param name="grainType">The grain type.</param>
/// <returns>The silos which support the specified grain type.</returns>
Gets the set of supported silos for the specified grain type.
Gets the set of supported silos for the specified grain type .
public (MajorMinorVersion Version, SiloAddress[] Result) GetSupportedSilos(GrainType grainType)
        {
            var cache = GetCache();
            if (cache.SupportedSilosByGrainType.TryGetValue(grainType, out var result))
            {
                return (cache.Version, result);
            }
            if (_genericGrainTypeMapping.TryGetValue(grainType, out var genericGrainType))
            {
                return GetSupportedSilos(genericGrainType);
            }
            if (GenericGrainType.TryParse(grainType, out var generic) && generic.IsConstructed)
            {
                var genericId = _genericGrainTypeMapping[grainType] = generic.GetUnconstructedGrainType().GrainType;
                return GetSupportedSilos(genericId);
            }
            return (cache.Version, Array.Empty<SiloAddress>());
        }
public ( MajorMinorVersion Version , SiloAddress [ ] Result ) GetSupportedSilos ( GrainType grainType ) { var cache = GetCache ( ) ; if ( cache . SupportedSilosByGrainType . TryGetValue ( grainType , out var result ) ) { return ( cache . Version , result ) ; } if ( _genericGrainTypeMapping . TryGetValue ( grainType , out var genericGrainType ) ) { return GetSupportedSilos ( genericGrainType ) ; } if ( GenericGrainType . TryParse ( grainType , out var generic ) && generic . IsConstructed ) { var genericId = _genericGrainTypeMapping [ grainType ] = generic . GetUnconstructedGrainType ( ) . GrainType ; return GetSupportedSilos ( genericId ) ; } return ( cache . Version , Array . Empty < SiloAddress > ( ) ) ; }
Gets the set of supported silos for the specified grain type.
Gets the set of supported silos for the specified grain type .
// No supported silos for this type.
The silos which support the specified grain type.
The silos which support the specified grain type .
grainType
GrainType
The grain type.
The grain type .