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


C# IPropertyBag.Write方法代码示例

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


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

示例1: WritePropertyBag

 /// <summary>
 /// Writes property values into a property bag.
 /// </summary>
 /// <param name="pb">Property bag.</param>
 /// <param name="propName">Name of property.</param>
 /// <param name="val">Value of property.</param>
 public static void WritePropertyBag(IPropertyBag pb, string propName, object val)
 {
     try
     {
         pb.Write(propName, ref val);
     }
     catch (Exception e)
     {
         throw new ApplicationException(e.Message);
     }
 }
开发者ID:kakkerlakgly,项目名称:ManageMessageNamespace,代码行数:17,代码来源:PropertyBagHelper.cs

示例2: WritePropertyBag

 /// <summary>
 /// Writes property values into a property bag.
 /// </summary>
 /// <param name="pb">Property bag.</param>
 /// <param name="propName">Name of property.</param>
 /// <param name="val">Value of property.</param>
 private void WritePropertyBag(IPropertyBag propertyBag, string propertyName, object value)
 {
     try
     {
         propertyBag.Write(propertyName, ref value);
     }
     catch (Exception ex)
     {
         //ExceptionHelper.HandleException(Resources.T4TemplaterPipelineComponentName, ex);
         //TraceHelper.WriteLineIf(traceEnabled, ex.Message, EventLogEntryType.Error);
         throw; ;
     }
 }
开发者ID:vimjock,项目名称:T4Pipeline,代码行数:19,代码来源:T4TemplaterPipelineComponent.cs

示例3: WritePropertyBag

 /// <summary>
 /// Writes property values into a property bag.
 /// </summary>
 /// <param name="propertyBag">Property bag.</param>
 /// <param name="propertyName">Name of property.</param>
 /// <param name="value">Value of property.</param>
 protected static void WritePropertyBag(IPropertyBag propertyBag, string propertyName, object value)
 {
     propertyBag.Write(propertyName, ref value);
 }
开发者ID:qwert789,项目名称:codegallery,代码行数:10,代码来源:PipelineComponentBase.cs

示例4: WriteInfo

 private void WriteInfo(LibraryInfo info, IPropertyBag pBag)
 {
     var reference = new LibraryInfo(info.Type, null, null);
     object val;
     if (reference.CompileOption != info.CompileOption)
     {
         val = info.CompileOption.ToString();
         pBag.Write(info.Type + ".Compile", ref val);
     }
     if (reference.Name != info.Name)
     {
         val = info.Name;
         pBag.Write(info.Type + ".Name", ref val);
     }
     if (reference.Target != info.Target)
     {
         val = info.Target;
         pBag.Write(info.Type + ".Target", ref val);
     }
     if (reference.Dependencies != info.Dependencies)
     {
         val = info.Dependencies;
         pBag.Write(info.Type + ".Dependencies", ref val);
     }
     if (reference.Namespace != info.Namespace)
     {
         val = info.Namespace;
         pBag.Write(info.Type + ".Namespace", ref val);
     }
     if (reference.WithActiveRecord != info.WithActiveRecord)
     {
         val = info.WithActiveRecord.ToString();
         pBag.Write(info.Type + ".ActiveRecord", ref val);
     }
     if (reference.WithHelperMethods != info.WithHelperMethods)
     {
         val = info.WithHelperMethods.ToString();
         pBag.Write(info.Type + ".HelperMethods", ref val);
     }
     if (reference.WithManualJson != info.WithManualJson)
     {
         val = info.WithManualJson.ToString();
         pBag.Write(info.Type + ".WithManualJson", ref val);
     }
     if (reference.UseUtc != info.UseUtc)
     {
         val = info.UseUtc.ToString();
         pBag.Write(info.Type + ".UseUtc", ref val);
     }
     if (reference.Legacy != info.Legacy)
     {
         val = info.Legacy.ToString();
         pBag.Write(info.Type + ".Legacy", ref val);
     }
     if (reference.MinimalSerialization != info.MinimalSerialization)
     {
         val = info.MinimalSerialization.ToString();
         pBag.Write(info.Type + ".MinimalSerialization", ref val);
     }
     if (reference.NoPrepareExecute != info.NoPrepareExecute)
     {
         val = info.NoPrepareExecute.ToString();
         pBag.Write(info.Type + ".NoPrepareExecute", ref val);
     }
 }
开发者ID:instant-hrvoje,项目名称:dsl-compiler-client,代码行数:65,代码来源:DDDLanguagePackage.cs

示例5: Save

        public void Save(IPropertyBag propertyBag, bool clearDirty, bool saveAllProperties)
        {
            object val = (object)this.PackagePath;
            propertyBag.Write(PackagePathPropertyName, ref val);

            val = (object)this.DataVariable;
            propertyBag.Write(DataVariablePropertyName, ref val);
        }
开发者ID:japj,项目名称:sqlsrvintegrationsrv,代码行数:8,代码来源:ISPipelineComponent.cs


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