当前位置: 首页>>代码示例>>C#>>正文


C# Dict类代码示例

本文整理汇总了C#中Dict的典型用法代码示例。如果您正苦于以下问题:C# Dict类的具体用法?C# Dict怎么用?C# Dict使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Dict类属于命名空间,在下文中一共展示了Dict类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SendRequest

 protected void SendRequest(string rPath, Dict<string, string> rArgs, ServerType rType, Action<WWW> rOnResponse)
 {
     var url = HttpServerHost + rPath;
     useServerType = rType;
     WaitingLayer.Show();
     this.StartCoroutine(GET(url, rArgs, rOnResponse));
 }
开发者ID:meta-42,项目名称:uEasyKit,代码行数:7,代码来源:HttpRequestBase.cs

示例2: V_VNA

 public static void V_VNA(NetwRunnable nr, ExecHm rc, Bys m, out string name, out IDictionary<string, Object> args)
 {
     var res = new Dict(m.V<Dictionary<string, object>>());
     name = res.Val("name", "");
     var obj = res["args"];
     args = res["args"] as IDictionary<string,object>;
 }
开发者ID:Centny,项目名称:cswf,代码行数:7,代码来源:ExecHm.cs

示例3: GeneratorAssetbundleEntry

    static List<AssetBundleBuild> GeneratorAssetbundleEntry()
    {
        string path = Application.dataPath + "/" + PackagePlatform.packageConfigPath;
        if (string.IsNullOrEmpty(path)) return null;

        string str = File.ReadAllText(path);

        Dict<string, ABEntry> abEntries = new Dict<string, ABEntry>();

        PackageConfig apc = JsonUtility.FromJson<PackageConfig>(str);

        AssetBundlePackageInfo[] bundlesInfo = apc.bundles;

        for (int i = 0; i < bundlesInfo.Length; i++)
        {
            ABEntry entry = new ABEntry();
            entry.bundleInfo = bundlesInfo[i];

            if (!abEntries.ContainsKey(entry.bundleInfo.name))
            {
                abEntries.Add(entry.bundleInfo.name, entry);
            }
        }

        List<AssetBundleBuild> abbList = new List<AssetBundleBuild>();
        foreach (var rEntryItem in abEntries)
        {
            abbList.AddRange(rEntryItem.Value.ToABBuild());
        }
        return abbList;
    }
开发者ID:meta-42,项目名称:uEasyKit,代码行数:31,代码来源:AssetBundlePackage.cs

示例4: GLTexture

        /// <summary>
        /// Create OpenGL object specifying the referenced scene objects directly.
        /// </summary>
        /// <param name="block"></param>
        /// <param name="scene"></param>
        /// <param name="glbuff"></param>
        /// <param name="glimg"></param>
        public GLTexture(Compiler.Block block, Dict scene, GLBuffer glbuff, GLImage glimg)
            : base(block.Name, block.Anno)
        {
            var err = new CompileException($"texture '{name}'");

            // PARSE ARGUMENTS
            Cmds2Fields(block, err);

            // set name
            glBuff = glbuff;
            glImg = glimg;

            // GET REFERENCES
            if (Buff != null)
                scene.TryGetValue(Buff, out glBuff, block, err);
            if (Img != null)
                scene.TryGetValue(Img, out glImg, block, err);
            if (glBuff != null && glImg != null)
                err.Add("Only an image or a buffer can be bound to a texture object.", block);
            if (glBuff == null && glImg == null)
                err.Add("Ether an image or a buffer has to be bound to a texture object.", block);

            // IF THERE ARE ERRORS THROW AND EXCEPTION
            if (err.HasErrors())
                throw err;

            // INCASE THIS IS A TEXTURE OBJECT
            Link(block.Filename, block.LineInFile, err);
            if (HasErrorOrGlError(err, block))
                throw err;
        }
开发者ID:h3tch,项目名称:ProtoFX,代码行数:38,代码来源:GLTexture.cs

