• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Estrelica
    • Core
    • CoreConfig
    • CoreConfig.Settings
  • Estrelica.Archer.AccessControl
    • AccessControlEdit
    • AccountStatus
    • ContactSubType
    • ContactType
    • IArcherGroup
    • IArcherGroupEdit
    • IArcherRole
    • IArcherRoleEdit
    • IArcherUser
    • IArcherUserEdit
    • ISecurityParameter
    • IUserContact
    • IUserProvider
    • UserType
  • Estrelica.Archer.Content
    • ArcherContentExtensions
    • ContentFilterHelper
    • ContentReportOptions
    • ContentSearchOptions
    • ContentSource
    • ContentType
    • CurrentDateOperator
    • DatafeedHistoryStatus
    • DatafeedStatus
    • DatafeedType
    • DateOffsetOperator
    • DateValueOperator
    • DisplayFieldExtensions
    • EqualityOperator
    • FieldHistoryAuditType
    • HistoryAuditType
    • IAdvancedWorkflowAudit
    • IArcherContent
    • IArcherContentAccess
    • IArcherContentEdit
    • IArcherContentIdQuery
    • IArcherDateFieldQuery
    • IArcherDocument
    • IArcherMembershipQuery<T>
    • IArcherNumericFieldQuery
    • IArcherRecord
    • IArcherRecordQuery
    • IArcherReport
    • IArcherTextFieldQuery
    • IArcherUserGroupFieldQuery
    • IArcherValuesListQuery
    • IContentHistory
    • IContentInformation
    • IContentReport
    • IContentReportOptions
    • IContentUpdateInformation
    • ICrossReferencedRecordsSelectionEdit
    • IDatafeed
    • IDatafeedHistory
    • IDatafeedHistoryMessage
    • IDatafeedRecordCount
    • IDateValueEdit
    • IDisplayField
    • IDocumentSelectionEdit
    • IEditableField
    • IExternalLink
    • IExternalLinkEdit
    • IExternalLinksSelectionEdit
    • IFieldAudit
    • IFieldHistory
    • IFieldHistoryEx
    • IFieldQuery
    • IFieldValueEdit<T>
    • IHistoryAudit
    • INumericValueEdit
    • IObjectValue
    • IReferencedRecordsSelection
    • IReferencedRecordsSelectionEdit
    • ISearchDisplayFieldOptions
    • ISearchOptions
    • ISignatureAudit
    • IStatisticsReport
    • ISubEditableField
    • ISystemUpdateInformation
    • ITextValueEdit
    • IUserGroupListSelection
    • IUserGroupListSelectionEdit
    • IValuesListBaseSelection
    • IValuesListBaseSelectionEdit
    • IValuesListSelection
    • IValuesListSelectionEdit
    • IValuesListSingleSelection
    • IValuesListSingleSelectionEdit
    • IWorkflowAction
    • IWorkflowNode
    • LastUpdatedPreference
    • NumericRangeOperator
    • RecordCountType
    • RecordStatus
    • ReportSource
    • SortField
    • SortType
    • ValueOperator
    • ValuesOperator
    • WorkflowAuditActionType
  • Estrelica.Archer.Entity
    • ArcherEntityExtensions
    • ASOStatus
    • EntityType
    • IArcherAliasableEntity
    • IArcherAliasedEntity
    • IArcherASOEntity
    • IArcherASONamedEntity
    • IArcherBase
    • IArcherContentUpdateInfoEntity
    • IArcherDescribableEntity
    • IArcherDescribedEntity
    • IArcherEntity
    • IArcherEntityBase
    • IArcherGuidEntity
    • IArcherNameableEntity
    • IArcherNamedEntity
    • IArcherUpdateInfoEntity
    • IEditableArcherEntity
    • IUpdateInformation
    • SourceAttribute
    • UpstreamPropertyAttribute
  • Estrelica.Archer.Events
    • EventActionLayoutType
    • EventActionType
    • EventDateActionType
    • EventItemActionType
    • EventSectionActionType
    • IEventAction
    • IEventRule
    • ISetDateOption
  • Estrelica.Archer.Layouts
    • ILayout
    • ILayoutEntity
    • ILayoutItem
    • ILayoutSection
    • ILayoutTab
    • LayoutItemType
    • LayoutMemberType
    • LayoutSectionType
    • LayoutTabType
  • Estrelica.Archer.Metadata
    • ArcherMetadataExtensions
    • FilterConditionType
    • FilterCriteriaOperatorType
    • IArcherApplication
    • IArcherLevel
    • IArcherModule
    • IArcherQuestionnaire
    • IArcherSolution
    • IArcherSubForm
    • IArcherValuesList
    • IArcherValuesListValue
    • IFilterCondition
    • IFilterCriteria
    • ILevelFilter
    • ILevelFilterValue
    • IModuleOwner
    • IModuleOwnerGroup
    • IModuleOwnerUser
    • IModuleReference
    • INumericRange
    • INumericRangeValue
    • IQuestionnaireRule
    • ModuleClass
    • ModuleStatus
    • ModuleType
    • QuestionnaireRuleType
    • ReportType
    • Timezone
    • ValuesListType
    • ValueSortType
  • Estrelica.Archer.Metadata.Field
    • ArcherFieldExtensions
    • DefaultDateType
    • ExternalLinkProtocol
    • FieldEncryptionState
    • FieldType
    • IArcherField
    • IAssetResponsibilitiesField
    • IAttachmentField
    • IAvailableUserGroupSelections
    • IBaseDateField
    • ICalculatedValuesListField
    • IContentAccessHistoryField
    • ICrossApplicationStatusTrackingField
    • ICrossModuleStatusTrackingField
    • ICrossReferenceField
    • IDateField
    • IDiscussionField
    • IDocumentField
    • IExternalLinksField
    • IFirstPublishedField
    • IGroupPermission
    • IHistoryLogField
    • IImageField
    • IIPAddressField
    • ILastUpdatedField
    • IMatrixField
    • ImplementsAPIKey
    • ImplementsFieldTypeAttribute
    • IMultipleReferenceDisplayField
    • INumericField
    • IPermissionInheritance
    • IQuestionnaireReferenceField
    • IRecordStatusField
    • IReferenceField
    • IRelatedRecordsField
    • IRiskAssessmentField
    • ISchedulerField
    • ISubformField
    • ITechnologiesListField
    • ITechnologyVersionsListField
    • ITextField
    • ITrackingIDField
    • IUserGroupListField
    • IUserPermission
    • IValuesListField
    • IVotingField
    • SystemFieldType
    • UserGroupType
    • VotingType
  • Estrelica.Archer.Metadata.Field.Properties
    • DisplayControl
    • FieldLayoutFormat
    • IAdvancedDisplayOption
    • IAdvancedDisplayProperty
    • IAllowLookupProperty
    • IAllowSortingProperty
    • IColumnCountProperty
    • IDisplayControlProperty
    • IDisplayInHeaderProperty
    • IEncryptionStateProperty
    • IFieldValidationTypeProperty
    • IHeightWidthProperty
    • IIncludeTimeInformationProperty
    • IIncludeUserInformationProperty
    • IIsAuditEnabledProperty
    • IIsBulkCreateEnabledProperty
    • IIsBulkUpdateEnabledProperty
    • IIsCalculatedProperty
    • IIsEditableGridDisplayProperty
    • IIsEditableInSearchProperty
    • IIsEncryptedProperty
    • IIsFindEnabledProperty
    • IIsKeyProperty
    • IIsQuestionProperty
    • IIsRequiredProperty
    • IIsRestrictedToLevelProperty
    • IIsSupressedProperty
    • IIsTrendingEnabledProperty
    • IIsUniqueProperty
    • ILinkProperty
    • ILookupReportProperty
    • IMaxAttachmentsAllowedProperty
    • IMaxFileSizeProperty
    • IMaximumSelectionProperty
    • IMaxIntValueProperty
    • IMaxLongValueProperty
    • IMinAttachmentsAllowedProperty
    • IMinimumSelectionProperty
    • IMinIntValueProperty
    • IMinLongValueProperty
    • IMinMaxSelectionProperty
    • IPrefixProperty
    • ISuffixProperty
    • ITrendingDurationProperty
    • ITrendingDurationTypeProperty
    • MatrixAxis
    • NegativeDisplayType
  • Estrelica.Archer.Metadata.Properties
    • IIsDeprecatedProperty
    • IIsDirectToEditEnabledProperty
    • IIsMobileEnabledProperty
    • IIsNotificationProperty
    • IIsTaskManagementEnabledProperty
    • IIsWaveEnabledProperty
    • IKeepLicensedProperty
    • ISearchViewProperty
  • Estrelica.Archer.Utility
    • APIExceptionExtensions
    • APIPreference
    • APISource
    • ArcherAPIException
    • ArcherEntitySerializer
    • BaseDataWrapper<K>
    • CachedResolver
    • DictionaryDataWrapper<K>
    • DomainFormat
    • EditUtilities
    • ExtensionsUnavailableException
    • FilterCriteriaHelper
    • IAccessResolver
    • IAPIFacade
    • IArcherRestAPI
    • IArcherSoapAPI
    • IArcherUndocumentedAPI
    • ICastleHillExtendedAPI
    • IContentResolver
    • ILayoutResolver
    • IMetadataResolver
    • IReportResolver
    • IValueAccessor
    • ObjectDataWrapper<T, K>
    • ObjectKeyAttribute
    • ValuesListChangeEvent
    • ValuesListChangeEventArgs
  • Estrelica.Interfaces
    • IArcherAuthProvider
    • ICacheProvider
    • IClearable
    • IDatabaseAuthProvider
    • IEditable
    • IEditable<V>
    • IEditableCollection<V>
    • IEditableEnumerable<V>
    • IEditableFieldSelection<V>
    • IEditableInterface<I>
    • IEntityResolver
    • IExtendedAPIAuthProvider
    • IHttpClientAccessor
    • ILogCleanup
    • ILogSubscriber
    • InvalidateEntity<K>
    • InvalidateEntityEventArgs<K>
    • IRecordAccess
    • IRecordAccess<T>
    • IResolverProvider
    • ISessionProvider
    • ISystemUpdateable
    • ITrafficCounter
    • LogLevel
  • Estrelica.Logging
    • BaseLogger
    • ConsoleLogger
    • FileLogger
    • FileLogger.TimestampFormat
    • Logger
    • TraceLogger
  • Estrelica.Utility
    • Arguments
    • BaseRecordAccess
    • DataReaderExtensions
    • DateTimeExtensions
    • Debouncer
    • DebugLog
    • DeferEnumerable<T>
    • DeferValue<V>
    • DictionaryExtensions
    • EnumHelper
    • ExceptionExtensions
    • GuidUtility
    • HandledException
    • HashSetExtensions
    • ICacheHandler
    • ICollectionExtensions
    • IDeferrable
    • IDeferredValue
    • IEnumerableExtensions
    • IgnoreDefaultValuesDictionary<K, V>
    • JsonDictionary<V>
    • OperationExtensions
    • Resource
    • SqlConnectionExtensions
    • SqlUtilities
    • StreamExtensions
    • StringExtensions
    • TableMapper
    • TimeoutDictionary<K, V>
    • TypeExtensions
    • XElementExtensions

