propertybag

How can I write a nested arbitrary associative Array value set to a .psd1 file in powershell?

只谈情不闲聊 提交于 2020-06-27 06:56:40
问题 I have a powershell Array object that is programmatically generated, something with arrays inside arrays, inside arrays, sometimes called a "property bag" or a "hashtable", but I think it's natively called an "Array containing Arrays" in the most native powershell terminology. For example: @{ Version = '1.0.0' Name = 'thing' Revision = 'c3a89cd20e19bb82f41e95e0806edc5b6cfd224e' Date = '2016-12-09' Build = '1234' Contents = @{ "index.html" = "23dd7b993f40bb3ae8848fe104b3b767" } } Generating a

How can I write a nested arbitrary associative Array value set to a .psd1 file in powershell?

两盒软妹~` 提交于 2020-06-27 06:56:19
问题 I have a powershell Array object that is programmatically generated, something with arrays inside arrays, inside arrays, sometimes called a "property bag" or a "hashtable", but I think it's natively called an "Array containing Arrays" in the most native powershell terminology. For example: @{ Version = '1.0.0' Name = 'thing' Revision = 'c3a89cd20e19bb82f41e95e0806edc5b6cfd224e' Date = '2016-12-09' Build = '1234' Contents = @{ "index.html" = "23dd7b993f40bb3ae8848fe104b3b767" } } Generating a

Using ActiveX PropertyBags from C#

戏子无情 提交于 2019-12-21 19:55:41
问题 I have created a .NET user control with an ActiveX interface. It works well. Now, I want to be able to read and write from the property bag for the ActiveX interface. How would I do this? 回答1: The easiest is to use client script to pass the parameters values to the ActiveX <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> <script language="javascript"> function Rundata(file) { var winCtrl = document.getElementById("YourActiveX"); winCtrl.Option1 = file;

How to extract a propertybag or complex object send from VB6 through MSMQ in C#

不想你离开。 提交于 2019-12-12 02:04:54
问题 I'm new to VB6 and also MSMQ. I went through a lot of tutorials online but seems like there is no solution for my question. I managed to sending from C# to C# or VB6 to VB6 but not from VB6 to C# or vice versa. So I wonder is it a way to do that or there is no way to do this kind of communication. For example: I want to send this to MSMQ Dim PropBag As PropertyBag Set PropBag = New PropertyBag PropBag.WriteProperty "Customer", "Bob" PropBag.WriteProperty "Product", "MoeHairSuit" PropBag

Property bag for C# class

泪湿孤枕 提交于 2019-12-06 08:22:24
问题 Accessing c# class properties like javascript language would make life a lot easier. How we can do it in C#? For example: someObject["Property"]="simple string"; Console.WriteLine(someObject["FirstName"]); 回答1: Here is how you can enable property-bag-like functionality in your classes by adding a few lines of code: partial class SomeClass { private static readonly PropertyDescriptorCollection LogProps = TypeDescriptor.GetProperties(typeof(SomeClass)); public object this[string propertyName] {

How to clone an object in VB6

余生颓废 提交于 2019-12-06 04:20:23
问题 I am trying to automatically clone an object without having to instantiate a new one and manually copy every single variable. I remember back in the day (when I did VB6 everyday) I came up with a method of cloning objects using the PropertyBag, which was pretty cool. But I've lost the code and don't remember how to do it anymore. Does anyone remember or have another method? 回答1: Is this what you were looking for? Article is copied below for posterity. Serialize Data Using a PropertyBag You

Using ActiveX PropertyBags from C#

给你一囗甜甜゛ 提交于 2019-12-04 12:14:59
I have created a .NET user control with an ActiveX interface. It works well. Now, I want to be able to read and write from the property bag for the ActiveX interface. How would I do this? teebot The easiest is to use client script to pass the parameters values to the ActiveX <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> <script language="javascript"> function Rundata(file) { var winCtrl = document.getElementById("YourActiveX"); winCtrl.Option1 = file; winCtrl.WriteToFile(); } </script> </head> <body> <form id="form1" runat="server"> <div> <object id=

Property bag for C# class

偶尔善良 提交于 2019-12-04 12:02:08
Accessing c# class properties like javascript language would make life a lot easier. How we can do it in C#? For example: someObject["Property"]="simple string"; Console.WriteLine(someObject["FirstName"]); r.zarei Here is how you can enable property-bag-like functionality in your classes by adding a few lines of code: partial class SomeClass { private static readonly PropertyDescriptorCollection LogProps = TypeDescriptor.GetProperties(typeof(SomeClass)); public object this[string propertyName] { get { return LogProps[propertyName].GetValue(this); } set { LogProps[propertyName].SetValue(this,

How to clone an object in VB6

冷暖自知 提交于 2019-12-04 08:19:53
I am trying to automatically clone an object without having to instantiate a new one and manually copy every single variable. I remember back in the day (when I did VB6 everyday) I came up with a method of cloning objects using the PropertyBag, which was pretty cool. But I've lost the code and don't remember how to do it anymore. Does anyone remember or have another method? Is this what you were looking for? Article is copied below for posterity. Serialize Data Using a PropertyBag You can serialize your data quickly by placing it into a PropertyBag object, then reading the PropertyBags

Converting VB6 PropertyBag in .NET

非 Y 不嫁゛ 提交于 2019-12-02 06:09:41
问题 For certain file operations we use VB6's PropertyBag object to convert various items to a bytearray via the Content property. We then save the bytearray as part of a binary file. Later when we load the file we read back the file, read in the bytearray and reconstitute the item by using the propertybag's readproperty. We use this a lot to store images like the customer logo. What support does .NET framework have for working with PropertyBags? Othan than writing a COM helper DLL. Are Property