示例5: btnSure_Click

    protected void btnSure_Click(object sender, EventArgs e)
    {
        Dict dep = new Dict();
        WebFormHelper.GetDataFromForm(this, dep);
        if(dep.Id<0)
        {
            if (SimpleOrmOperator.Create(dep))
            {
                WebTools.Alert("添加成功!");
            }
            else
            {
                WebTools.Alert("添加失败!");

            }
        }
        else{
            if (SimpleOrmOperator.Update(dep))
            {
                WebTools.Alert("修改成功!");
            }
            else
            {
                WebTools.Alert("修改失败!");

            }

         }
    }
开发者ID:romanu6891,项目名称:fivemen,代码行数:29,代码来源:DictEdit.aspx.cs

示例6: GLFragoutput

        /// <summary>
        /// Create OpenGL object. Standard object constructor for ProtoFX.
        /// </summary>
        /// <param name="block"></param>
        /// <param name="scene"></param>
        /// <param name="debugging"></param>
        public GLFragoutput(Compiler.Block block, Dict scene, bool debugging)
            : base(block.Name, block.Anno)
        {
            var err = new CompileException($"fragoutput '{name}'");

            // PARSE ARGUMENTS
            Cmds2Fields(block, err);

            // CREATE OPENGL OBJECT
            glname = GL.GenFramebuffer();
            GL.BindFramebuffer(FramebufferTarget.Framebuffer, glname);

            // PARSE COMMANDS
            foreach (var cmd in block)
                Attach(cmd, scene, err | $"command '{cmd.Name}'");

            // if any errors occurred throw exception
            if (err.HasErrors())
                throw err;

            // CHECK FOR OPENGL ERRORS
            Bind();
            var status = GL.CheckFramebufferStatus(FramebufferTarget.Framebuffer);
            Unbind();

            // final error checks
            if (HasErrorOrGlError(err, block))
                throw err;
            if (status != FramebufferErrorCode.FramebufferComplete)
                throw err.Add("Could not be created due to an unknown error.", block);
        }
开发者ID:h3tch,项目名称:ProtoFX,代码行数:37,代码来源:GLFragoutput.cs

示例7: GLVertoutput

        /// <summary>
        /// Create OpenGL object. Standard object constructor for ProtoFX.
        /// </summary>
        /// <param name="block"></param>
        /// <param name="scene"></param>
        /// <param name="debugging"></param>
        public GLVertoutput(Compiler.Block block, Dict scene, bool debugging)
            : base(block.Name, block.Anno)
        {
            var err = new CompileException($"vertoutput '{name}'");

            // PARSE ARGUMENTS
            Cmds2Fields(block, err);

            // CREATE OPENGL OBJECT
            glname = GL.GenTransformFeedback();
            GL.BindTransformFeedback(TransformFeedbackTarget.TransformFeedback, glname);

            // parse commands
            int numbindings = 0;
            foreach (var cmd in block["buff"])
                Attach(numbindings++, cmd, scene, err | $"command '{cmd.Text}'");

            // if errors occurred throw exception
            if (err.HasErrors())
                throw err;

            // unbind object and check for errors
            GL.BindTransformFeedback(TransformFeedbackTarget.TransformFeedback, 0);
            if (HasErrorOrGlError(err, block))
                throw err;
        }
开发者ID:h3tch,项目名称:ProtoFX,代码行数:32,代码来源:GLVertoutput.cs

示例8: Dict_List

 public static List<Dict> Dict_List(Dict model,int OCID)
 {
     //if (!UserService.OC_IsRole(OCID))
     //{
     //    return null;
     //}
     AffairsBLL affairsBLL = new AffairsBLL();
     return affairsBLL.Dict_List(model);
 }
开发者ID:holdbase,项目名称:IES2,代码行数:9,代码来源:AffairsProvider.aspx.cs

