예제 #1
0
      public JiraApi(AssistantSettings configuration, ApplicationCache applicationCache)
      {
         _resourceDownloader = new ResourceDownloader(configuration);

         Session = new JiraSessionService(configuration);
         Server = new MetadataRetriever(configuration);
         _issuesFinder = new IssuesFinder(configuration, Server);
         Agile = new JiraAgileService(configuration, applicationCache, Server, _issuesFinder);
         Worklog = new WorklogManager(configuration);
      }
예제 #2
0
        public JiraApi(AssistantSettings configuration, ApplicationCache applicationCache)
        {
            _resourceDownloader = new ResourceDownloader(configuration);

            Session       = new JiraSessionService(configuration);
            Server        = new MetadataRetriever(configuration);
            _issuesFinder = new IssuesFinder(configuration, Server);
            Agile         = new JiraAgileService(configuration, applicationCache, Server, _issuesFinder);
            Worklog       = new WorklogManager(configuration);
        }
예제 #3
0
        public CompileUnitConstructor(ASTModel astModel, MetadataRetriever metadataRetriever)
        {
            CodeDomGenerationVisitor visitor    = new CodeDomGenerationVisitor(metadataRetriever);
            CodeTypeDeclaration      modelClass = visitor.VisitAll_(astModel);

            CodeNamespace theNamespace = new CodeNamespace();

            theNamespace.Name = CompileUnitConstructor.TheNamespaceName;

            theNamespace.Types.Add(modelClass);
            theNamespace.Types.Add(RunnableClassGenerator.ConstructRunnableClass(modelClass.Name));

            this.CompileUnit = new CodeCompileUnit();
            this.CompileUnit.Namespaces.Add(theNamespace);
        }
예제 #4
0
        public MetaData()
        {
            Measurements = new List <MeasurementRow>();

            // Do the following on button click or missing configuration, etc:

            // Note that openHistorian internal publisher controls how many tables / fields to send as meta-data to subscribers (user controllable),
            // as a result, not all fields in associated database views will be available. Below are the default SELECT filters the publisher
            // will apply to the "MeasurementDetail", "DeviceDetail" and "PhasorDetail" database views:

            // SELECT NodeID, UniqueID, OriginalSource, IsConcentrator, Acronym, Name, ParentAcronym, ProtocolName, FramesPerSecond, Enabled FROM DeviceDetail WHERE IsConcentrator = 0
            // SELECT Internal, DeviceAcronym, DeviceName, SignalAcronym, ID, SignalID, PointTag, SignalReference, Description, Enabled FROM MeasurementDetail
            // SELECT DeviceAcronym, Label, Type, Phase, SourceIndex FROM PhasorDetail

            DataTable measurementTable = null;
            DataTable deviceTable      = null;
            DataTable phasorTable      = null;

            string server = "Server=" + Settings.Default.ServerIP + "; Port=" + Settings.Default.HistorianGatewayPort + "; Interface=0.0.0.0";

            try
            {
                DataSet metadata = MetadataRetriever.GetMetadata(server);

                // Reference meta-data tables
                measurementTable = metadata.Tables["MeasurementDetail"];
                deviceTable      = metadata.Tables["DeviceDetail"];
                phasorTable      = metadata.Tables["PhasorDetail"];
            }
            catch (Exception ex)
            {
                MessageBox.Show("Exception retrieving meta-data: " + ex.Message);
            }

            if ((object)measurementTable != null)
            {
                // Do something with measurement records
                foreach (DataRow measurement in measurementTable.Select("SignalAcronym <> 'STAT' and SignalAcronym <> 'DIGI'"))
                {
                    Measurements.Add(new MeasurementRow(measurement));
                }
            }
        }
예제 #5
0
        public CodeDomGenerationVisitor(MetadataRetriever metadataRetriever)
        {
            this.metadataRetriever = metadataRetriever;

            this.theNamespace      = new CodeNamespace();
            this.theNamespace.Name = CodeDomGenerationVisitor.TheNamespaceName;

            this.theClass            = new CodeTypeDeclaration();
            this.theClass.Attributes = MemberAttributes.Public;
            this.theClass.Name       = CodeDomGenerationVisitor.TheClassName;
            this.theClass.BaseTypes.Add(typeof(AbstractModel));
            this.theNamespace.Types.Add(this.theClass);

            //
            this.theNamespace.Types.Add(RunnableClassGenerator.ConstructRunnableClass(TheClassName));
            //

            this.theConstructor            = new CodeConstructor();
            this.theConstructor.Attributes = MemberAttributes.Public;
            this.theClass.Members.Add(this.theConstructor);
        }
        private void LoadStructureFile()
        {
            _xmlDoc = new XmlDocument();
            _xmlDoc.Load(_fileName);
            _dsdList = MetadataRetriever.ParseDataStructureResponse(_xmlDoc, "Full");

            if (_dsdList.Count > 0)
            {
                foreach (BaseArtefactInfo bs in _dsdList)
                {
                    checkedListBoxArtefact.Items.Add("[DSD]: " + bs.sdmxAgency + ":" + bs.sdmxId + "(" + bs.sdmxVersion + ")");
                }
            }

            _codelistList = MetadataRetriever.ParseValueDomainResponse(_xmlDoc, "Full");

            if (_codelistList.Count > 0)
            {
                foreach (BaseArtefactInfo bs in _codelistList)
                {
                    checkedListBoxArtefact.Items.Add("[Codelist]: " + bs.sdmxAgency + ":" + bs.sdmxId + "(" + bs.sdmxVersion + ")");
                }
            }
        }
 internal void LogUse(MetadataRetriever retriever)
 {
     this.usedRetrievers.Add(retriever, retriever);
 }
 internal bool HasBeenUsed(MetadataRetriever retriever)
 {
     return this.usedRetrievers.ContainsKey(retriever);
 }
 void EnqueueRetrieverIfShouldResolve(MetadataRetriever retriever)
 {
     if (this.resolveMetadataReferences)
     {
         this.stackedRetrievers.Push(retriever);
     }
 }
        MetadataSet GetMetadata(MetadataRetriever retriever)
        {
            ResolveCallState resolveCallState = new ResolveCallState(this.maximumResolvedReferences, this.resolveMetadataReferences, new TimeoutHelper(this.OperationTimeout), this);
            resolveCallState.StackedRetrievers.Push(retriever);
            this.ResolveNext(resolveCallState);

            return resolveCallState.MetadataSet;
        }
 IAsyncResult BeginGetMetadata(MetadataRetriever retriever, AsyncCallback callback, object asyncState)
 {
     ResolveCallState state = new ResolveCallState(this.maximumResolvedReferences, this.resolveMetadataReferences, new TimeoutHelper(this.OperationTimeout), this);
     state.StackedRetrievers.Push(retriever);
     return new AsyncMetadataResolver(state, callback, asyncState);
 }