public TestCaller() { NatashaInitializer.InitializeAndPreheating(); string temp = "Hello"; Dict = new Dictionary<string, Action<CallModel, object>>(); Type type = typeof(CallModel); PrecisionDict = PrecisionDictOperator.CreateFromType(type); FuzzyDict = FuzzyDictOperator.CreateFromType(type); HashDict = HashDictOperator.CreateFromType(type); //LinkHandler = LinkOperator.CreateFromType(type); //FuzzyLinkHandler = FuzzyLinkOperator.CreateFromType(type); //HashLinkHandler = HashLinkOperator.CreateFromType(type); Model = new CallModel(); Dynamic = new CallModel(); DictModel = new CallModel(); PrecisionDict.New(); FuzzyDict.New(); HashDict.New(); Dict["Name"] = NDelegate.DefaultDomain().Action<CallModel, object>("arg1.Name=(string)arg2;"); for (int i = 0; i < 3000; i++) { Model.Name = "Hello"; Dynamic.Name = "Hello"; Dict["Name"](DictModel, "Hello"); PrecisionDict.Set("Name", "Hello"); } }
public void DictSetStringTest() { PrecisionDict.Set("Name" , "Hello"); }
public void FuzzyDictSetStringTest() { FuzzyDict.Set("Name", "Hello"); }