示例9: ParsePasses

 /// <summary>
 /// Parse commands in block.
 /// </summary>
 /// <param name="list"></param>
 /// <param name="block"></param>
 /// <param name="scene"></param>
 /// <param name="err"></param>
 private void ParsePasses(ref List<GLPass> list, Compiler.Block block, Dict scene,
     CompileException err)
 {
     GLPass pass;
     var cmdName = ReferenceEquals(list, init)
         ? "init" : ReferenceEquals(list, passes) ? "pass" : "uninit";
     foreach (var cmd in block[cmdName])
         if (scene.TryGetValue(cmd[0].Text, out pass, block, err | $"command '{cmd.Text}'"))
             list.Add(pass);
 }
开发者ID:h3tch,项目名称:ProtoFX,代码行数:17,代码来源:GLTech.cs

示例10: LoggingHandler

 static void LoggingHandler(Logger.Level level, string message, Dict args)
 {
     if (args != null)
     {
         foreach (string key in args.Keys) {
             message += string.Format(" {0}: {1},", "" + key, "" + args[key]);
         }
     }
     Console.WriteLine("[ActionTests] [{0}] {1}", level, message);
 }
开发者ID:detroitpro,项目名称:Analytics.Xamarin,代码行数:10,代码来源:ActionTests.cs

示例11: Page

 public Page(Page p_pParentPage)
 {
     this.Parent = p_pParentPage;
     this.Document = new HtmlDocument();
     this.MetaInfo = new List<PageMeta>();
     this.MetaLinkInfo = new List<PageMetaLink>();
     this.AnchorList = new List<Anchor>();
     this.ImageList = new List<Image>();
     this.OtherTags = new Dict<string, string>();
     this.DirectChildren = new List<Page>();
 }
开发者ID:Green-Orca,项目名称:WebStuffCore,代码行数:11,代码来源:Page.cs

示例12: GetAttrDict

        public override Dict GetAttrDict(ICallerContext context, object self)
        {
            List attrs = GetAttrNames(context, self);

            Dict res = new Dict();
            foreach (string o in attrs) {
                res[o] = GetAttr(context, self, SymbolTable.StringToId(o));
            }

            return res;
        }
开发者ID:FabioNascimento,项目名称:DICommander,代码行数:11,代码来源:ReflectedAssembly.cs

示例13: SaveDict

        public void SaveDict(Dict domain)
        {
            using (Transaction trans = UnitOfWork.BeginTransaction(typeof(Dict)))
            {
                repository.SaveOrUpdate(domain);

                foreach (var item in domain.DictItems)
                    repository.SaveOrUpdate(item);

                trans.Commit();
            }
        }
开发者ID:AgileEAP,项目名称:WebStack,代码行数:12,代码来源:UtilService.cs

示例14: ItShouldAdd

 public void ItShouldAdd()
 {
     Dict<int, string> test = new Dict<int, string>();
     test.Add(1, "One");
     test.Add(2, "Two");
     test.Add(3, "Three");
     test.Add(4, "Four");
     test.Add(5, "Five");
     bool actual = test.ContainsKey(1);
     bool expected = true;
     Assert.AreEqual(expected, actual);
 }
开发者ID:bogdanuifalean,项目名称:JuniorMind,代码行数:12,代码来源:DictTest.cs

示例15: ItShouldGetValueForSpecificKey

 public void ItShouldGetValueForSpecificKey()
 {
     Dict<int, string> test = new Dict<int, string>();
     test.Add(1, "One");
     test.Add(2, "Two");
     test.Add(3, "Three");
     test.Add(4, "Four");
     test.Add(5, "Five");
     test.Add(18, "Eightteen");
     string actual = test[18];
     string expected = "Eightteen";
     Assert.AreEqual(expected, actual);
 }
开发者ID:bogdanuifalean,项目名称:JuniorMind,代码行数:13,代码来源:DictTest.cs


注:本文中的Dict类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。