Class Core

Entry class providing access to all Estrelica.Core API services.

Inheritance
object
Core
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Estrelica
Assembly: Estrelica.Core.dll
Syntax
public sealed class Core : IResolverProvider
Examples

This demonstrates how to invoke the Estrelica.Core and authenticate with an Archer instance:

core = Estrelica.Core.ValidateLicense(authenticationId,

	// Any non-fatal license validation issues will return (but not throw) an exception detailing exactly what went wrong.
	// This may include upcoming expiration notices or other problems which may be addressed by the customer.
	// It is the responsiblity of the user to ensure that proper action takes place when these warnings or errors arise.
	wm => Log(wm.Message));

// Details of the license may be displayed or logged if desired
Log(core.LicenseText);

// Once the Estrelica.Core license has been validated, the Core must authenticate with a target Archer instance
// (The username may include a domain in user@domain or domain\user format, if necessary.)
core.CreateSession(archerUrl, archerInstance, archerUsername, archerPassword);

Log($"Connected to instance {core.SessionProvider.Instance} at {core.SessionProvider.Url} (version {core.APIFacade.ArcherVersion})");

Once authenticated, the Core's resolver classes may be used to retrieve metadata:

IArcherApplication policiesApplication = MyCore.Metadata.ApplicationByName("Policies");
IEnumerable<IValuesListField> valuesListFields = policiesApplication.Fields.Where<IValuesListField>();
foreach(var valuesListField in valuesListFields)
         {
	Trace.WriteLine($"Values List field '{valuesListField.Name}' references Values List '{valuesListField.ValuesList.Name}'");
	Trace.WriteLine("and these are the available Values for the field: " + Environment.NewLine +
		valuesListField.ValuesList.Values.Select(vlv => $"   '{vlv.Name}'" + Environment.NewLine));
         }

