Giter Club home page Giter Club logo

eventcollection's Introduction

SerializeCollection

직렬화 되지 않는 자료형인 Dictionary, HashSet, Nullable<T> 를 직렬화 할 수 있습니다.

EventCollection

Collection에 변화가 있을 때 이벤트를 등록할 수 있는 클래스입니다.

직렬화 할 수 있다.

Event

Event는 각 요소가 추가되거나 제거될 때 호출됩니다.

Add, Remove

void Start()
{
  EventList<int> ints = new EventList<int>();
  ints.Event += (int item, bool isAdd) =>
  {
    if(isAdd)
      Debug.Log("Add : " + item);
    else
      Debug.Log("Remove : " + item);
  };

  ints.Add(0);
  ints.Remove(0);
}

결과 :

Add : 0
Remove : 0

Changed

ChangedEvent가 종료된 후 한번만 호출됩니다.

void Start()
{
  EventList<int> ints = new EventList<int>();
  ints.Changed += () =>
  {
    Debug.Log("Changed");
  };

  ints.AddRange(new List<int> { 0, 1, 2, 3, 4 });
}

결과 :

Changed

eventcollection's People

Contributors

solutena avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.