How to find functions, methods, variables and some explanations about classes? API?

Hi,

normally i would type "java api string" into google and easy find the String-Class API for that.

As i understood till now there is not API for Identity Manager. Is that correct?

So lets say i have this code, based on some single-line copies out of your SDK-ScriptSamples:

    Dim qPerson2 = Query.From("Person") _
                  .Where(Function(c) c.Column("FirstName") = Firstname).SelectCount()
    
    ' Load a collection of Person objects
    colPersons = Session.Source.GetCollection(qPerson2)
    ' Run through the list
    For Each colElement As IEntity In colPersons

        ' Create a full Person object from the list element.
        ' Attention: This triggers a database SELECT operation
        ' to get the missing values in most cases.
        dbPerson = colElement.Create(Session, EntityLoadType.Interactive)
        colElement.PutValue("Firstname", "Paula2")
    Next

Line 1 was from 01 Simple collections.vb, but i changed "Paula" to variable Firstname.

Line 13 was from me

The other lines where from 01 Simple collections.vb as well but form the other method.

Now compiler says: compiled successfully.

Runtimeerror says: Exception has been thrown by the target of an invocation.

[...]

Count or Exists queries are not valid for this operation

[...]

First question: There are no line numbers told or even a copy of the line where the exception ocurred. How to debug this in a long code base? No chance to find where the problem occurs.

Second question: Lets say i figured out that the problem is at line 2. I delete "SelectCount()" and hit CTRL+Space to get some auto-suggestions. But sadly no appear. at least "SelectCount()" should appear at this point. I don't understand how to program under this circumstances. I have no API and not auto-suggestions. How to even know what i can access and what the methods i access actually do?

My boss told me that i won't get Microsoft Visual Studio. He says i need to use the Designer -> Script Library to program or the ObjectBrowser.

So i don't understand how to access information that help me to understand which classes are available, which methods and variables are available and what they all do.

Thanks - Michael

Parents
  • You may want to check if the Visual Studio Community Edition applies in your case https://visualstudio.microsoft.com/de/vs/community/

    And, as I have written in other threads, you may want to use the video series as well to learn how to use the object layer API from One Identity Manager. In the Designer you can also access a snipper library (F2) to get the source code snippets for the most common use cases.

    The script editor in Designer has some IntelliSense capabilities but nothing in comparison to the full power of an IDE like Visual Studio, sorry.

    In regards to your code sample. The Query object uses a fluent interface. And by using SelectCount() you are telling the query object you just want to get the count of the specified list of objects. But then you are using this Query object to load a complete collection and work with the entities in that collection, which makes no sense.

  • Okay actually the Insert Snippet F2-functionality is told in the first Video of the series at 6:25. Well i overlooked that because i searched for tutorials on google. Sorry for that.

Reply Children
No Data