and content:

IEnumerable<IArcherContentAccess> content = MyCore.Content.GetContent(policiesApplication).ContentAccess(MyCore);
foreach(var policiesRecord in content)
         {
	Trace.WriteLine($"Policies record {policiesRecord.Id} has these values in these fields:");
	foreach(var field in policiesRecord.Fields)
             {
		Trace.WriteLine($"   {field.FieldType} '{field.Name}' => '{policiesRecord.Value(field)}'");
             }
         }

among many other things. See the Estrelica.Core.Demos solution at https://github.com/CastleHillSoftware/Estrelica.Core.Demos for more complete examples.

Fields

UseRESTLogin

Specifies whether Estrelica.Core should authenticate with Archer via the REST platformapi/core/security/login endpoint (if true) or the SOAP "CreateUserSessionFromInstance" method (if false). Defaults to false in order to support SSO environments where the REST call may not be available, per advisory from Archer.

Declaration
public static bool UseRESTLogin
Field Value
bool

Properties

APIFacade

Declaration
public IAPIFacade APIFacade { get; set; }
Property Value
IAPIFacade

APITimeoutSeconds

Sets the maximum number of seconds that all API calls will wait for a response from Archer before timing out and raising an exception

Declaration
public static int APITimeoutSeconds { get; set; }
Property Value
int

