示例#1
0
        public override bool FindProperty <TCallback>(string name, ref TestNestedContainer container, ref ChangeTracker changeTracker, ref TCallback action)
        {
            if (string.Equals(name, m_TestContainer.GetName()))
            {
                action.VisitProperty <UnmanagedProperty <TestNestedContainer, TestPrimitiveContainer>, TestPrimitiveContainer>(m_TestContainer, ref container, ref changeTracker);
                return(true);
            }

            return(false);
        }
        private bool TryFindProperty <TCallback, TValue>(string name, UnmanagedProperty <TestPrimitiveContainer, TValue> property, ref TestPrimitiveContainer container, ref ChangeTracker changeTracker,
                                                         ref TCallback callback)
            where TCallback : IPropertyQuery <TestPrimitiveContainer>
            where TValue : unmanaged
        {
            if (string.Equals(name, property.GetName()))
            {
                callback.VisitProperty <UnmanagedProperty <TestPrimitiveContainer, TValue>, TValue>(property, ref container, ref changeTracker);
                return(true);
            }

            return(false);
        }