Пример #1
0
        SpecifyCreation(
            SiloAddress silo,
            PlacementStrategy placement,
            string grainType)
        {
            if (silo == null)
            {
                throw new ArgumentNullException("silo");
            }
            if (placement == null)
            {
                throw new ArgumentNullException("placement");
            }
            if (string.IsNullOrWhiteSpace(grainType))
            {
                throw new ArgumentException("'grainType' must contain a valid typename.");
            }

            return
                (new PlacementResult
            {
                Activation = ActivationId.NewId(),
                Silo = silo,
                PlacementStrategy = placement,
                GrainType = grainType
            });
        }
Пример #2
0
        public static ActivationAddress NewActivationAddress(SiloAddress silo, GrainId grain)
        {
            var activation = ActivationId.NewId();

            return(GetAddress(silo, grain, activation));
        }