Access

Declaration
public IAccessResolver Access { get; set; }
Property Value
IAccessResolver

Implements
IResolverProvider.Access

Content

Declaration
public IContentResolver Content { get; set; }
Property Value
IContentResolver

Implements
IResolverProvider.Content

CurrentUser

Declaration
public IArcherUser CurrentUser { get; }
Property Value
IArcherUser

Implements
IResolverProvider.CurrentUser

DisableSSLCertificateVerification

Allows SSL certificate verification to be disabled for all Archer API calls. This should only be used for development and/or testing self-signed certificates. If no assignment is made to this property or if it is explicitly set to false, all Archer API calls will be subject to SSL certification verification. If set to true, this must occur prior to any Archer API calls (e.g. before calling CreateSession()). Once set, the value may not be changed.

Declaration
public static bool DisableSSLCertificateVerification { get; set; }
Property Value
bool

ExceptionRetryCallback

Registers a callback that will be invoked whenever an exception occurs during an API call. Examine the exception and return true if the API call should be retried.

Declaration
public static Func<Exception, bool> ExceptionRetryCallback { get; set; }
Property Value
Func<Exception, bool>

Layout

Declaration
public ILayoutResolver Layout { get; set; }
Property Value
ILayoutResolver

Implements
IResolverProvider.Layout

