public Reference(UTinyType type, int value)
            {
                Assert.IsNotNull(type);
                Assert.IsTrue(type.IsEnum);

                var defaultValue = type.DefaultValue as UTinyObject;

                UTinyField field;

                if (null != defaultValue)
                {
                    var name      = string.Empty;
                    var container = (IPropertyContainer)defaultValue.Properties;
                    foreach (var property in defaultValue.Properties.PropertyBag.Properties)
                    {
                        var propertyValue = property.GetObjectValue(container);
                        if (!value.Equals(propertyValue))
                        {
                            continue;
                        }
                        name = property.Name;
                        break;
                    }
                    field = type.FindFieldByName(name);
                }
                else
                {
                    field = type.Fields.FirstOrDefault();
                }

                m_Type  = (UTinyType.Reference)type;
                m_Id    = field?.Id ?? UTinyId.Empty;
                m_Name  = field?.Name ?? string.Empty;
                m_Value = null != field ? (int?)defaultValue?[m_Name] ?? 0 : 0;
            }
            public Reference(UTinyType type, string name)
            {
                Assert.IsNotNull(type);
                Assert.IsTrue(type.IsEnum);

                var defaultValue = type.DefaultValue as UTinyObject;
                var field        = type.FindFieldByName(name);

                m_Type  = (UTinyType.Reference)type;
                m_Id    = field?.Id ?? UTinyId.Empty;
                m_Name  = field?.Name ?? string.Empty;
                m_Value = null != field ? (int?)defaultValue?[m_Name] ?? 0 : 0;
            }