Exemplo n.º 1
0
        /// <summary>
        /// Create a reference to a grain that we expect to support the stream consumer extension.
        /// </summary>
        /// <param name="primaryKey">The primary key of the grain.</param>
        /// <param name="grainClassName">The name of the grain class to instantiate.</param>
        /// <param name="grainIfaceName">The name of the an IGrain-derived interface that `className` implements (required by MakeGrainReferenceInternal)</param>
        /// <returns></returns>
        private IStreamConsumerExtension MakeConsumerReference(Guid primaryKey, int implTypeCode)
        {
            GrainId      grainId     = GrainId.GetGrainId(implTypeCode, primaryKey);
            IAddressable addressable = GrainReference.FromGrainId(grainId);

            return(GrainFactory.Cast <IStreamConsumerExtension>(addressable));
        }