src/Orleans.Runtime/Manifest/GrainClassMap.cs
/// <summary>
/// Returns the grain class type corresponding to the provided grain type.
/// </summary>
/// <param name="grainType">Type of the grain.</param>
/// <param name="grainClass">The grain class.</param>
/// <returns><see langword="true"/> if a corresponding grain class was found, <see langword="false"/> otherwise.</returns>
Returns the grain class type corresponding to the provided grain type.
Returns the grain class type corresponding to the provided grain type .
public bool TryGetGrainClass(GrainType grainType, [NotNullWhen(true)] out Type grainClass)
        {
            GrainType lookupType;
            Type[] args;
            if (GenericGrainType.TryParse(grainType, out var genericId))
            {
                lookupType = genericId.GetUnconstructedGrainType().GrainType;
                args = genericId.GetArguments(_typeConverter);
            }
            else
            {
                lookupType = grainType;
                args = default;
            }
            if (!_types.TryGetValue(lookupType, out grainClass))
            {
                return false;
            }
            if (args is object)
            {
                grainClass = grainClass.MakeGenericType(args);
            }
            return true;
        }
public bool TryGetGrainClass ( GrainType grainType , [ NotNullWhen ( true ) ] out Type grainClass ) { GrainType lookupType ; Type [ ] args ; if ( GenericGrainType . TryParse ( grainType , out var genericId ) ) { lookupType = genericId . GetUnconstructedGrainType ( ) . GrainType ; args = genericId . GetArguments ( _typeConverter ) ; } else { lookupType = grainType ; args = default ; } if ( ! _types . TryGetValue ( lookupType , out grainClass ) ) { return false ; } if ( args is object ) { grainClass = grainClass . MakeGenericType ( args ) ; } return true ; }
Returns the grain class type corresponding to the provided grain type.
Returns the grain class type corresponding to the provided grain type .
if a corresponding grain class was found,  otherwise.
if a corresponding grain class was found otherwise .
grainType
GrainType
Type of the grain.
Type of the grain .
out
[NotNullWhen(true)]
grainClass
The grain class.
The grain class .