public ModelSample() { this.dependencyClient = new HttpDependencyClient(new Uri(DependencyUrl), "dev", false); this.dataFormatClient = new DataFormatClient(dependencyClient); this.acClient = new AtlasConfigurationClient(dependencyClient); }
public Writer(Uri dependencyServiceUri, AtlasConfiguration atlasConfiguration, DataFormat dataFormat, string group, IOutputTopic topic, bool enableCache = true) { var httpDependencyClient = new HttpDependencyClient(dependencyServiceUri, group, enableCache); // DependencyClient stores the Data format, Atlas Configuration var dataFormatClient = new DataFormatClient(httpDependencyClient); var atlasConfigurationClient = new AtlasConfigurationClient(httpDependencyClient); var atlasConfigurationId = atlasConfigurationClient .PutAndIdentifyAtlasConfiguration(atlasConfiguration); // Uniq ID created for the AtlasConfiguration var dataFormatId = dataFormatClient.PutAndIdentifyDataFormat(dataFormat); // Uniq ID created for the Data Format TopicName = topic.TopicName; //Init Session session = new SessionTelemetryDataOutput(topic, dataFormatId, dataFormatClient); session.SessionOutput.AddSessionDependency(DependencyTypes.DataFormat, dataFormatId); session.SessionOutput.AddSessionDependency(DependencyTypes.AtlasConfiguration, atlasConfigurationId); SessionOutput = session.SessionOutput; }