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


C# Dictionary.AddNonDefaultValue方法代码示例

本文整理汇总了C#中Dictionary.AddNonDefaultValue方法的典型用法代码示例。如果您正苦于以下问题:C# Dictionary.AddNonDefaultValue方法的具体用法?C# Dictionary.AddNonDefaultValue怎么用?C# Dictionary.AddNonDefaultValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dictionary的用法示例。


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

示例1: Serialize

		public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
		{
			Dictionary<string, object> dictionary = new Dictionary<string, object>();
			WeChatBaseResponse data = (WeChatBaseResponse)obj;

			dictionary.AddNonDefaultValue("ret", data.Ret);
			dictionary.AddNonDefaultValue("err_msg", data.ErrMsg);

			return dictionary;
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:10,代码来源:WeChatBaseResponseConverter.cs

示例2: Serialize

		public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
		{
			EnumItemPropertyDescription desp = (EnumItemPropertyDescription)obj;

			Dictionary<string, object> dictionary = new Dictionary<string, object>();

			dictionary.AddNonDefaultValue("value", desp.Value);
			dictionary.AddNonDefaultValue("text", desp.Text);

			return dictionary;
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:11,代码来源:EnumItemPropertyDescriptionConverter.cs

示例3: Serialize

        public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            WfClientApplication application = (WfClientApplication)obj;

            Dictionary<string, object> dictionary = new Dictionary<string, object>();

            dictionary.AddNonDefaultValue("codeName", application.CodeName);
            dictionary.AddNonDefaultValue("name", application.Name);
            dictionary.AddNonDefaultValue("sort", application.Sort);

            return dictionary;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:12,代码来源:WfClientApplicationJsonConverter.cs

示例4: Serialize

        public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            Dictionary<string, object> dictionary = new Dictionary<string, object>();

            SOARolePropertyRow row = (SOARolePropertyRow)obj;

            dictionary.AddNonDefaultValue("rowNumber", row.RowNumber);
            dictionary.AddNonDefaultValue("operatorType", row.OperatorType);
            dictionary.AddNonDefaultValue("operator", row.Operator);

            dictionary["values"] = JSONSerializerExecute.Serialize(row.Values);

            return dictionary;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:14,代码来源:SOARolePropertyRowConverter.cs

示例5: Serialize

        public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            Dictionary<string, object> dictionary = new Dictionary<string, object>();

            WfClientTransferParams transferParams = (WfClientTransferParams)obj;

            dictionary.AddNonDefaultValue("nextActivityDescriptorKey", transferParams.NextActivityDescriptorKey);
            dictionary.AddNonDefaultValue("fromTransitionDescriptorKey", transferParams.FromTransitionDescriptorKey);
            dictionary["operator"] = transferParams.Operator;

            dictionary["branchTransferParams"] = transferParams.BranchTransferParams;
            dictionary["assignees"] = transferParams.Assignees;

            return dictionary;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:15,代码来源:WfClientTransferParamsJsonConverter.cs

示例6: Serialize

        public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            WfClientKeyedDescriptorBase desp = (WfClientKeyedDescriptorBase)obj;

            Dictionary<string, object> dictionary = new Dictionary<string, object>();

            dictionary.AddNonDefaultValue("key", desp.Key);
            dictionary.AddNonDefaultValue("name", desp.Name);

            DictionaryHelper.AddNonDefaultValue<string, object>(dictionary, "description", desp.Description);
            DictionaryHelper.AddNonDefaultValue<string, object>(dictionary, "enabled", desp.Enabled);

            dictionary.Add("properties", desp.Properties);

            return dictionary;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:16,代码来源:WfClientKeyedDescriptorJsonConverterBase.cs

示例7: Serialize

        public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            Dictionary<string, object> dictionary = new Dictionary<string, object>();

            WfClientBranchProcessStartupParams startupParams = (WfClientBranchProcessStartupParams)obj;

            dictionary.AddNonDefaultValue("defaultTaskTitle", startupParams.DefaultTaskTitle);
            dictionary.AddNonDefaultValue("resourceID", startupParams.ResourceID);

            dictionary.AddNonDefaultValue("department", startupParams.Department);

            dictionary["assignees"] = startupParams.Assignees;
            dictionary["applicationRuntimeParameters"] = startupParams.ApplicationRuntimeParameters;
            dictionary["relativeParams"] = NameValueCollectionToDictionary(startupParams.RelativeParams);
            dictionary["startupContext"] = startupParams.StartupContext;

            return dictionary;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:18,代码来源:WfClientBranchProcessStartupParamsJsonConverter.cs

示例8: Serialize

        public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            System.IO.Stream stream = (System.IO.Stream)obj;

            Dictionary<string, object> dictionary = new Dictionary<string, object>();
            byte[] buffer = stream.ToBytes();
            dictionary.AddNonDefaultValue("__stream", Convert.ToBase64String(buffer));

            return dictionary;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:10,代码来源:WfClientStreamJsonConverter.cs

示例9: Serialize

        public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            Dictionary<string, object> dictionary = new Dictionary<string, object>();

            WfClientRuntimeContext context = (WfClientRuntimeContext)obj;

            dictionary.AddNonDefaultValue("autoCalculate", context.AutoCalculate);
            dictionary["taskTitle"] = context.TaskTitle;
            dictionary["notifyTitle"] = context.NotifyTitle;
            dictionary["operator"] = context.Operator;
            dictionary["autoPersist"] = context.AutoPersist;
            dictionary["applicationRuntimeParameters"] = context.ApplicationRuntimeParameters;
            dictionary["processContext"] = context.ProcessContext;
            dictionary["updateTag"] = context.UpdateTag;

            dictionary.AddNonDefaultValue("opinion", context.Opinion);

            return dictionary;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:19,代码来源:WfClientRuntimeContextJsonConverter.cs

示例10: Serialize

        public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            Dictionary<string, object> dictionary = new Dictionary<string, object>();

            VoucherItemCollection data = (VoucherItemCollection)obj;

            dictionary.AddNonDefaultValue("collectioName", data.CollectioName);
            dictionary["items"] = data.ToArray();

            return dictionary;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:11,代码来源:VoucherItemCollectionConverter.cs

示例11: Serialize

        public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            Dictionary<string, object> dictionary = new Dictionary<string, object>();

            VoucherEntity data = (VoucherEntity)obj;

            dictionary.AddNonDefaultValue("name", data.Name);
            dictionary["items"] = data.Items;

            return dictionary;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:11,代码来源:VoucherConverter.cs

示例12: Serialize

        public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            WfClientDelegation opinion = (WfClientDelegation)obj;

            Dictionary<string, object> dictionary = new Dictionary<string, object>();

            dictionary.AddNonDefaultValue("sourceUserID", opinion.SourceUserID);
            dictionary.AddNonDefaultValue("sourceUserName", opinion.SourceUserName);
            dictionary.AddNonDefaultValue("destinationUserID", opinion.DestinationUserID);
            dictionary.AddNonDefaultValue("destinationUserName", opinion.DestinationUserName);
            dictionary.AddNonDefaultValue("startTime", opinion.StartTime);
            dictionary.AddNonDefaultValue("endTime", opinion.EndTime);
            dictionary.AddNonDefaultValue("enabled", opinion.Enabled);

            dictionary.AddNonDefaultValue("applicationName", opinion.ApplicationName);
            dictionary.AddNonDefaultValue("programName", opinion.ProgramName);
            dictionary.AddNonDefaultValue("tenantCode", opinion.TenantCode);

            return dictionary;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:20,代码来源:WfClientDelegationJsonConverter.cs

示例13: Serialize

		public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
		{
			Dictionary<string, object> dictionary = new Dictionary<string, object>();
			WeChatAppMessage data = (WeChatAppMessage)obj;

			dictionary.AddNonDefaultValue("app_id", data.AppMessageID);
			dictionary.AddNonDefaultValue("file_id", data.FileID);
			dictionary.AddNonDefaultValue("title", data.Title);
			dictionary.AddNonDefaultValue("digest", data.Digest);
			dictionary.AddNonDefaultValue("author", data.Author);
			dictionary.AddNonDefaultValue("content_url", data.ContentUrl);
			dictionary.AddNonDefaultValue("img_url", data.ImageUrl);
			dictionary.AddNonDefaultValue("create_time", data.CreateTime.ToJavascriptDateNumber() / 1000);
			dictionary.AddNonDefaultValue("show_cover_pic", data.ShowCover ? 1 : 0);

			return dictionary;
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:17,代码来源:WeChatAppMessageConverter.cs

示例14: Serialize

        public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
        {
            WfClientMainStreamActivityDescriptor clientMSActDesp = (WfClientMainStreamActivityDescriptor)obj;

            Dictionary<string, object> dictionary = new Dictionary<string, object>();

            dictionary.AddNonDefaultValue("activityInstanceID", clientMSActDesp.ActivityInstanceID);
            dictionary.AddNonDefaultValue("level", clientMSActDesp.Level);
            dictionary.AddNonDefaultValue("elapsed", clientMSActDesp.Elapsed);
            dictionary.AddNonDefaultValue("activity", clientMSActDesp.Activity);
            dictionary.AddNonDefaultValue("branchProcessGroupsCount", clientMSActDesp.BranchProcessGroupsCount);
            dictionary["status"] = clientMSActDesp.Status;
            dictionary["operator"] = clientMSActDesp.Operator;

            dictionary.Add("fromTransitionDescriptor", clientMSActDesp.FromTransitionDescriptor);
            dictionary.Add("toTransitionDescriptor", clientMSActDesp.ToTransitionDescriptor);
            dictionary.Add("assignees", clientMSActDesp.Assignees);
            dictionary.Add("associatedActivities", clientMSActDesp.AssociatedActivities);

            return dictionary;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:21,代码来源:WfClientMainStreamActivityDescriptorJsonConverter.cs

示例15: Serialize

		public override IDictionary<string, object> Serialize(object obj, JavaScriptSerializer serializer)
		{
			WfBranchProcessStartupParams data = (WfBranchProcessStartupParams)obj;

			IDictionary<string, object> dictionary = new Dictionary<string, object>();

			dictionary.AddNonDefaultValue("ResourceID", data.ResourceID);
			dictionary.AddNonDefaultValue("DefaultTaskTitle", data.DefaultTaskTitle);
			dictionary["Assignees"] = data.Assignees;
			dictionary["Department"] = data.Department;
			dictionary["ApplicationRuntimeParameters"] = data.ApplicationRuntimeParameters;

			Dictionary<string, string> relativeParams = new Dictionary<string, string>();

			foreach (string key in data.RelativeParams)
				relativeParams[key] = data.RelativeParams[key];

			dictionary["RelativeParams"] = relativeParams;
			dictionary["StartupContext"] = data.StartupContext;

			return dictionary;
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:22,代码来源:WfBranchProcessStartupParamsConverter.cs


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