• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# DataContainer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DataContainer的典型用法代码示例。如果您正苦于以下问题:C# DataContainer类的具体用法?C# DataContainer怎么用?C# DataContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DataContainer类属于命名空间,在下文中一共展示了DataContainer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Main

        static void Main(string[] args)
        {
            using(var fr = new FlowRuntime())
            {
                var frc = new FlowRuntimeConfiguration();

                var pageBufferContainer = new DataContainer<PageBuffer>();

                var frontend = new Frontend();

                frc.AddFlow(new Main(new Formatter(),
                                    frontend));
                frc.AddFlow(new Features(new CommandlineParser(pageBufferContainer),
                                        new TextFileAdapter(),
                                        new LineBuffer(pageBufferContainer),
                                        new Pager(pageBufferContainer)));
                fr.Configure(frc);

                frontend.displayFirstPage += fr.CreateEventProcessor(".displayFirstPage");
                frontend.displayLastPage += fr.CreateEventProcessor(".displayLastPage");
                frontend.displayNextPage += fr.CreateEventProcessor(".displayNextPage");
                frontend.displayPrevPage += fr.CreateEventProcessor(".displayPrevPage");

                //fr.Message += Console.WriteLine;

                fr.Process(new Message(".run", new[]{"test1.txt"}));

                fr.WaitForResult();
            }
        }
开发者ID:kennychou0529,项目名称:NPantaRhei,代码行数:30,代码来源:Program.cs


示例2: Start

 void Start()
 {
     data = GameObject.FindGameObjectWithTag("GameContainer").GetComponent<DataContainer>();
     float TopScoreTime = PlayerPrefs.GetFloat("TopScore");
     TopScore.text = "Best time: " + CalculateTime(TopScoreTime);
     Time.timeScale = 1;
 }
开发者ID:velddev,项目名称:HalloweenGameAGDG,代码行数:7,代码来源:MainMenu.cs


示例3: RecordedRawOutput

    public RecordedRawOutput(string filename)
    {
        r = new System.Random();
        startTime = DateTime.Now;
        lastTime = DateTime.Now;

        if(File.Exists(filename)){
          // grab the XML serialized data from a file
          FileStream stream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
          XmlSerializer xs = new XmlSerializer(typeof(DataContainer));

          // then try to deserialize it
          try {
        container = (DataContainer)xs.Deserialize(stream);
          }
          catch(FileNotFoundException e){
        container.dataPairs = new RawDataPair[0];
          }
          catch(Exception e){
        Debug.Log("General exception: " + e);
          }

          /*
          stream.Close();
          */
        }
        else {
          container.dataPairs = new RawDataPair[0];
        }
    }
开发者ID:blyk,项目名称:BlackCode-Processing,代码行数:30,代码来源:RecordedRawOutput.cs


示例4: Start

 public virtual void Start()
 {
     animator = GetComponent<Animator>();
     audioSource = GetComponent<AudioSource>();
     data = GameObject.FindGameObjectWithTag("GameContainer").GetComponent<DataContainer>();
     Targets = GameObject.FindGameObjectsWithTag("Player");
     CurrentTarget = GetClosestTarget();
 }
开发者ID:velddev,项目名称:HalloweenGameAGDG,代码行数:8,代码来源:EnemyBaseAI.cs


示例5: DesisionTreeMainWindow

 public DesisionTreeMainWindow()
 {
     InitializeComponent();
     dbHandler = new DataBaseHandler();
     desTreeInfo = new DataContainer<List<string[]>>();
     learningInfo = new DataContainer<DataContainer<List<string>>>();
     LoadInformationForUsingDesTrees();
 }
开发者ID:Nikita94,项目名称:SII,代码行数:8,代码来源:DesisionTreeMainWindow.cs


示例6: SettingsFileManager

    public SettingsFileManager()
        : base()
    {
        fileName = "PlayerSettings.dat";
        pathFile += fileName;
        dataContainer = new DataContainer();

        FileInitialization();
    }
开发者ID:BlueAroma,项目名称:Lost-Island-Unity-5,代码行数:9,代码来源:SettingsFileManager.cs


示例7: LaunchGame

 public void LaunchGame()
 {
     SaveSystem.Registery.m_snapshot.m_partyName = charName.text;
     DataContainer playerContainer = new DataContainer("player");
     playerContainer.Addvalue("marine", selectedMarine);
     //...
     SaveSystem.RegisterPlayer(playerContainer);
     SaveSystem.LoadScene("scn_IntroScreen");
 }
开发者ID:S4D3H,项目名称:ProjectJanitor,代码行数:9,代码来源:CharacterSelector.cs


