コード例 #1
0
        public static StreamSubscriptionMatch[] Match(IActorSystem system, StreamIdentity stream)
        {
            var specifications = DictionaryExtensions.Find(configuration, stream.Provider)
                                 ?? Enumerable.Empty <StreamSubscriptionSpecification>();

            return(Match(system, stream.Id, specifications));
        }
コード例 #2
0
ファイル: Stitcher.cs プロジェクト: JoelPlourde/Shore-Squad
 private static Transform[] TranslateTransforms(Transform[] sources, TransformCatalog transformCatalog)
 {
     Transform[] targets = new Transform[sources.Length];
     for (int index = 0; index < sources.Length; index++)
     {
         targets[index] = DictionaryExtensions.Find(transformCatalog, sources[index].name);
     }
     return(targets);
 }
コード例 #3
0
ファイル: Stitcher.cs プロジェクト: Koyatoufu/AbyssHunter
    private Transform[] TranslateTransforms(Transform[] source, TransformCatalog catalog)
    {
        Transform[] newTrans = new Transform[source.Length];

        for (int i = 0; i < newTrans.Length; i++)
        {
            newTrans[i] = DictionaryExtensions.Find(catalog, source[i].name);
        }

        return(newTrans);
    }
コード例 #4
0
        internal static void Register(ActorType type)
        {
            foreach (var specification in StreamSubscriptionSpecification.From(type))
            {
                var specifications = DictionaryExtensions.Find(configuration, specification.Provider);

                if (specifications == null)
                {
                    specifications = new List <StreamSubscriptionSpecification>();
                    configuration.Add(specification.Provider, specifications);
                }

                specifications.Add(specification);
            }
        }
コード例 #5
0
ファイル: BoneUtility.cs プロジェクト: xysverma/mcs
        /// <summary>
        /// Remaps the bone structure from a given Transform, returning a new array of bones.
        /// </summary>
        /// <returns>An array of bone Transforms</returns>
        /// <param name="reference_geometry_bones">Reference geometry bones.</param>
        /// <param name="destination_bones">Destination bones.</param>
        public static Transform[] RemapBones(Transform[] reference_geometry_bones, Transform reference_root_bone, BoneUtility.BoneMap destination_bones, Transform destination_root_bone)
        {
            for (int i = 0; i < reference_geometry_bones.Length; i++)
            {
                BoneUtility.cleanAllBoneNames(reference_geometry_bones[i]);
            }

            var new_bones = new Transform[reference_geometry_bones.Length];

            for (var index = 0; index < reference_geometry_bones.Length; index++)
            {
                new_bones[index] = DictionaryExtensions.Find(destination_bones, reference_geometry_bones[index].name);
            }

            return(new_bones);
        }
コード例 #6
0
        public Task Init(string name, IProviderRuntime pr, IProviderConfiguration pc)
        {
            Name = name;

            system = ClusterActorSystem.Initialized
                ? ClusterActorSystem.Current
                : ClientActorSystem.Current;

            specifications = DictionaryExtensions.Find(configuration, name)
                             ?? Enumerable.Empty <StreamSubscriptionSpecification>();

            var type = Type.GetType(pc.Properties[TypeKey]);

            pc.RemoveProperty(TypeKey);
            Debug.Assert(type != null);

            provider = (IStreamProviderImpl)Activator.CreateInstance(type);
            return(provider.Init(name, pr, pc));
        }
コード例 #7
0
 public void FindFailsWithNullThis()
 {
     Assert.Throws <ArgumentNullException>(() =>
                                           DictionaryExtensions.Find <object, object>(null, null));
 }