Add method to BusinessLayer


Author
Message
Joe Paquette
Joe Paquette
StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)
Group: Forum Members
Posts: 12, Visits: 25

Create “Protected ReadOnly Property AllFieldNamesStringCollection() As StringCollection” method for use with QueryInformation objects.  Currently, you must use the following construct (C#):

string[] allFields = this.AllFieldsList.ToArray();

queryInfo.Fields = StringBasics.CreateStringCollection(allFields);

 

This should be encapsulated in this new method as follows:

string() allFields = Me.AllFieldsList.ToArray();

return StringBasics.CreateStringCollection(allFields);

 


StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Joe,

You can add the fields through the AllFieldsList property with one line of code (after the QueryInformation constructor).

QueryInformation info = new QueryInformation();
info.Fields.AddRange(
this.AllFieldsList.ToArray());

There's no need to create another string collection object, since the QueryInformation class is initialized with an empty string collection.  Just AddRange the fields list to an array.


Joe Paquette
Joe Paquette
StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)StrataFrame Beginner (12 reputation)
Group: Forum Members
Posts: 12, Visits: 25
Good point!  That works for me.  Thanks.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search