Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class KeyFrame<T>
- {
- public float Time;
- public T Value;
- }
- // I want any kind of Keyframe to be accepted
- class Timeline<T> where T : Keyframe<*>
- {
- }
- class Timeline<TKeyframe, TKeyframeValue>
- where TKeyframe : Keyframe<TKeyframeValue>,
- {
- }
- public abstract class FooBase
- {
- private FooBase() {} // Not inheritable by anyone else
- public class Foo<U> : FooBase {...generic stuff ...}
- ... nongeneric stuff ...
- }
- public class Bar<T> where T: FooBase { ... }
- ...
- new Bar<FooBase.Foo<string>>()
- class TimeLine<T>
- {
- private IList<KeyFrame<T>> keyFrameList;
- ...
- }
- class Timeline<T>
- {
- List<KeyFrame<T>> _frames = new List<KeyFrame<T>>(); //Or whatever...
- ...
- }
- class KeyFrame<T> {
- public float Time;
- public T Value;
- class Timeline<U> where U : Keyframe<T> {
- }
- }
Add Comment
Please, Sign In to add comment