License

Declaration
public ILicenseInformation License { get; }
Property Value
ILicenseInformation

LicenseText

Declaration
public string LicenseText { get; }
Property Value
string

Metadata

Declaration
public IMetadataResolver Metadata { get; set; }
Property Value
IMetadataResolver

Implements
IResolverProvider.Metadata

Proxy

Injects a custom proxy into all API calls. Use this if you need to provide proxy authentication, etc.

Declaration
public static WebProxy Proxy { get; set; }
Property Value
WebProxy

Report

Declaration
public IReportResolver Report { get; set; }
Property Value
IReportResolver

Implements
IResolverProvider.Report

RequestHeaderCallback

Allows inspection and modification of request headers associated with each HTTP call made by Estrelica.Core, prior to the request being sent to Archer. This can be used to add any additional request headers that may be required, e.g. by proxy servers.

Declaration
public static Action<IDictionary<string, string>> RequestHeaderCallback { get; set; }
Property Value
Action<IDictionary<string, string>>

SessionProvider

Declaration
public IArcherAuthProvider SessionProvider { get; set; }
Property Value
IArcherAuthProvider

Methods

ClearCache()

Clears all cached information held by the resolvers.

Declaration
public void ClearCache()
Implements
IResolverProvider.ClearCache()

CreateSession(string, string, string, string, string, string, string)

Establishes a session with the target Archer instance. Must be called after ValidateLicense().

Declaration
public Core CreateSession(string archerUrl, string archerInstance, string username, string password, string userDomain = null, string archerDbConnectionString = null, string existingSessionToken = null)
Parameters
string archerUrl

Base URL of the Archer instance server

string archerInstance

Instance name of the Archer instance

string username

Username of the account to authenticate against the Archer instance

string password

Password of the account to authenticate against the Archer instance

string userDomain

Domain (if applicable) of the Archer account (use null for non-domain accounts)

string archerDbConnectionString

Connection string to the Archer instance database (null if API extensions are not required, or if the CHS Extended API is available at the URL above)

string existingSessionToken

An optional existing session token (if one has already been established). This token will be used as needed for API calls and no user authentication will occur until the token needs to be refreshed.

Returns
Core

ValidateLicense(Guid, Action<Exception>, bool, string, Func<string>, Func<string, bool>)

Validates the license for the authentication key supplied by CastleHill Software. Must be called to initialize a Core instance.

Declaration
[Obfuscation(Feature = "virtualization", Exclude = false)]
public static Core ValidateLicense(Guid authenticationKey, Action<Exception> warningCallback, bool forceRefresh = false, string licenseFileLocation = null, Func<string> loadLicense = null, Func<string, bool> saveLicense = null)
Parameters
Guid authenticationKey

Authentication key provided to the customer by CastleHill Software

Action<Exception> warningCallback

Action<Exception> which will receive any non-fatal exceptions (including warnings) arising from the license validation process. The caller is expected to monitor and respond appropriately to these exceptions.

bool forceRefresh

Force a refresh of the license regardless of the refresh cycle

string licenseFileLocation

Optional location where the license file resides (defaults to the execution directory of the current process)

Func<string> loadLicense

Func<string, bool> saveLicense

Returns
Core

An instance of Estrelica.Core which may then be used to authenticate against an Archer instance via CreateSession()

Extension Methods

EnumHelper.In<TEnum>(TEnum, params TEnum[])
IEnumerableExtensions.ToEnumerable<T>(T)
StringExtensions.AssertNotNull<T>(T, string)
TypeExtensions.WithDispose<T, V>(T, Func<T, V>)
EnumHelper.CastNullable<TEnum>(object)
TypeExtensions.ConvertTo<V>(object)
TypeExtensions.TryConvert<V>(object, out V)
Back to top Copyright 2019-2023 by CastleHill Software LLC