471,337 Members | 817 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

SharedProperty iteration

Hi,

I try to read out the Groupnames and Propertyvalues of
SharedProperties. With the SharedPropertyGroup I
have a IEnumeration object that let my iterate the different
groups and receive the Groupnames like this.

SharedPropertyGroupManager oManager = new SharedPropertyGroupManager();
System.Collections.IEnumerator iGroupEnum = oManager.GetEnumerator();
while(iGroupEnum.MoveNext()==true)
{
string groupName = iGroupEnum.Current.ToString();
}

But how can I receive the sharedproperties from a group-object without
having the name of the property?
Can someone give me a hind?

Ciao

Martin

Dec 8 '05 #1
4 1409
gl****@bigfoot.com wrote:
Hi,

I try to read out the Groupnames and Propertyvalues of
SharedProperties. With the SharedPropertyGroup I
have a IEnumeration object that let my iterate the different
groups and receive the Groupnames like this.

SharedPropertyGroupManager oManager = new
SharedPropertyGroupManager(); System.Collections.IEnumerator
iGroupEnum = oManager.GetEnumerator();
while(iGroupEnum.MoveNext()==true) {
string groupName = iGroupEnum.Current.ToString();
}

But how can I receive the sharedproperties from a group-object without
having the name of the property?
Can someone give me a hind?


I don't know why anyone would read a property without knowing the name
of the property. How can you ever know WHAT you want to read in taht
case? ;)

And what's SharedProperties?

FB

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Dec 9 '05 #2
Frans Bouma [C# MVP] schrieb:
I don't know why anyone would read a property without knowing the name
of the property. How can you ever know WHAT you want to read in taht
case? ;) Think about writing such kind of information down to an file and later
to read it in again ;-)
OK.
I just want to do that because I need it.
And what's SharedProperties?

An MVP should know first to have a look into the MSDN before writing
thinks like that.
It's part of the System.EnterpriseServices
There are 3 Klasses for managing shared informations.
SharedPropertyGroupManager, SharedPropertyGroup and SharedProperty

Please answer to this thread if you have qualified informations for me.
Not such thinks like Frans (sorry Frans)

Ciao and Thanks

Martin

Dec 9 '05 #3
gl****@bigfoot.com wrote:
Frans Bouma [C# MVP] schrieb:
I don't know why anyone would read a property without knowing the
name of the property. How can you ever know WHAT you want to read
in taht case? ;) Think about writing such kind of information down to an file and later
to read it in again ;-)
OK.
I just want to do that because I need it.


and I just want to help you but I need proper context information.
Your question read like "I want to read someobject.SomeProperty but I
don't know what 'Someproperty' is so how do I do that?"...
And what's SharedProperties?

An MVP should know first to have a look into the MSDN before writing
thinks like that.
It's part of the System.EnterpriseServices
There are 3 Klasses for managing shared informations.
SharedPropertyGroupManager, SharedPropertyGroup and SharedProperty


1) first learn what 'MVP' means. It's an award for people who have
done a lot for the community, not some course graduation diploma
2) there are literaly thousands of classes in the framework. I know a
lot of them from my bare head but not all of them. So please forgive me
that I didn't know that one from my bare head. And no, I'm not going to
look up every class name mentioned here in the .net reference manual to
see if it is a framework class or not. YOU want help, provide me with
info so I can help you.

For starters: trying to be funny and not being friendly towards a
person who might be able to help you isn't helping YOU either.
Please answer to this thread if you have qualified informations for
me. Not such thinks like Frans (sorry Frans)


Huh?
You don't want me to help you apparently. Listen Martin, I do this in
my spare time and I don't spend my spare time on helping people who
think they have to be unfriendly towards me, I've better things to do
with my spare time.

FB

ps: why doesn't SharedPropertyGroup.Property(name) work for you?

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Dec 10 '05 #4
Hi Frans,

first, we had a unlucky start. I excuse me for my rude answer. OK?

I know what a MVP is and I'm not an starter. I thought SharedProperty
would be a well known term because it is a dotnet-framework keyword.

What I like to do is something that I can do, for example, with a
hashtable.
Think about using the hashtable to store String-Key and String-Values.
After I have inserted some Key-Value-pairs, I want to print out a list
with this key-value-pairs. For this the hastable gets an
iterator-object. OK?

I use the SharedProperties (and the Shared-PropertyGroups) in such a
way to
share information in my project.

So I make some groups and fill this groups with key (property-name) and

value (the value of the property) pairs. After this I want to have a
functionality
to print out the inserted group(names)-property(names) and Values.
For this I need a functionality to iterate over the group-items (that I
have) and
after this to iterate over the group-properties (that I don't have).

So I can not use SharedPropertyGroup.GetPropertyName(name) because I do
not know the name of the property. I also can not store propertynames
in an other variable because there is no permanet instance that can
hold this information.
SharedPropertyGroup.GetProperty((int) position) is also not working. I
always get
an exception that the index is wrong. I think that I have to create the
property with the
positions as key (or name) to have an access over the position to the
property.
But that is something that I do not want to do.

I hope you will still answer me ;-)

Thanks and Ciao

Martin

Dec 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

35 posts views Thread by Raymond Hettinger | last post: by
59 posts views Thread by Raymond Hettinger | last post: by
2 posts views Thread by Abdullah Khaidar | last post: by
1 post views Thread by karthigan | last post: by
75 posts views Thread by Sathyaish | last post: by
9 posts views Thread by news.microsoft.com | last post: by
4 posts views Thread by John A Grandy | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.