示例8: Deserialize

        public override void Deserialize(XElement serializedData)
        {
            base.Deserialize(serializedData);

            foreach (XElement bone in serializedData.Element("bones").Elements())
            {
                DataContainer boneData = new DataContainer();
                boneData.Deserialize(bone);
                BoneAnimationData.Add(bone.Attribute("id").Value, boneData);
            }
        }
开发者ID:Ben-P-Leda,项目名称:Bopscotch-Android,代码行数:11,代码来源:SkeletalKeyframe.cs


示例9: AccessFile

        public AccessFile( DataContainer _dc )
        {
            if ( _dc != null ) {
                dc = _dc;

                if ( dc.GetOwnerDB() == null )
                    throw new AccessException( " Database is not defined for this DataСontainer! " );

                filepath = dc.GetOwnerDB().DbPath+"/_dc_"+dc.Name+".access";
            }
        }
开发者ID:devgopher,项目名称:DataDwarf,代码行数:11,代码来源:AccessFile.cs


示例10: LoadData

 public override void LoadData(DataContainer container)
 {
     try
     {
         waiting = container.GetValue<bool>("waiting");
     }
     catch(Exception)
     {
         return;
     }
 }
开发者ID:S4D3H,项目名称:ProjectJanitor,代码行数:11,代码来源:ObjectActivationTrigger.cs


示例11: BuildIndex

        public static void BuildIndex( string db_name, string container_name )
        {
            var db1 = DataBase.LoadFrom( db_name, null );
            var dc1 = new DataContainer( db1, container_name );
            var rec1 = new Record( dc1 );
            rec1.Id = 102;
            rec1.BuildIndex();
            var hash_expected = "2D8C1282A16592B40656F06F80D75172";

            Assert.AreEqual( hash_expected, rec1.GetIndex().DwarfHashCode );
        }
开发者ID:devgopher,项目名称:DataDwarf,代码行数:11,代码来源:RecordTest.cs


示例12: Generate

        public static string Generate(DataContainer container)
        {
            string output = "";

            foreach(DataGroup group in container.TopGroups)
            {
                output += GenerateDataGroup(group, 0) + "\n";
            }

            return output;
        }
开发者ID:PearCoding,项目名称:DataLisp-CSharp,代码行数:11,代码来源:DataLisp.cs


示例13: Serialize

 public Stream Serialize(object item)
 {
     Should.NotBeNull(item, nameof(item));
     EnsureInitialized();
     if (_knownTypes.Add(item.GetType()))
         _contractSerializer = new DataContractSerializer(typeof(DataContainer), _knownTypes);
     item = new DataContainer { Data = item };
     var ms = new MemoryStream();
     _contractSerializer.WriteObject(ms, item);
     return ms;
 }
开发者ID:dbeattie71,项目名称:MugenMvvmToolkit,代码行数:11,代码来源:Serializer.cs


示例14: Save

        /// <summary>
        /// Save this object in the Resgistery
        /// </summary>
        public virtual void Save()
        {
            if (!m_volatile)
            {
                if (m_data == null)
                    m_data = new DataContainer(gameObject.name);

                CollectData(m_data);

                SaveSystem.RegisterData(m_data);
            }
        }
开发者ID:S4D3H,项目名称:ProjectJanitor,代码行数:15,代码来源:MonoPersistent.cs


示例15: CreateContainer

 public static void CreateContainer()
 {
     var user = User.User.New( "root", "12345678");
     string container_name = "nunit_container1";
     var db  = DataBase.LoadFrom( "nunit_db", null );
     var new_dc = new DataContainer( db, container_name );
     new_dc.AddAccess( user, AccessFunctions.Access.AccessLevel.READ_WRITE );
     new_dc.AddColumn( new Column( DataType.STRING, "col1" ), user );
     new_dc.AddColumn( new Column( DataType.FLOAT, "col2" ), user );
     new_dc.BuildIndex();
     new_dc.Save();
 }
开发者ID:devgopher,项目名称:DataDwarf,代码行数:12,代码来源:DataBaseTest.cs


示例16: JoinData

 /// <summary>
 /// This method joins two data tuples.
 /// </summary>
 /// <param name="leftData">Left data tuple.</param>
 /// <param name="rightData">Right data tuple.</param>
 /// <returns>A data tuple.</returns>
 private static DataContainer JoinData(DataContainer leftData, DataContainer rightData)
 {
     return new DataContainer(
             new Tuple<IDChainDefinition, IDChainDefinition>(
                 leftData.IDChainDefinitions.Item1, 
                 rightData.IDChainDefinitions.Item1), 
             new Tuple<AExpressionDefinition, AExpressionDefinition>(
                 leftData.Operands.Item1, 
                 rightData.Operands.Item1), 
             new Tuple<AExpressionDefinition, AExpressionDefinition>(
                 leftData.Extraordinaries.Item1, 
                 rightData.Extraordinaries.Item1));
 }
