当前位置: 首页>>代码示例>>C#>>正文


C# DataContainer类代码示例

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


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


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