开发者ID:anukat2015,项目名称:sones,代码行数:19,代码来源:ABinaryCompareOperator.cs


示例17: InquirerBase

        protected InquirerBase(DataContainer dataContainer, params InquirerBase[] dependencies)
        {
            if (dataContainer == null)
            {
                throw new StatisticsException(ExceptionMessages.Null_Data_Container, new ArgumentNullException("dataContainer"));
            }

            this.Container = dataContainer;

            AssertNotNull(dependencies);
            AssertUniqueDataContainer(dependencies);

            this.Id = Guid.NewGuid();
        }
开发者ID:3kthor3adward,项目名称:ce_ps,代码行数:14,代码来源:InquirerBase.cs


示例18: DataBaseChunkCreation

        public static void DataBaseChunkCreation()
        {
            var time = Checks.ExecutionTimeCheck.DoCheck ( () => {
                                                          	Console.WriteLine("Creating DB...");
                                                          	var db = DataBase.Create( "testbase3" );
                                                          	User.User new_usr = User.User.New( "root", "12345678" );
                                                          	db.AddAccess( new_usr, Access.AccessLevel.ADMIN);
                                                          	var dc = new DataContainer( db, "DataC2" );
                                                          	db.AddNewDataContainer( dc, new_usr );
                                                          	db.chunk_manager.CreateChunk( db );
                                                          } );

            Console.WriteLine("Execution time, ms: "+time);
        }
开发者ID:devgopher,项目名称:DataDwarf,代码行数:14,代码来源:DataBaseSample.cs


示例19: Save

 public void Save(String fileName)
 {
     try
     {
         XmlSerializer ser = new XmlSerializer(typeof(DataContainer));
         StreamWriter sw = new StreamWriter(fileName);
         DataContainer data = new DataContainer(mTradeDatas);
         ser.Serialize(sw, data);
         sw.Close();
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
开发者ID:continue88,项目名称:TaobaoTools,代码行数:15,代码来源:TradeDataContainer.cs


示例20: NeuroNetsMainWindow

        public NeuroNetsMainWindow()
        {
            InitializeComponent();

            Type ourtype = typeof(ActivateFunction); // Базовый тип
            Assembly ast = Assembly.GetAssembly(ourtype);
            Type[] types = ast.GetTypes();
            IEnumerable<Type> list = Assembly.GetAssembly(ourtype).GetTypes().Where(type => type.IsSubclassOf(ourtype));  // using System.Linq
            List<Type> aa = new List<Type>(list);

            foreach (Type itm in aa)
            {
                ActivateFunction af1 = (ActivateFunction)Activator.CreateInstance(itm);
                string name = af1.GetType().Name;
            }

            dbHandler = new DataBaseHandler();
            neuroNetsInfo = new DataContainer<List<string[]>>();
            learningInfo = new DataContainer<DataContainer<List<string>>>();

            dgwNeuroNets.ColumnHeadersDefaultCellStyle.Font = new Font("Book Antiqua", 9);
            dgwNeuroNets.Columns.Add("Name", "Имя");
            dgwNeuroNets.Columns.Add("TopologyTypeName", "Топология");
            dgwNeuroNets.Columns.Add("Task", "Задача");
            dgwNeuroNets.Columns.Add("NeuronCount", "Количество нейронов");
            dgwNeuroNets.Columns.Add("LayerCount", "Количество слоев");
            dgwNeuroNets.Columns.Add("ActivateFunction", "Активационная функция");

            dgwNeuronsInLayers.Columns.Add("Layer", "Слой");
            dgwNeuronsInLayers.Columns.Add("Neurons", "Число нейронов");

            dgwParamsAF.Columns.Add("Parameter", "Параметр");
            dgwParamsAF.Columns.Add("Value", "Значение");

            dgwNets.ColumnHeadersDefaultCellStyle.Font = new Font("Book Antiqua", 9);
            dgwNets.Columns.Add("NeuroNet", "Нейронная сеть");
            dgwNets.Columns.Add("TopologyTypeName", "Топология");
            dgwNets.Columns.Add("NeuronCount", "Количество нейронов");
            dgwNets.Columns.Add("LayerCount", "Количество слоев");

            dgwLA.ColumnHeadersDefaultCellStyle.Font = new Font("Book Antiqua", 9);
            dgwLA.Columns.Add("LearningAlgorithm", "Алгоритм обучения");
            dgwLA.Columns.Add("LearningStatus", "Статус обучения");

            LoadInformationForUsingNeuroNets();
            FillNeuroNetChangingTable();
        }
开发者ID:KarpenkoSergey,项目名称:SII,代码行数:47,代码来源:NeuroNetsMainWindow.cs



注:本文中的DataContainer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DataContext类代码示例发布时间:2022-05-24
下一篇:
C# DataConnection类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap